3/10/2013

Sprint 002 is released!

Blocky Brothers second release is live today. Making its Mac and Linux debut! I am very happy for any feedback from Mac or Linux users as I blindly trusted in Unity's build system.

The gameplay is still very limited. However you can win, you can loose, you can collect points, you can die, and you can kill.

Lessons learned: Once you start making a game, even if it's a cover of an existing one, your mind starts to come up with new ideas. I hope that I find to make some of these come to live in one of the next releases.

Play in your Browser using Unity Web Player

Download zipped binary: LinuxMac, or Windows

Features included in sprint 002
  • Advanced movement (in air control)
  • Killing enemies
  • Splatter effects
  • Death by touching enemies
  • Pits
  • Death by falling down the pits
  • Time counter
  • Death by running out of time
  • Live counter
  • Scalable GUI
  • Sound effects

Upcoming features with sprint 003
  • Moving enemies
  • Coins
  • Coin blocks
  • Extra life per 100 coins
  • Text bubbles

9/26/2012

Off-topic: Append goo.gl click statistics to shortened links

Today I learned how to append goo.gl click counts to shortened URLs. All you need to do is add this jQuery snippet to your site and mark all shortened links with class="googl".

Example link, dynamic click count in parentheses:


Check out the code at JsFiddle:

9/25/2012

Finetuning character movement

At the end of Iteration 001, the character movement felt odd in more then one situation:

  • Character got stuck at the of blocks
  • First jumping and moving while in air did not work
  • Character "floated" along ceilings while jumping
  • Movement did not ease out but came to a sudden stop once the controller was released
Let's start with this problems caused by "not reading the manual"... again.

When the character got stuck at the edge of a block it looked like this:


A close look in the scene showed, that regarding Unity everything was quite in order. The character controllers capsule rested savely on the edge. However the little blocky man refused to move even the slightest bit to the right.


The solution to this problem was to simply adjust the "step offset" property. A higher offset allows the character to climb steeper steps. So movement to the right was blocked because the default virtual leg length of one was far to short for my scene. More information on can be found in the Character Controllers API docs.

A step offset of 10 works quite well
The rest of my evening was consumed by finetuning the PlatformerController.js borrowed from the 2D Gameplay Tutorial
  1. In air controls did not work as I expected. I added two additional properties in order to set a minimum and maximum in air velocity:

  2. Collision with a block above did not end the current jump as vertical speed was not set to zero. The inversion of vertical speed on collision did the trick:

  3. My first iteration on character animation did not include the adaption of animation speed based on movement speed. I fixed this writing two additional lines of code and once again loved unity for it's simplicity:

I end todays post with one of my favorite quotes:

Dans ses écrits, un sàge Italien
Dit que le mieux est l'ennemi du bien.
~Voltaire

Having said this, character movement feels good enough for me for today :)

9/11/2012

Sprint 001 is released!

I am happy to announce that I finally finished the first iteration on Blocky Brothers. I.e. the first playable version which acts like a real game. It has a beginning, it has music, it has a logo, enemies, lots of jumping and even a finish condition followed by ending credits!

However do not expect too much :) It is only the first vertical slice with many more bits to follow.

Lessons learned: Making games, even the tiniest ones, includes a lot of work. By now the least part of it is about coding.

Ok, thats enough for today. No time for documentation at 2 AM.

Please note: I haven't yet figured out how to scale everything correctly. I.e. the resolution is fixed to 1000x875. However this shouldn't be a problem for most of the displays out there...

Play in your Browser using Unity Web Player

Download zipped Windows executable

Features included in iteration 001:
  • Sprite artwork
  • Level 1-1
  • Goombas
  • Basic movement
  • Basic collision
  • Sprite animation
  • Sprite fade effect
  • Heads up display
  • Scrolling credits

Upcoming features with iteration 002:
  • Advanced movement (in air control)
  • Death by touching enemies
  • Pits
  • Death by falling down the pits
  • Time counter
  • Death by running out of time
  • Live counter
Special thanks to all people doing great work and sharing it under Creative Commons:

Font

BIT.TRIP SMALL by FerreTrip

Music

Satisfucktion by Ozzed

8Bit Traveller by Floating Isle

9/04/2012

Fade Orthello sprites from solid to transparent

Todays task seems to be fairly simple: I want to put a logo sprite at the beginning of level one and fade it out as soon as the game starts. Placing the sprite is not a problem but finding the way to adapt transparency using Orthello is not straight forward... at least if you do not bother reading the manual :)

My first guess to grab and slide the "Alpha" property produced a warning:
Orthello: Alpha value can not be set on this materialReference!
Sprite material properties
Unfortunately googling for "Orthello materialReference" did not (obviously) produce any useful result. Just the well known "Did you mean: othello ...".


Note to self: Never name anything within the reach of one Levenshtein distance of any popular word if you do not want to loose customers due to Googles suggestions.

Ok, then I'll trial and error my way towards success:
  • Unticking the "transparent" checkbox → Ugly black borders where the transparent sprite sections used to be
  • Ticking the "Additive" checkbox → Sprite color is added on top of background color
  • Changing the "Tint Color" → Another warning
Finally replacing "Material Reference" transparent with the word alpha did do the trick. As I found out afterwards, there is a quite good explanation on the first page of Orthellos manual which also happened to be the second google hit above...

Lessons learned: RTFM (at least page one) even if it's late in the evening!

In short: There are named material references which can be assigned to any sprite. It's also possible to define your own material reference. The one named "alpha" modifies the sprites transparency according to the "Alpha" setting as well as the color tint according to the defined "Tint Color". I left the tint color blank, i.e. used a medium gray, and was now happily able to fade my sprite in and out using the "Alpha" slider.

Creating the script to do the fading was no real problem compared to understanding the property handling:

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: