Finally after some sleep I thought I’d provide a Postmortem of CaptureZ.

I realized LD was on this weekend a few days ago and was annoyed that I was supposed to be travelling for the best part of 24 hours over the weekend. As it happens, 8 hours after the LD48 had started I found out my trip was being delayed, I “ummed” and “arrrred” for a few hours and then finally 12 hours in I decided to give it a shot.
The Concept
When I thought about “10 Seconds” as a theme and counted my skills (which don’t include much in the way of 3D modelling) I wondered about producing a ball based action physics game. But what can you do in 10 seconds? I replayed in my head a bunch of old arcade games I’d enjoyed as a kid and came up with “Painter” and “Amidar”. Painter had you fill an area of the screen by rolling a paint roller into empty space – the challenge was would an enemy hit your incomplete line before you finished and kill you. Amidar was similar, the boxes already existed and when you completed one you got to chase the enemies that were otherwise chasing you (a bit like Painter crossed with Pacman).
So I came up with the idea for CaptureZ, “Painting” a fence in the world, that if you completed it within 10 seconds would become a permanent part of the geometry of the level. To give you a challenge I created some “animals” that you need to capture inside a fence and had the idea for a flying saucer to beam them up.
Given the voting criteria, this is what I did with the concept:
- Innovation – I haven’t ever seen this idea exactly and I thought the old game modernised and twisted might be nice
- Fun – people like to change the environment they are in, this is an interesting way to do it high speed movements and interesting AI behaviours (more later). I also added shooting.
- Theme – well a 10 second fence made sense, I wanted to make a game with a longer level play time but still incorporate “10 seconds” as a core thematic element
- Graphics – I’m no artist, so building things out of basic shapes and using a few photos and a lot of plain textures made sense to me
- Audio – I decided to use a sound effects generator and Garage Band to create a composition that had a rock feel, but more “Country” to follow the general cowboy feeling of wrangling animals
- Humour – I added comedy animals and rather silly spaceships that wobble and beam up the animals. A few home recorded raspberries and other suitable noises added to a general sense of comedy.
The Controls
Probably the worst mistake was choosing “QWE” as the control system. My fingers fall to those keys easily and provides the other hand for the mouse – sorry “Lefties” and everyone else who hates it!
The other thing was providing direct input to the physics system in Unity, given the amount of time I did the best I could – the plan was to have you able to choose different “balls” that had different steering characteristics, but I ran out of time. The one I have is a little uncontrollable to start with (though I’ve got used to it and quite like it now, it isn’t great because the first feeling is it not being quite right). If I develop it further this will need a day or two to perfect and get all the balances right.
The World
I needed to make a world for my creatures, the fastest thing I could think of was an island built from a Unity terrain with a sphere for a skybox (with a shader I wrote to just show the back faces) and a plane for the water with the same texture as the sky, but some code to make it “flow” and some colour modifications to dull out the texture. I took a picture for the sky out of my apartment window, I didn’t have anything to make it seamless with though in the time – obviously if this wasn’t LD48 I’d have used some skydome I have the rights to use.
So I built a terrain with a high plateau, smoothed it, played with it and textured it with mostly solid colour textures and a smattering of a texture derived from the stucco wall outside my apartment.

The Art
I’m no artist so I made everything out of Unity primitives and textures I took from photos taken on the day. The only other thing was the Unity terrain. I’m generally quite happy with the result, but a pro game would have used some additional assets like trees, grass etc.

The Fences
The next thing to do was the fences. These are dynamically constructed from the movement of the player which records line segments (creating a new segment when the player changes angle), a separate process then turns them into an open bottomed mesh with end caps. I chose a reflective shader, fiddled with the colours and created a cube map from the empty island. The construction of the mesh code took a few hours, but I’m happy with the result of that. I am less happy with the closing of the fence, which could be made much better with only an hour or so of time (to move the points into a smoother group especially where one segment is long).
The AI
I wanted many types of animals, the system allows for this but I only had time to realise 2 before the competition closed. I build foragers and predators. To give the AI some help I specified certain areas on the island that foragers can find food, that they would run to in the event of danger and that predators would use as a lair.
I’ve been wanting to create a system that created emergent behaviour for ages and have read a number of papers on flocking and swarm simulation so I decided now was the time to put that to work.
Each animal can have one or more steering behaviours that provide input on the direction the creature should take. They can apply a “weight” to insist on a direction and they also provide an idea speed. The animal takes the combined steering information and creates a steering vector and target speed. It then uses the vector to attempt a turn if necessary and adds force to get towards the target speed (subject to its own acceleration and maximum speed constraints).
The behaviours I implemented where:
Grazing – animals graze in different areas for a period of time (based on some variables that can be modded) when in an area they select a location and try to move slowly towards it. When changing areas they use a higher speed and select the next area based on proximity and their current heading.
Flee – when an animal senses danger (each animal has a danger radius for the player and any bullet explosions) it selects the nearest refuge area in the opposite direction to the threat and moves towards that at flight speed.
Obstance Avoidance – the animal seeks to steer around anything in its direct path by looking left and right and choosing the best direction that has nothing in the way, or turns hard left if it can’t find an open route.
Flocking – animals look around them (generally the forwards hemisphere, and slightly behind), judge the speed and direction of other animals and use this to make a suggestion, the faster the other animals are moving the more notice they take (configurable per animal).
Predate – for predators they sleep, search out a foraging area, select an animal, chase it and eat it. They also give up if it’s too much effort.
The key thing is that all of these steering behaviours are combined and constantly updated to provide a natural looking environment. I think it works quite nicely and given time, gameplay could be developed where you had to build areas and then drive the animals into them. Unfortunately at the moment, if you fence a grazing area you may get some animals for free 
The Shooting
I really wanted to use the mouse to pick up bonuses and shoot at enemy space craft that are dropping mines on the level. I ran out of time with the enemy spaceship AI (and the bonuses) and now they “buzz” you and are generally annoying – but you can shoot them. Shooting isn’t great because the projectiles are a bit slow, it needs homing projectiles that hit the thing you fired at, not flew in the direction it used to be – easily done, but no time. I like the small explosions though, they were a 10 minute hack, but I’m pleased by them. I can’t believe what I got done in the last 2 hours of this LD48!

Missions
I built a missions system, but didn’t have time to implement all of the features or make many missions (there are 5). It’s easy to make more. Missions consist of a number of animals to capture of the different types and a number of saucers to kill, and a maximum number of animals to kill.
The Experience
I’ve never tried to make a game in 48 hours before (actually 36!) and I really enjoyed the experience. I think I should have added less features and concentrated longer on the control system, but can’t change that now. I’ll certainly compete again, it was the usual total panic, stress that deadlines normally bring, just this time it was also fun!