Archive for August, 2009

Cyclo Maniacs

Tuesday, August 18th, 2009

CycloManiacs_Thumb

CycloManiacs is the most recent release from LongAnimals and RobotJAM

It was sponsored by the nice guys over at Kongregate, after getting quite a lot of attention from other sponsors.

RobotJAM and I always have a lot of trouble between games deciding what to do next. We had noticed that moto-cross games seem to be pretty popular, so we thought we’d knock a quick one up in a week or so just to see actually how many plays they generate. We’d done KCA Rush for Addicting Games, but that was a contract job, so we couldn’t really put much of our own gameplay in to it.

KCA Rush from Addicting Games

KCA Rush from Addicting Games

I’m not quite sure what happened though, because the next thing we knew, the game now had 20 different riders, 26 levels, and 70 achievements to unlock. This isn’t exactly what we had in mind to begin with.

CycloManiacs Level 1

CycloManiacs Level 1

 

In the beginning we weren’t sure what kind of game it was going to be, whether it was a race, time trial, or indeed a dirt bike game.

I built an editor in which to place objects to define the surface.  In very early versions we defined surfaces from sprites with fixed-angle surfaces so that we could place them together easier. We also had some girders (some of these made it through to the final game). The look of the road surface was originally going to be monochrome.

I got the rudimentary bike physics working very quickly, and Rob supplied a graphic of a creature on a bike to supplant my programmer-art. Then we spent some time trying to build tracks.

This didn’t go well at all. The editor was fiddly to use, and even with the ability to snap objects together it was a slow process. And furthermore it was difficult to get the collision joining up correctly with rotated objects.

Rob then had the idea of defining a floor section instead of making the track out of ‘bricks’. So I added this to the editor and knocked a few tracks up. The difference was amazing. The tracks worked so much better, and the time taken to create a level went down drastically. We combined this with overlaid objects (like ramps, girders, and rocks) to make interesting levels.

Picking objects from the library

Picking objects from the Library

… 

Laying down trees

Laying down trees

With the track editor now worked out, this led us away from doing dirtbike-type levels and on to faster race levels, as we could make the longer tracks with ease. However we decided to keep both types of tracks in for variety, but to concentrate more on racing.

We started thinking about how the AI would work, and it didn’t take too long to decide upon recording ourselves playing the levels and playing that back, with variations, for the AI. I wrote a quick recorder to check this out, and it turned out to be really nice with a few bikes on screen. (even though they were all the same) Quite a change from the usual dirt-bike game.

So after this became a definite feature, we both got more excited about the game, as we began to see it’s potential. Rob decided that cycles would be more fun than motorbikes (how right he was) and came up with a new design for RobotJAM riding a bike.

The flash movieclips for this are made from multiple parts. Two wheels, a bike frame, incorporating legs, and an upper body with leaning animation. This is so that we could lean forward and back independantly of the speed of the legs cycling movement. The wheels are added on as separate physics objects.

RobotJAM character in pieces

RobotJAM character in pieces

So now we had a rider and a track. What next? We decided to make a few cute characters on different bikes. The differences between the cycles would allow them to have different physical attributes, therefore different handling properties. We were excited by this as we thought it would open up the structure of the game. It would allow players to experiment with a variety of bikes to find the ones they like, and it would also allow us to be more free with the level design, pushing the faster and rockier courses.

Rob set off making a bunch of characters, and I got on with some level design tests. Because it was extremely quick to make courses, we soon had around 10-15 test levels in place. I tried to make all the variations I could think of. Long and straight, bumpy, big hills, uphill, downhill, rocky, etc.

With these levels in place I could start to tweak the bike physics to match the surroundings. Initially we had the gravity settings way too low; everything was rather floaty. I doubled the strength of the gravity and suddenly it started to play a lot better. The bikes spent more time on the ground.

Rob presented a great set of characters and I built the system to handle mutiple player bikes, so that we could try them all out, and sure enough, the handling was different on each one. We had Elvis on a chopper, who was very good at wheelies, and a helmeted rider on a racing bike who was good at fast speeds.

As it worked so well Rob went off and got carried away making loads of new characters in record time, and I got on with the gameplay. We were both really enjoying this.

I tried a few systems out for increasing player attributes and giving turbo boost etc. In the end we went for the idea of doing stunts to build up boost. This went through a few iterations, and required a lot of tweaking, but we were very happy with the result.

The player gains stunt points for doing wheelies, getting air time, and doing somersaults in the air. These were all balanced against each other so that the more difficult and risky ones were generally more rewarding.

This is a standard gameplay trait that I’ve used for many years. Any player should be able to have fun, but those who want to take more risks should be rewarded for their efforts. In this game you’re constantly faced with decisions whether to do one more forward roll, or that extra bit of wheelie.

The next bunch of characters included a couple of odd bikes with front wheels larger than the back wheels, so I added another stunt to the mix – front wheel wheelies.

We got to thinking about level structure, and pretty well agreed from the start to have five worlds each containing a number of levels. Rob came up with Dunes, Outlands, Volcania, City, and Lunaria, and started knocking up parallax scrolling backgrounds for each.

We decided to have one static layer and two layers of parallax looping backgrounds for each level to give it some nice depth.

The five main world backgrounds

The five main world backgrounds

Flash can handle multiple parallax layers pretty well. The two furthest backgrounds are drawn by blitting a large bitmap, which in Flash is very fast, while the nearest layer uses the Flash polygon-draw commands. incedental sprites such as cactii or rocks are placed on top of that.