Boss Battle Mechanic
Boss Battle mechanic
basiclly for the boss battle, all im doing is using the rules that i set up in the in game tutorial, which is kinda meta in that its the tutorial level of a game, thats supposedly teaching you how to play that game which spoilers,
(doesn't actually exist, thats the main lie of the game, (i had this idea for another feature, being an animation at the start showing a bunch of locked levels starting at the end and scrolling back to the tutoral before entering it.) which would have made the twist a bit better and be more relevant to the theme, but it got dropped due to time constraints and me wanting to actually get some sleep that night)
but it itself teaches you about the mechanics of the actual game (which is basicly just the boss battle) being, hitting the bottom of the text hurts i, that the text is a physical object. and can be bumped into, using these 2 rules i was able to make the text apear in a random position around it and push the player around. of the players fast enough he can get back and hit the text hurting it before it dissapears,
the narrator just wants a friend and doesnt want you to escape so you cant actually get hurt at all. which gives the story a more impactful feel because you aren't having to read the same line of dialogue over and over again.
basicly all the code used to run the boss battle, its quite simple.
when the narration is hit, which is just a on collision enter function it calls the hurt narrator function which shakes the camera decreases the health and makes the text say oww or something like that from a list of hurt texts.
and attacking the player is as simple as choosing a random direction making the text "look" in that direction, making sure the text expands towards the player. then uses some trig to find the distances to offset the text by so its still able to hit the player without spawning in it.
the narration ingame text had a hitbox on it that adds a bit more force to emphisize the inpact with the player.
also if you get hit towards the portal and touch it, ive got it set up to tell you something while punching you away from it, as spoiler, there is only the tutorial level created.
once the health is depleated it hides the game and leaves the end text onscreen for a couple seconds before closing the game. (not the best ending i know, i was tired and running out of time)
Get The game is a liar
Leave a comment
Log in with itch.io to leave a comment.