Saturday, September 8, 2012

Mistakes

Working on the game today and getting over a cold might have lead to all these bugs in the code:
  • Trying to set first element of array after changing the starting position to the second
  • Checking if an enum is less than zero rather than checking an int
  • Wrong order of operations, added more brackets
  • Check if valid, if int is greater than zero, when zero is valid
  • Not breaking out of a recursive loop when going deeper (This one has been in the code for a while, never noticed because I never needed the collection it was returning to be in the right order before)
  • Image that was to be rotated was the wrong way around to begin with
  • Playing an animation over and over when it was already playing
Sometimes it feels like there is some voodoo going on that causes these bugs but when finding their cause it can be funny.

Tuesday, August 28, 2012

iPad test

I'm using cocos2d v1.0.1 to support older iPhone devices for the Gem Jam game. This version dosen't work on the third gen iPad, it just shows a black screen, this is because the open gl depth is set too low for the iPad3's resolution, detailed in Spencer Ho's blog which also shows how to fix it easily!

So here is Gem Jam at iPad retina resolution with the same sized gems as on the iPhone:


It's a bit crazy, I think this might be a secret mode and have some bigger gems for the iPad.

Monday, August 27, 2012

Ludum Dare

This weekend I decided to make a game for the ludum dare competition. I didn't get to spend the whole weekend on it, but I think it went ok. Setting up a new project took me a while and this was one of the things the site said should be done before hand, oh well.

The theme was evolution and I wanted to make a game where fish would evolve into humans some how.


You tap on the fish to make them jump up and attach to the headless suit guys to 'evolve'. The game also tracks how many evolutions per minute you achieve.

I think I should have built a web based game instead of iOS as it would be easier for people to play it.

Check it out, it's called 'On the Origin of the Species the Game'.

The game: http://bit.ly/NOYEoV
Source: github
OSX simulator build: github (zip)

Sunday, August 12, 2012

Sounds

I've been playing with the pitch of the sound effects. At the moment there is a single effect for the gems smashing but I've put in some things to change the pitch so it doesn't sound the same every time.

Start off with a pitch a bit lower than the default
rase it a bit the longer the line is
rase it a bit more if this is the second line in a chain of lines
add a bit of random so same length lines don't sound the same

It sounds better now than playing the exact same effect over and over.

Saturday, August 4, 2012

Lightning

I added some effects to the lightning power-up in Gem Jam.


There are a bunch of lightning tiles placed together when the screen goes dark. There was a lot of checking angles and if the lightning was forked. It was also difficult to check the which gems were affected because I play all the gem effects when iterating through the grid to remove gems and make them fall down. The cause of them exploding wasn't stored.

Wednesday, July 25, 2012

Hexagons and Night Owls

I went to night owls last night to work on the game and to catch up with friends.

In Gem Jam I wanted to re-write the code of the lightning power-up. Before it made lines of gems to destroy in groups of three across the grid and would fork, each line would explode one at a time, and not always in a direction that was useful to the player. It also didn't look very much like lightning.

I decided to change the way it worked first by finding the maximum length line to the edge of the grid from any gem. Since the gems are stored in a 2d array but displayed on a hexagonal grid I tried to draw up a diagram of how the gems sit in the array and which ones are next to each other.



This didn't work and made everything too complicated to follow, so I simply counted the gems in game and tried to come up with some rules that would fit. Most of the time I have used different code for odd and even columns, this can be a bit tedious because it's usually just adding + 1 for odd columns. After figuring it all out it worked for half the grid and I was getting tired and not wanting to figure out why just wanting it to work. But in the morning, after going over it again for a few minutes and changing a few things it worked! (This seems to happen a lot).

Friday, July 20, 2012

Videos from ifest 2012

Here is a video of interviews from ifest 2012. (I think I look weird)

There are a number of awesome games being shown such as

Part 2 has:

There were a bunch of other games that weren't in the videos as well.