First Steps


It kinda looks like a game.....

If you squint your eyes and tilt your head...then it sorta looks like a thing you can play!

And I'm very happy with that!

This week took a pretty significant leap forward. There are enemies, attacks, and DEATH!!! The easiest part was actually the enemies. Their movement is actually copied from the grappling hook code, so they move in a straight line towards the player. They're pretty simplistic right now, but functional enough to leave as they are.

The major issue I ran into this week was timing. Working with timing to add hitstun to the player and control the attack "animation" (even though it's just a red box right now), was challenging. What I ended up doing was using two different ways of keeping time. For the hitstun on the player, I added code that started a timer for a certain amount of time (currently 0.2 seconds) and disabled moving the player until that time is up. After some tinkering, it worked without too much trouble. The player's attack though...that DID have some trouble. I was really excited to work on the attack because it turns out you can actually edit hitboxes from the animator. So, I can set the size of the hitbox to change to exactly the shape I want it to be depending on the frame of the animation. This is great for syncing up attack hitboxes with animations that are already completed. EXCEPT IT DOESN'T FLIP!!! The hitboxes don't change direction when the player sprite flips. This sent me on a wild googling spree which eventually culminated in me changing the direction of the hitbox in a similar way to the grappling hook and only using the timing of the animation to turn it on and off. The worst part is that if I do get a proper attack animation, I will probably have to go through this all over again.

The funny thing about this week is that what is likely going to help me the most going into next week is the reset button. That tiny little thing that took only about 30min to program could be the key to adding more levels. The reset button uses Unity's built in scene manager to load the scene from its original state, before the player starts doing their thing. I think that if I just load a different scene, add in a strategic fade to black, then that is essentially a "next level". I'm hoping that it won't take much to get a level progression program going, but I won't hold my breath.

TL;DR - Telling time is hard, bats are just purple grappling hooks, and the reset button is all-powerful

Get Lancer - In Progress

Leave a comment

Log in with itch.io to leave a comment.