Post Jam Update: What Goes In Must Come Out

I've been working a bit on a post jam version. Which is always something I say I'll do but never quite get around to it. Change log below but most significant is I've narrowed down the lag I think and have take steps to mitigate it. More work to do still but far more playable at higher levels.

Original entry: https://ldjam.com/events/ludum-dare/47/what-goes-in-must-come-out

Post Jam Version: https://simplepotential.com/projects/LD47v2/game.htm

  • Changed keyup Event Listener to a switch statement rather than multiple listeners
  • No longer using keyCode on the KeyboardEvent object
    • Using “code” as keyCode has been deprecated
    • Adjusted appropriate code to check based on string matches rather than numeric codes
  • Removed “S” as the way to start the game
    • It is now Space or Enter.
    • “P” can also be used to Start the game
    • The same keys all now pause the game as well.
  • Pooing can now occur when you are >= 50% belly.
    • Speeds up game play
    • Keeps it more interesting
    • Currently a 5% chance to poo when above 50% belly
    • At 100% belly, you poo all excess % just as you would have before
  • Corrected bug with Player movement cost
    • I was adding/subtracting based on players Belly fullness but never using the value from that calculation so your energy cost was always flat.
  • Removed play speed increase based on score.
    • Thought this might be the source of lag but I’ve managed to reproduce the lag I think so still investigating
    • Game is fast paced enough without increasing the actual play speed though
  • Corrected all spellings of Collision
  • Added more commenting
  • Food is now removed from game play if it gets poo on it.
    • I mean, who wants to eat food with poo on it right?
  • Mouse cursor now hidden from the game play area
  • Pressing F2 will now start a new game without having to refresh the page
  • Max food that can spawn at any time is now 30
    • This balances the game a bit
    • Also helps a bit with the lag since there is less things to collision detect
  • Turned player moving sound into a loop rather than play/stop each tick.
    • This has helped a lot with lag
    • Removing all sound gets rid of all lag but I’d prefer another solution and I’m still investigating.