Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch Lighting #98

Open
2 of 4 tasks
E-A-N opened this issue Nov 28, 2018 · 3 comments
Open
2 of 4 tasks

Torch Lighting #98

E-A-N opened this issue Nov 28, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@E-A-N
Copy link
Collaborator

E-A-N commented Nov 28, 2018

  • Make Entire Screen Pitch Black
  • Player sprite should always be visible pitch black or not
  • Make an elliptical mask (circle)
  • Mask should cut out of pitch black graphic
@E-A-N E-A-N added enhancement New feature or request help wanted Extra attention is needed labels Nov 28, 2018
@keibiidraws
Copy link
Collaborator

animatic

@LearningNerd
Copy link
Member

So we didn't finish this last night, but here's what we gleaned in ~1 hour of learning about Phaser and the code base for this game:

  • We probably need to initialize the "fog" (black rectangle covering the game, with a hole cut out of it to show the player) inside client/js/gameLoop.js in the game loop's create() method
  • Update the position of the mask based on the player's position -- see client/js/gameLoopTools/playerUtilities.js

Links to Phaser examples for masks:
https://phaser.io/examples/v2/sprites/movement-mask
https://phaser.io/examples/v2/sprites/mask

@hal255
Copy link
Collaborator

hal255 commented Dec 1, 2018

Implemented with a black screen png to follow the player, instead of mask.

image

@hal255 hal255 self-assigned this Dec 1, 2018
hal255 added a commit that referenced this issue Dec 1, 2018
hal255 added a commit that referenced this issue Dec 1, 2018
hal255 added a commit that referenced this issue Dec 1, 2018
hal255 added a commit that referenced this issue Dec 1, 2018
E-A-N added a commit that referenced this issue Dec 1, 2018
Issue #98 Implemented torch lighting to follow player
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants