Game Dev in Progress… Day 29
Hello and I hope you had a wonderful weekend. Today, I finished around two more sections of the 2.5D course and starting on a third section. The two sections that I finished are the Player Movement and Player Animations. The player movement was almost exactly the same as the previous player movement except we don’t have any of the wall jump/ double jump mechanics. I ran into a weird bug which I will talk about that took me sometime to figure out. For the player animations section, I had to implement animations for the player as well learn more things on how to create them and the logic behind it. I also worked a bit on the Ledge Grab section and got some of it started.
The player movement section was quite easy until I ran into a bug where my player would jump occasionally when I press the jump button. When I pressed the jump button sometimes it would jump but mostly it wouldn’t. I put a debug message in the if statement that checked if I pressed the space button and if my character was grounded. It seemed that it wasn’t going into the method when I ran it and pressed the space key. I tried removing the check on the isGrounded and found out that was what was the causing the problem. I tried to enclose my direction calculation in the if statement too see if that worked and to my surprise it did. I still haven’t figured out why exactly this worked and not my previous code. I’m guessing it’s checking the isGrounded after I made the movement and thus because I moved it was not grounded? I don’t really know… Anyway it worked out and I had a similar solution to the one presented.
The next section was dealing with attaching animations to the player character. One thing that I found really cool is that we used a website called Mixamo in order to grab pre-build animations that work with our player character asset. Also thanks to GameDevHQ for providing us with the player asset and all the other ones as well! Using Mixamo, we can just download the animations and attach it to our player really easily. Of course there are some settings we needed to adjust, such as changing the Animation type to humanoid so it works for our human player. One problem that ran into was setting up the animations to switch appropriately. An example of this is when I jump it would immediately switch to running in midair. A solution to this was either make my jump smaller so the animation will play but not for too long it starts running or set it so the jump animation would freeze until you hit the ground. I chose the former since I don’t really need to make the player jump really high. Another example that I solved was that my animation would keep playing the idle animation and then play the running animation. The solution was really simple in that I switched of the Exit Time of the animations. That way it won’t play the animation until it finishes and switch to the next animation immediately when I run. You can see all the animations I setup on the picture above.
I worked a bit on the Ledge Grab Section but all I did was setup the ledge detection boxes for the ledge grab. I had no problem yet on that front. Here is what I have so far:
Other then that we had another workshop today where Al, one of our team leads, gave us a rundown of all the things we could with particle systems. It was a bit overwhelming since there is much you can do it but it was super cool and neat to look at. Al did really great in demonstrating the different particle effects we could come up with and also gave us a brief demo on how we would approach to using particles in our games. Overall it was good learning experience. Anyways that its for me, thank you for reading!!!
_
Cristian Aspacio