What Goes In Must Come Out

What Goes In Must Come Out

This game is from ldjam.com, which is currently unavailable.
You can try viewing the original page on Web Archive (may not load correctly).
overall: 2.69
fun: 2.67
innovation: 2.56
theme: 2.26
graphics: 1.97
audio: 2.38
humor: 2.26
mood: 2.15
My Compo entry for LD47, "What Goes In Must Come Out".

Not a lot of time to dedicate to this so I stripped down to using HTML and JS Only this time around, no Unity. Used Bfxr for the sound effects.

I took a lot of inspiration from old DOS style games such as Snake.

Controls:
At the title screen, Pressing S, Space, or Enter will start the game.

P will toggle Pause

M will toggle Mute

Use Arrow Keys or WASD to move; Game will actually start once you start moving

You are the White box.

Note that you can pass through the wall to the other side of the screen

Refresh the page to start a new game

While I consider myself well versed in HTML and JS, I was completely new to using the Canvas for anything other than Graph style work but found it remarkably easy to build on. If I was doing it over I'd change a lot of code, such as how I'm building the title screen.

I opted for nothing other that drawing shapes and text on the canvas in order to stay in my time restraints and in the Compo. I rather like the old school look though. It'd be pretty easy to switch to actual icons too though.

A note about balance... I play tested as much as I could but it is still pretty random. Try it again a couple times if you die right away. You should be able to get a score of at least 1000 points I think. I average between 3,000 and 10,000 points.

My play testers went from saying it was too hard to now being too easy. Let me know what you think, I wouldn't mind fleshing this out a bit more, cleaning up the code and using as a tutorial on my site.

UPDATED ON 10/19/2020:

Working more on this last few days but nothing new ready to deploy. Added a bonus item that will show when there is X amount of poo on screen with a spawn chance that increased for every X poo. This helps a bit with garbage clean up if you manage to get high scores and helps with lag. However lag is still an issues I'm tracking down. I know it is happening as the arrays get larger. I can see it in the delta times going from about 10-15ms toward start of game up to 30ms or so the longer you play.

UPDATED ON 10/14/2020:

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.

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.
Found a bug?
Tell us on Discord