7/26/2012

More sprites

The player controls are now set and it's time to move on. Time for some more sprites. Aside from the castle I now should have all the static sprites ready needed to create level 1-1:
Breakable Brick
Large Bush
Small Bush
Medium Bush
Pipe Junction
Pipe
   
Pipe Part


Question mark Block


Finish Flag


 The next task will be to create some enemies...



7/21/2012

Controlling the character

Next step ahead is a controllable player character. Part three of Tims tutorial explains how to add an animated sprite to Unity using the Orthello 2D framework. So it's once again time to start with some graphics. Hours later I ended up with a sophisticated walk animation cycle:
Mother of all walk animations
Now it's finally time for some coding. Unfortunately I did not manage to get the tutorial script running for my level design. I do not use one dedicated block as bottom border but instead wanted to build my level using many sprite blocks put in line with each other like this:
Player standing on two layers of blocks
What the tutorial script does is the following:  Cast two short rays downwards, one on each edge of the sprite, and check if a ground block was hit. If yes then the falling state is set to false and player is positioned on the ground:

But as there are two layers of ground in my level the sprite kept falling after being positioned on the ground and ended up walking underground.

I spent some frustrating hours trying to figure out a solution using the distance to the ground below or above (if already underground), and finally had to give up for the night.

The next evening I tried something different. Why should I even bother casting rays if Unity already offers a full blown collision system. Yes maybe this is overkill for 2D gaming, but I desperately need some success.

I ended up using a Character Controller and some input from the 2D Gameplay Tutorial to make my little red fellow walk and jump... finally:

7/16/2012

Sprite Works

Today I started my quest to learn Unity with this great article series: Make A 2D Game in Unity3D

Once I got the initial setup ready, I reached part two and realized that I needed some sprites to get started. As I am not on my way to get a pixel artist I put some constraints on this part of game development:

  • Sprite resolution for basic building blocks 64x64 pixels
  • Gimp brush sizes allowed 16x16, 24x24, 32x32, and 64x64
  • Basic animations only
I produced the first batch of sprites using my beloved Gimp in no time :)

 







Doesn't this look familiar?