Hasenpfeffer

 


This post is about an entry into the 2022 Lowrezjam. If you're not familiar the main requirement is that all games must have a resolution of 64x64 or less. That's not a lot of room. As far as platformers go... that sucks, especially if you want your tiles to be 16x16. The screen size just doesn't work with moving up and down platforms, and dealing with other objects. It is claustrophobic at best. 
What does work is falling. There is just enough room to move around, and just enough time... hopefully to avoid or interact with objects.

To start lets take a look at all the objects.
The objects that setup our main mechanic... falling, are hasen with the platform behavior, and the tiled backgrounds with the solid behavior. Then the obstacles, plats use solid as well.




















Then the layers setup.
Layer 2 is set not to move by changing the parallax to 0. We place the tiled backgrounds, and our kill count text here.
Then everything else gets put on the other layers with regular parallax.
See where I'm going?
Basically we can create an endless falling mechanic just by setting the games unbounded scrolling setting to on. Then the bunny falls, and the green boundaries keep it in line.
All we have to after that is create some other rules, and create some obstacles, and critters at somewhat appropriate times.









To start.
First we set the camera. Its x is smack dab in the middle... always.
Then we enable the falling with platform, and change an instance variable.






By using the variable alive we can tell when the bunny should be falling, moving, and anything else.
We can scroll slightly below the player for example.




Then with some sub events we can control when the object faces left or right.






And another sub condition sets up the firing control.
Basically when space is down create fire in the direction its facing. Then make sure it fires down when falling.












We can use the variable to tell if the bunny is not alive...

Scroll to the bottom. Dy gets set further down.

By adding all the objects that don't stay on screen to a family we can do some culling.



Of course you have to have something to destroy, so on to the spawning events.
The expression min(random(100),random(100))  gives us a slightly weighted value usually above 50. Then the second value clamp(95-bugkill*0.75,60,90) varies between 60 and 90 as the bug kill goes up.
 





We use the "is falling" to keep from spamming unwanted objects.






Speaking of that we can start the falling animation with it as well.




Then to prevent the player from just camping out in a corner and spamming flames.
Adding is enabled to not scroll when the player is not alive.
 





One of the features of the game is that the player has to avoid the flames they are shooting.
The fire is setup to act like regular flames where it go's in the direction you shoot it, then up. That's kind of scary when you happen to be going in the same direction.
Its one hit and our bunny is a dead duck.










To show that the player has hit fire I made it move that flame over the bunny.
And then keep going up.



Then I also added a trap where if you touch the booby object you get poisoned.
The worm(?) is part of a hierarchy with a plat object.











When the player dies from fire we do a bit of effects, and restart on another layout.
Remember to reset the globals as well.








The collision of fire with bug is pretty simple. The trigger once is there because we only need one hit, and there are a lot of flames. Disabling collisions helps with that, but the first collision can still be triggered multiple times.








When the player lands on a platform we need to change its animation from falling to walking.




Then if they walk.
Or stop.








Keeping track of our kills.


A little bee keeping.





A lot of housekeeping.







A look at the globals to start.







The platform values.
Tweening the color works nicely.




















A look at a separate layout used for setting up the hierarchy and templates.



















And the flames behaviors.



















Then finally the initial setup of the main layout.

















You can rate the game here.

And play it here:

Comments