Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Devlog 2 - Another day, another progress?.............. (August 2nd)

So today kinda sucked for me for the most part. Not cause of the gamedev stuff, but I woke up with a bad headache and it lasted most of the day. I didn't start work until around midnight. I did end up getting a decent amount added. Still a sucky day cause of the headache. Anyway, onto the development.

An enemy to be. (Art and Code)

At the end of the day yesterday, I had the player being able to do an attack. Nothing fancy, but still, I can kill TRASH CANS!!! THE MOST EVIL SCOURGE!!!!!!.... Ok, so not really all that evil, but they do have the enemy tag so they can be hit. BUT I need an actual enemy, so I started the day making a simple enemy that "fits" a city environment like the mockup I made.


Nothing advanced. just two walk frames and a take damage. Technically these guys will never not be walking, so no need for an extra idle frame. After the basic graphics I start wiring up the animations in unity. I can actually copy almost all of the code from my player script, and just replace the movement input to instead get the direction of the player (player position - the enemy's own position, normalized, then multiplied by speed). This is a pretty dumb ai at this point. Most games of this sort will have the enemies walk in a straight line only, vertical or horizontal, and normally won't allow multiples of them to attack at the same time. At the moment, I don't have time for the advanced stuff. I just need to get a full game loop happening. Anyway, enemies are added.


What about the player? (code and animator work)

Yeah? What about them? Oh.... you want them to take damage too? Ok, at this point, the player actually can take damage, he just doesn't show it. Also, he can punch over and over super fast. No delay what so ever. The enemies also have a random bug where they do the damage animation twice when they die. The player was simply adding a timer after swiping before he can attack again. Since it's already taking damage, it's simply adding some code to make the player stay in place and add the animation. 

The enemy bug took a few short minutes to figure out. Ended up being that in the animator, I had the flag for takingDamage and isDead both being set to true. So it was randomly selecting between the take damage animation and the die animation. All I needed to do in the transition from the any state to the take damage animation, was to add in the flag for if isDead is false. Fixed the problem.

Add in a health bar and you have a decent looking game now!


Get a hold of yourself! (quality upgrade)

It's coming along nicely now. There is a little tiny bug I have to figure out. One where it looks like the enemy is sliding when they first start moving. I think that should be a simple fix of swapping the walking animation frames around. Past that, when attacking, the little spirit feels a little off. Why? Well, I think it has to do with swiping at the enemies, but having no hands. So, I take the hands from the enemies and add them to the player. Do a little animating with them, and they look pretty great. :D

I haven't decided yet, but at the moment, the hands are actually doing subpixel movement and are smooth and such, though it looks all pixely like it should. It's cool cause it adds a bit of dynamic visuals to the player. Every time you move, the hands will animate slightly different depending on where they are in the subpixel. The problem with this is sometimes the animation will have an extremely short frame due to rounding being  like .499 one rendered frame, and .501 the next, then back to .499 again. This kind of bothers me, and if I go back and make the curves be a constant so that the hands instantly move, it will look more repetitive. Not really a major problem since everything else is already that way, but sometimes being dynamic is cool. Anyway, here they are with hands!

Final thoughts of the day.

I'm pretty much decided on keeping the little spirit as the main character at this point. As far as story, I'm possibly going to try to make basic cutscenes where the spirit is playing with something and the bad guys break it in some form or fashion unintentionally and the spirit just gets mad and starts taking them out. Don't know. There's also some quality of life that needs to be done as far as animations. At the moment, both the trash can and the enemy when dying are kinda just scaled down and faded out. I should probably have an actual death animation. I also need to work on chopping up the mockup and adding environmental pieces. Would also be nice to add specific animations for the different character's attacks, instead of a generic swipe for everything. I think my current minimum requirement goal is 2 enemy types, a boss, and getting the entire game loop finished. As in win/loss, exiting properly, respawn life, menus, etc. If I get a super polished first level and it be an actual level, I'd be super happy with that.

Anyway, that's it for today. Hopefully I don't get a bad headache over night again XD