Dev sessions 1-3: From the ashes


itch.io says my last update was 128 days ago, and its correct. Due to a large amount of other things I needed to take care of and my laziness I couldnt get to this project when it was relevant. So here I am finishing it now :p.

session 1

I started by creating a tileset as the game world, same as 2D game kit does it. This was pretty easy and didnt take much time to set up. Next was a character controller. At this point I realized that making the game feel good to control is a monumental task and so after fighting a bit with unity's physics system I ended up with something usable. 

I made it so pinokio's nose can rotate 360 degrees around his body on a hinge joint powered by a  motor. The nose itself is a very light rigidbody with a material whose friction is set to max. this  allows the nose to "stick" to other objects and you can use it to get into places otherwise unreachable.

session 2

I implemented functions to rotate the nose on demand and wired them up to the character controller. pinokio can now move left(A), right(D) and  move his nose clocwise(W) and counter clockwise(S). 

Next was to implement the nose poke. This is an attack that quickly extends the nose and then retracts it "poking" whatever stands in its way. I did this by smoothly interpolating between 2 scales of the nose. Since the nose is attached to the  body (duh) and Im using unity's physics system, every time you poke, it also moves you backwards a little, which I think is nice and gives the move some "weight"

session 3 - after the break

Today I started by examining my previous work. I improved the nose mechanics by making some hard-coded values dynamic, which makes the code a whole lot better and easier to work with. 

The next step in my list of tasks was to implement the damage system and then get some enemies to damage. Since the beginning I was planning on using the Damager/Damageable scripts from 2D game kit, but after looking at them I realized I would need to include some other stuff from 2d game kit and I dont need all of that functionality, so I made my own. 

My damageable script uses the OnCollisionEnter2D method and checks wheter the other object is a Damager, if so the damageable object takes the appropriate amount of damage and dies if necessary. 

When an enemy dies, I dont want them to just dissapear,  so this is what I do to make it more interesting. When a damageable object dies, they get moved to another layer so as not to collide with other objects. Then it gets a force applied to them in the direction opposite of what killed it. This makes the enemies fly away and ragdoll for a few seconds when they die and looks really funny :D. 

Get Pinokio's Redemption

Leave a comment

Log in with itch.io to leave a comment.