Hapman 🍩 The Inevitable by hilkojj

[raw]
made by hilkojj for Ludum Dare 50 (JAM)

hapmantitle3.png Try to delay your death, ⚡fly⚡ away from the Monster!

dibidabidab<em>2022-04-05</em>04-16-27_AdobeCreativeCloudExpress (3).gif

🕹️ 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

gravity.png 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

bite.png 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:

| gravity2.png | shadow.png | |--------------------------------------------|------------------------------------------| | Before | After |

All feedback is welcome!

Twitter

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🗨️

Feedback

Timo Strating
05. Apr 2022 · 10:05 UTC
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
05. Apr 2022 · 15:13 UTC
This is very bizarre and I love it.
cornsyrup
05. Apr 2022 · 15:15 UTC
This is impressive for a self-made engine! Great job, I know how tough it must have been working directly with OpenGL
wondry
05. Apr 2022 · 15:17 UTC
super cool concept, funny gameplay
kristinamay
05. Apr 2022 · 15:19 UTC
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 120213
07. Apr 2022 · 23:45 UTC
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!

![survivor.png](///raw/595/d1/z/4d776.png)
LDJam user 237588
08. Apr 2022 · 07:33 UTC
@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 😅
Xerxeres
08. Apr 2022 · 11:48 UTC
Very cool I love it. Not only good game play and graphics also the theme is on point.
mrScom
08. Apr 2022 · 11:49 UTC
This is a cool game!!! I liked everything in the game!
adncoach
08. Apr 2022 · 11:57 UTC
Great concept! I feel like camera rotations are a bit messy - are you using Euler, not Quats?
LDJam user 237588
08. Apr 2022 · 12:11 UTC
@adncoach Thanks! I agree. I am using quaternions and matrices, but [the code](https://github.com/hilkojj/flipkaas/blob/master/source/ecs/systems/CharacterMovementSystem.cpp#L171) 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.
Common
08. Apr 2022 · 15:10 UTC
Cool concept, wobbly game play.
LDJam user 240752
08. Apr 2022 · 20:31 UTC
Wow, you made really cool game!
BougieBirdie
08. Apr 2022 · 23:39 UTC
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
09. Apr 2022 · 20:26 UTC
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
10. Apr 2022 · 21:13 UTC
Very funny game! I really enjoyed the game. You should make a sequel too!
twinkietalks
11. Apr 2022 · 18:09 UTC
this was amazing, loved the physics, the controls feel stiff sometimes but I like the concept
Flying Dog Fish
11. Apr 2022 · 19:22 UTC
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
11. Apr 2022 · 19:24 UTC
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
11. Apr 2022 · 21:23 UTC
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
12. Apr 2022 · 01:11 UTC
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!
Jchab
12. Apr 2022 · 21:47 UTC
impressive work here! i like the sense of humor
Joror
13. Apr 2022 · 19:10 UTC
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.
fueelin
17. Apr 2022 · 08:39 UTC
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
19. Apr 2022 · 20:54 UTC
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
21. Nov 2022 · 18:06 UTC
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](https://ilogos.biz/game-art-production/) to reduce waiting times. It's much more efficient.
nicolas Haudeare
30. Dec 2022 · 09:47 UTC
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.
Claire Beck
20. Mar 2023 · 07:58 UTC
This game is so good you can play more interesting games with https://apkcima.com/es/carx-street
JasonFountain
22. May 2023 · 12:06 UTC
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.