You are browsing as a guest. Sign up (or log in) to start making projects!

9h 44m 34s logged

I fixed up my previous issues with lives resetting to 3 for each level completed as well as start Game taking you back to level 1 rather than starting at the highest level you’ve unlocked. The ghost speed has been halved (from 2px to 1px/frame) which makes everything seem much more balanced with me running around at 60fps!

I’ve added a proper pause menu overlay along with options to toggle Music & SFX - I had previously run into an issue where if you paused the game then played again the menu music would keep playing. To fix this I’m keeping track of all active WebAudio Oscillators and automatically stop them whenever we begin gameplay.

We’ve added some really nice little touches too! For example, when you die Pac-Man will close his mouth, spin twice and slowly shrink away over 80 frames before disappearing completely. You’ll also get a sweet animation when you spawn growing up from 0 to full size over 40 frames. We originally couldn’t get the death animation working because we’d set our global variable gameActive = false during dying which turned off the entire update loop so I’ve updated Pac-Man’s update method to continue updating even when he’s dying / spawning. Finally, I made sure to make Pac-Man disappear once he dies to ensure no weird visuals happen after respawning.

We added a yellow flash on finishing a level.

Floating score popups show up every time you eat a ghost. Now there’s an animated HUD that shows your current score.

Previously, canvas animations were off due to transform translation applied twice (once during animation and once more when drawing). Now we translate to our sprite’s center before applying any additional transformation.

0
39

Comments 0

No comments yet. Be the first!