Hapman 🍩 The Inevitable

by hilkojj
Overall★★★★★★★★★★4.10
Fun★★★★★★★★★★3.79
Innovation★★★★★★★★★★4.25
Theme★★★★★★★★★★4.31
Graphics★★★★★★★★★★4.19
Humor★★★★★★★★★★4.15
Mood★★★★★★★★★★3.73
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! 🍩🍪🍎

⌨️
WalkW A S D
JumpSpace
FlyF
RestartR

▶️ 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:


🧰 Tools used:

Game EngineOwn made using C++/OpenGL with Lua Scripting
3D modelingBlender 3.1
SoundtrackBoscaCeoil
SFXAudacity
Pixel art UIAseprite


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:

BeforeAfter

All feedback is welcome!

Twitter

screenshot

Comments29

Timo Strating
Timo Strating5 Apr 2022, 10:05
Great game. Looks and plays great. Very impressive for a game made in such a sort amount of time.

(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.)
BangKerpow
BangKerpow5 Apr 2022, 15:13
This is very bizarre and I love it.
cornsyrup5 Apr 2022, 15:15
This is impressive for a self-made engine! Great job, I know how tough it must have been working directly with OpenGL
wondry
wondry5 Apr 2022, 15:17
super cool concept, funny gameplay
kristinamay
kristinamay5 Apr 2022, 15:19
I was confused at first because I didn't read the directions... lol. But after that, this was so cool! More responsive controls and more content I think could make this a really legit game, even for not a game jam. So silly to be a fly wandering around on bits of food. Great work.
LDJam user 1202137 Apr 2022, 23:45
I love the game but man i think tank controls were a bad choice for it, it's VERY confusing with a moving camera, after the first few food pieces I was used to it enough but still having camera based movement would have been a lot more fun!

I actually managed to survive in the end, now he's just staring at me forever!
LDJam user 237588
LDJam user 237588author8 Apr 2022, 07:33
@raptor851 thanks. I understand the issue with the controls. Actually I tried programming camera based movement, but that was made extra hard because the player can walk upside down or sideways, so I did not have the time to actually polish that.

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 😅
Xerxeres8 Apr 2022, 11:48
Very cool I love it. Not only good game play and graphics also the theme is on point.
mrScom
mrScom8 Apr 2022, 11:49
This is a cool game!!! I liked everything in the game!
adncoach8 Apr 2022, 11:57
Great concept! I feel like camera rotations are a bit messy - are you using Euler, not Quats?
LDJam user 237588
LDJam user 237588author8 Apr 2022, 12:11
@adncoach Thanks! I agree. I am using quaternions and matrices, but the code was written in a rush. It has to account for the player walking on any side of a food piece and it has to keep the monster in screen at all times.
Common8 Apr 2022, 15:10
Cool concept, wobbly game play.
BougieBirdie
BougieBirdie8 Apr 2022, 23:39
Holy crap, what a game! You've clearly put a lot of thought into this, and the technical hoops you've had to jump through are truly impressive. I like your note about casting shadows in the direction of gravity. It's such a seemingly little thing, but I can't imagine how difficult it would be to navigate without it.

Great job!
Tankou
Tankou9 Apr 2022, 20:26
What a funny game! I don't remember having played a game like this before. It is a unique and creative take on the topic, has a great look and you implemented nice sounds! For me the camera/ walking directions felt a bit confusing, but with some practise it got better. All in all a very cool game!
Marianoa213
Marianoa21310 Apr 2022, 21:13
Very funny game! I really enjoyed the game. You should make a sequel too!
twinkietalks11 Apr 2022, 18:09
this was amazing, loved the physics, the controls feel stiff sometimes but I like the concept
Flying Dog Fish
Flying Dog Fish11 Apr 2022, 19:22
This is a very unique and funny concept, and very well implemented too.

Only one thing is bothering me: who would eat a whole plate of dead flies? :smile:
QuadApe
QuadApe11 Apr 2022, 19:24
It's impressive how much you've managed to do just by yourself in three days.
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!
RosyMaple
RosyMaple11 Apr 2022, 21:23
I really like the graphics and concept, but the way the controls work with the camera made it way too hard to control for me.

I think I would enjoy it a lot more if you could control the camera
saintchristopher777
saintchristopher77712 Apr 2022, 01:11
Ha ha, what a weird game (in a good way)! A lot went into making it work, I can tell. My only gripe is that the camera/controls were a bit too wonkey for me to be any good at it. Did make it to the apple after a few tries, but still died. Great work!
Jchab12 Apr 2022, 21:47
impressive work here! i like the sense of humor
Joror
Joror13 Apr 2022, 19:10
Arr the great maw cometh! Fun little runner - had some trouble with the controls (they weren't very intuitive for me) - but got jumping/flying around.
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.
fueelin17 Apr 2022, 08:39
Super cool game! The concept and graphics were really, really good. I especially liked the sprinkle launchers, for whatever reason. My only complaint is that the controls didn't always work as I expected/work that smoothly, especially when the camera was actively changing perspective. Really nice work overall, though!
Kaldrin
Kaldrin19 Apr 2022, 20:54
Kudos for the gravity fields this is super cool especially in a self made engine, very impressive
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!
FabrizzioLK
FabrizzioLK21 Nov 2022, 18:06
Guys, have you thought about developing your own game? It seems to me that this is quite interesting. The problem is that alone it is very difficult to develop something of high quality. Or it will be an indie project. But it is better to turn to successful companies, they can significantly save money and time on development. For example, I often contact animation services to reduce waiting times. It's much more efficient.
nicolas Haudeare30 Dec 2022, 09:47
It looks amazing! Jackpot City is one of the most well-known online gambling portals. Due to the substantial Welcome Bonus, every new player has a chance to win up to $1,500. Despite the offer's onerous 70x wagering requirement, slot players will benefit from the bonus because all slots contribute 100% toward the requirement. In our JackpotCity Casino Review at https://casinosanalyzer.com/online-casinos/jackpotcitycasino.com, we'll go over the lengthy list of benefits that become accessible following a successful sign-up. This include continual advertising initiatives, secure banking procedures, incentive schemes, 24/7 support, and much more. The initial deposit serves as the basis for the welcome bonus. After carefully assessing the benefits and drawbacks, a decision will be taken.
JasonFountain
JasonFountain22 May 2023, 12:06
I usually think about several choices for the game that appear favourable to me. I recently discovered alternatives with bonuses due to a review on this site. This is in my opinion, are extra chance for a brighter and more fascinating game https://topcasinosreviews.in/casino/leonbet/ And I realized that you can also spend time with benefits and privileges.

Other games by @hilkojj

Found a bug?
Tell us on Discord