lexaloffle's ludumdare log

Newest items are at the top.
Start time for me is Saturday 12:00.

Extra Stuff

Mac Os X binary: swarm_racer_lexaloffle.tar.gz

A movie of level 4: swarm_racer_level_4.avi


Monday 10:04 - Finished!

Made the gems twinkly so that they stand out and zipped it up with a readme. There are no obvious bugs so I'm gonna call it a cooked goose. Here's the comp version for Win32:


(source code included)


Monday 08:49

Designed 4 levels and balanced their difficulty. The last one is very hard - you have to make good use of growing and shrinking your swarm to complete it. Not much left to do. I think I'll change the gem colour for more contrast. It would be nice to have some pickup sparkles or something, but I can't be arsed. Ditto for sound (@ _ @). Here's the final screen of level 4, just to show it's possible:

Here's a picture of the title screen. You fly into the level you want to play.


Monday 06:30

Drew a bunch of text for the title screen, finished level selection and win/fail logic, tweaked some coefficients.

Time to make some levels. (@ _ @)


Monday 04:11

Sheesh, that took a while. I wanted to have a 3d background made out of coloured dots, but it was difficult to balance it so that it didn't interfere with the foreground while still being non-trivial. There are a lot of dotty objects (bees and gems) which get lost in the background. The solution was to give the dots strong geometric continuity, so that they are visually separated from the foreground. I separated the dots into two colours. One brighter colour to show broad geomtric shapes (used sparingly), and the other to be a subtle indicator of the shape of the heightfield that the dots sit on.

In other news, I found some nice emergent behaviour. When the shrink button is used to get around corners, the bees often start circulating and 'roll' over the corner. It looks cute. Also flying the swarm through a set of scattered isolated blocks gives a nice boids-like behaviour.

Ack, I blew most of my time budget on the background. Time to do vital stuff like the title menu and levels.


Monday 00:48

A time remaining display and improved walls. I tried a title screen map but it looks a bit too busy with instructions and everything all at once. Might have to rethink that. But first.. time for a trippy background. I've been looking forward to this part. (:


Sunday 22:20

Font for numbers. The text I'll just store in big images.


Sunday 21:45

p.s. here's my code for swarming. Each bee is a player.
void move_player(PLAYER *pl)
	int bx, by;
	int noise_level;
	int val;
	int accel = 0x20;
	int accel2 = 0x8; //towards other player
	if (KEYDOWN(SDLK_LEFT)) pl->dx -= accel;
	if (KEYDOWN(SDLK_RIGHT)) pl->dx += accel;
	if (KEYDOWN(SDLK_UP)) pl->dy -= accel;
	if (KEYDOWN(SDLK_DOWN)) pl->dy += accel;
	//get the map value
	val = mval((pl->x + pl->dx)>>16,(pl->y + 0)>>16);
	if (val == 0 || val > 10)
		pl->x += pl->dx;
		if (val == 5) pl->dx = -pl->dx * 8; //bouncey
		else if (val == 4) pl->x += pl->dx / 8; //sticky
		else pl->dx = -pl->dx / 2; //normal
	val = mval((pl->x + 0)>>16,(pl->y + pl->dy)>>16);
	if (val == 0 || val > 10)
		pl->y += pl->dy;
		if (val == 5) pl->dy = -pl->dy * 8;
		else if (val == 4) pl->y += pl->dy / 8;
		else pl->dy = -pl->dy / 2;
	pl->dx = (pl->dx * 127) >> 7;
	pl->dy = (pl->dy * 127) >> 7;
	//add more friction when huddling
		pl->dx = (pl->dx * 63) >> 6;
		pl->dy = (pl->dy * 63) >> 6;
	//determine direction of droid
	if (ABS(pl->dx) > ABS(pl->dy))
		pl->dir = (pl->dx < 0) ? 0 : 1;
		pl->dir = (pl->dy < 0) ? 2 : 3;
	bx = pl->x >> 16; by = pl->y >> 16;
	//pick up a gem
	if (mval(bx, by) == 11) //gem
		map[bx][by] = 0;
	//noise_level = KEYDOWN(SDLK_z) ? 0x7ff : 0x2ff;
	noise_level = 0x2ff;
	if (!(rand()&0xff))
		pl->dx += rand()&noise_level;
		pl->dx -= rand()&noise_level;
		pl->dy += rand()&noise_level;
		pl->dy -= rand()&noise_level;
	//move towards another player
	if (!(rand()%0x1ff)) //random choose a new target now and then
		pl->target = -1;
	if (pl->target == -1)
		pl->target = rand() % players;
		} while (pl == &player[pl->target]); //wahey. haven't done a do while for a while.
	if (KEYDOWN(SDLK_z)) accel2 *= -1; //move away from other bees
	if (KEYDOWN(SDLK_x)) accel2 *= 6;
	if (pl->x < player[pl->target].x) pl->dx += accel2;
	if (pl->x > player[pl->target].x) pl->dx -= accel2;
	if (pl->y < player[pl->target].y) pl->dy += accel2;
	if (pl->y > player[pl->target].y) pl->dy -= accel2;

Sunday 21:40

Away from my machine, but I had an idea for the title page. The user controls a small 4-5 bee swarm and flys into different openings to enter the level. It doubles as a tutorial screen too, as there can be text lying around explaining block types and controls. They can try out the features as they read the text. This will probably be almost as easy as messing around with menu screens and will cut down on the need for documentation. (:

Well, 14.5 hours left. I don't have anything to do before the deadline except sleep a bit and work on the game, so here goes.

badloop will see me through the night.


Sunday 18:50

Added an extra control. You can press X to get your bees to huddle into a smaller space quickly, but it slows you down.

Here you can see a bouncy wall (green), a sticky wall (yellow), and a wall which blinks on and off. The bees get trapped inside if it blinks onto them.

Here's the test map I'm using. Magic colours indicate different wall types / objects.


Sunday 18:12

Forget the formations thing. It's interesting enough just controlling the swarm and trying not to lose a stray droid on the wrong side of a wall. The size thing works out nicely too. This is the swarm at the default size:

And holding Z to spread out to collect gems. The camera follows the center of the swarm.

I imagine the gems will give you extra time, and the object is simply to collect all of the gems before the time runs out. Each level is just 2x2 screens (80x60 tiles) so there is no need for a gem radar. It's a bit homgenous with just walls and gems though, so I'll see if I have time to add walls that blink on and off just to break things up a bit. And bouncy walls. And probably sticky walls.

So, to do today:

- Wall types
- Time display
- Good test level
- Improve graphics


Sunday 16:57

It was a nice day today. Went to the park.


The swarm racer direction could work quite nicely. It would take time to funnel the swarm through small spaces, so I'm thinking part of the game is picking up items which temporarily give order to your swarm - making formations (i.e. a straight line) which let you slip through small gaps efficiently. Also, swarm size could just be a function of speed, giving the player something more to think about when slowing down for corners and obstacles. Simple enough to finish today, and it leaves me some time to play with the visuals. I have an idea for whack parallax background. Anyway, I'm going to put in a swarm now and see how it plays.


Sunday 04:30

First screenshot. Player just controls a single droid and can pick up gems. It's fun cruising around with inertia, trying to take corners nicely. Maybe this should just be 'Swarm Racer', and I can forget about all of the complications of bullets and bad guys. Next up will be some simple swarming action.


Sunday 01:00

Spent all day doing other stuff, but came up with a rough design. The game world is a tile based caverns filled with gems and bad guys. The player controls a team of bee droids that move around as a swarm. The size of the swarm can be controlled, as it is sometimes better to huddle in a tight pack (dodging bullets) or to spread wide (to pick up gems more efficiently).


Saturday 14:00

Maybe it would be fun to directly control a swarm and to change the formation/shape/size of the swarm for whatever reason. Don't know what the objective will be though.


Saturday 12:00

Start. Swarming - yay, a fun theme.