Back in Gear: Project Spikes and Sprinting

After around 2 to 3 weeks of being gone, I have officially returned to my blog and have PLENTY to post about. Project Ikigai is started, designed, and underway, and the entire group is slowly coming together to start the first implementation sprint.

I have spent the past couple of weeks very engrossed in my project design and code that I have forgotten to be talking about it on here, SO, let me tell you what I’ve been up to. Also, expect more in depth posts about smaller parts of my process up to now. This is just meant to be an overview of the past few weeks.

I.
Since completing my first data model designs and my enemy AI state machine, I tried out some small implementation. As a class, my senior project peers and myself all attempted small spikes in our design to get a feel for the project. For Ikigai’s gameplay, the first real goal for me was to make sure the player could move their character: walk left and right, jump, possibly run, and most importantly, not fall through the ground. Since this is a very common implementation in 2D games, I looked for tutorials online. This was not only meant to be a way to get some code finished, but being my first time using Unity, I was hoping to learn how C# and Unity worked together so that I could begin coding on my own.
So I began my own little tutorial sprint and implemented all I could over the period of an entire Saturday.

efforts.haveFruits = false;

I had about 600 lines of code for my player controller script that, essentially, did not work and I understood absolutely none of it.

What I did realize, however, is that random tutorials online by people who are also beginners aren’t always the best place to go, and as long as you know the correct terminology, it’s easy to find anything online. At the time, I did not know that most game developers usually make one script that handles all of the code that controls the player that is usually called, who would’ve guess, a *** Player Controller ***.

When I actually searched for a player controller tutorial, I found a nice, basic, and comprehensive video on Unity’s tutorial site, which I followed to the T.

Since then, my code and design have changed GREATLY. Plus, I am finally beginning to understand how to implement my ideas more and more. My current player script may have changed a lot since then, but I do have a good foundation to start on.

II.
Since starting, my player can now do quite a few things:

  • Not fall through the ground
  • Not walk through other objects
  • Walk left and right
  • Walk on inclines
  • Run while holding ‘z’
  • Jump after pressing SPACE
  • Walk and run a bit slower on an incline
  • Has stamina bar
  • Loses stamina when running
  • Gains stamina when standing still
  • Can’t run or jump and walks slowly when stamina depletes
  • Gains stamina slowly when tired
  • Invoke camera to zoom out when running
  • Animations exist for all of the above

And I have some possible glitches:

  • The camera zooms out when running, but zooms back in when jumping while running
  • Jump force remains the same while walking and running
  • The player gets caught on some collisions while jumping or falling

Here is a quick video demo of how it plays:

(Note, the sprites used are a from a downloadable asset library with Unity that I am using for testing. These will be changed considerably in the future.)

III.
I have completed a comprehensive design document that goes over my scope, plans for the semester, improved data models, improved state machines, all game mechanics, story concepts, etc. I will be talking about different parts of my design document as I continue blogging.

In the near future, please expect descriptions of my process, code, story design, algorithm design, and anything else that has happened in the past few weeks.

I have many plans!

Leave a comment