Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey guys! I'm back and unable to sleep haha. But using this extra time I at least got the enemy and player behavior down to the point where I can start the real level building. I'm thinking the only attack is going to be jumping on the enemies like in Mario (sans fire flower). And as for health 1 shot, 1 kill for both player and enemy.

Link to video

What I did was made 2 state machines. One for the player and one for every enemy in addition to what the corgi engine provides. The player's is based on the current position, if your new position is lower than the old position you are in attack state, everything else is considered vulnerable. For the enemy, it checks the state of the player it collides with and if it is in attack mode the enemy dies, otherwise the player restarts the level.

Hey, sorry to bring you back to three days ago, but I had a quick question regarding the collision and state machine system you have for your character's attacks - from what you described, it sounds like what you need for a successful kill is for the to be in attack mode, which is moving downward. If you collide with an enemy from the side while in kill mode, does it still kill the enemy? You may have to, once you know you've collided, check the positions (plus hitboxes) of each character to make sure the player is above the enemy. Obviously I can't see your code, and you probably thought of this already, but hopefully this helps?

Other than that, awesome job! You're making a lot of progress in such a short amount of time! Also, I like the FPS counter in the corner there - priorities, you know? Haha!

Yeah for now it will kill them, but that's one of the polishing details I hope to get to later since I abstracted the enemy script for all enemies changing it will hopefully be easy haha. But that's probably the method I was going to go with, either that or add an extra box collider above their heads that acts as a trigger lol. Thank you though, since you suggested it I'll probably go with the checking position solution!