Hapman 🍩 The Inevitable by hilkojj
Try to delay your death, ⚡fly⚡ away from the Monster!

🕹️ How to play
Collect the ⚡ energy-points from the snack before HapMan eats you!
Then press F to use your energy to fly to the next snack! 🍩🍪🍎
| | ⌨️ | |-------------|-------| | Walk | W A S D | | Jump | Space | | Fly | F | | Restart | R |
▶️ Play in browser!
- Download the Desktop version for better performance.
- Chrome recommended!
🎥 Gameplay video:
If you're stuck in the game, you can watch the video to see how it should be played: https://www.youtube.com/watch?v=eXtJV6pMcFM
🧰 Tools used:
| | | |--------------|----------------------------------------------| | Game Engine | Own made using C++/OpenGL with Lua Scripting | | 3D modeling | Blender 3.1 | | Soundtrack | BoscaCeoil | | SFX | Audacity | | Pixel art UI | Aseprite |
I made this game using my own C++ Game Engine. Most game logic related code is written in Lua. Please note that the GitHub repository contains commits from before the jam started, this was to add new features to the game engine, like physics, controller support, instanced rendering & custom shading.
You can download the game, open the assets folder and edit the scripts.
A few sound effects were downloaded from freesound.org.
👨💻 Technical details:
Gravity Fields
The player is able to walk on every side of the food 'planets', without falling downwards. This is done using gravity fields. In the picture you can see the wireframe of the field around the apple. When the player is inside this field, a function specific to the planet's shape will calculate the direction of the gravity. For spheres this is relatively simple, but the game also contains functions for donut, disc and cylinder shaped planets.
This was highly inspired by the way Super Mario Galaxy does this.
Biting off pieces of food
I wanted Hapman to be able to bite off chunks of the food planets.
However, I did not feel like I'd have enough time to create multiple versions of the food models where each version would have a chunk bitten off.
So Instead I wrote a shader hack for the planets, that just discards all pixels that are behind a certain Z value. Adding a sine wave creates the teeth pattern: ```C++ void main() { #ifdef BITE
float biteDiff = v_position.z + sin(v_position.x * 3.f) - biteZ;
if (biteDiff > 0.f)
discard;
#endif
vec3 albedo = diffuse;
...
To make sure the player cannot walk on the part that was bitten off, I just forced the players Z position to be after the bite:
lua
setUpdateFunction(player, 0, function()
local trans = component.Transform.getFor(player)
trans.position.z = math.min(_G.biteZ - 1, trans.position.z)
end) ```
Giving the player a better sense of their position
Inspired by the way modern 3D mario games do this, I implemented a trick that better communicates to the player where their position is in relation to the floor. It works by casting the player's shadow in the direction of the gravity, instead of the direction of the sun. In the 'after' image, you can see that it is much more clear where the player would land after the jump:
|
|
|
|--------------------------------------------|------------------------------------------|
| Before | After |
All feedback is welcome!
Ratings
| Overall | 88th | 4.096⭐ | 28🧑⚖️ |
| Fun | 253th | 3.788⭐ | 28🧑⚖️ |
| Innovation | 31th | 4.25⭐ | 28🧑⚖️ |
| Theme | 61th | 4.308⭐ | 28🧑⚖️ |
| Graphics | 250th | 4.192⭐ | 28🧑⚖️ |
| Humor | 76th | 4.154⭐ | 28🧑⚖️ |
| Mood | 418th | 3.731⭐ | 28🧑⚖️ |
| Given | 40🗳️ | 29🗨️ |
(The audio is also great. Mixing it a bit better could improve it even more such as making the sound of the worms on the apple a bit louder.)
I actually managed to survive in the end, now he's just staring at me forever!

Cool to see you pursued the tiny opportunity to actually survive the bite that was meant to be fatal :), I haven't been able to do it myself 😅
Great job!
Only one thing is bothering me: who would eat a whole plate of dead flies? :smile:
Giving off very old-school platformer vibes right away, plays nicely and smoothly.
I had a problem with characters not rendering in Safari browser, and text skipping characters in Chrome, don't know what could affect that. Other than that, game worked perfectly. Great job with the entry!
I think I would enjoy it a lot more if you could control the camera
I did realize later that if one of the zaps got eaten you're basicly dead. Maybe it would have been nice to not have to get all zaps to jump for a bit of grace. :smile:
The graphics and animations were pretty neat - nice atmosphere.
Interesting little game, quite cool, but I think the controls prevented me from really having fun with it, but I understand that it's very hard to make it work well with such levels haha
The game looks good especially for a self made engine, congrats on this entry!