“Left”, a new mini game and what I learned

Categories: Game, OUYA, Proof of concept, Unity
Play "Left"
Play “Left”

So I’ve use a few weeks making this small puzzle idea into a working mini-game. It popped into my mind over the Christmas holiday. I thought that it would be a fun little game, and I was sure that I would learn a thing or two. So here is what I did, and learned ๐Ÿ™‚

The basic idea:
A top-down game where you have to build a bridge to save some small cute creatures. But as always the idea changed over time and turned into something else.

The different planks used to build the bridge would be rotating and changing length at different speeds and amount. I figured that 5 different planks would be a fine.

Getting started:
So I started out by looking at the plank dynamics, I wanted to add planks at the end of the previous plank and in the same angle. But first, ONE, plank ๐Ÿ™‚ Keep it simple, right?

First run of LeftFirst run of Left

Ok, that worked ๐Ÿ™‚ So now, adding more planks.

Getting planks to align, and stay there:

Getting the planks to appear at the end of the previous plank wasn’t ย a problem, except for one out of about 10 planks,ย so it was very hard to debug. ๐Ÿ™

Misplaced Planks
Misplaced Planks

But after recording a video of the game, I could see the planks was placed at the correct position, but was then pushed in the first frame.. Ah, the physics engine! Problem identified ๐Ÿ™‚
All the planks have a collider and a rigid body to be able to collide with the walls, the goal and to be able to be use the it for the death sequence, where all the planks fall to the ground. So I couldn’t just remove the rigid body from the planks.

The solution:

I simply chose to lock the position and rotation every frame. ๐Ÿ™‚ Well, simple but wasn’t easy to implement because of the way I had implemented the plank control, but it worked. And then every thing was locked into the right place ๐Ÿ™‚

What did I learn:

  • 2d and 3d physics engine doesn’t act the same. Colliding rules are different, follow link and seeย section “Collision action matrix” which works for 3d, but (and now I can’t remember the other link, sorry) this isn’t true for 2d.
  • Dynamicย loading of levels
  • Got better at using animations instead of moving logos in code ๐Ÿ˜‰
  • Deploy to OUYA and very basic OUYA input control (one button).

Things to do better:

  • If I want my POCs to be playable, make some simple object relation layout BEFORE coding a single line ๐Ÿ™‚
  • Use more object pools, instead of creating objects on the fly.
  • Find a better way to handle the growing switch/case section in the game manager.
  • Graphics.. I started looking at blender again. Did the beautiful stars in it ๐Ÿ™‚
  • Write posts on the way instead of having to remember what I did after the fact.

Hope you enjoy the 10 levels of this mini-game “Left” (named as such, asย  you have a tendency to turn left).

Now, go make games! ๐Ÿ˜‰

– Henning

Screenshot of main screen, the 10 levels and the game completed screen.

All levels of Left
All levels of Left



    Leave a Reply

    Your email address will not be published. Required fields are marked *