Robot War 2003's Time log
Ludum Dare 48-hour Game Programming Competition
Author: Stewart Gray (SEGludian)
April 4, 2003 - Day #1
7:07 pm The theme was just announced. Preparation - Set it up, let it go. Right now I am stumped. Maybe I will do something like my ld24 entry.
April 5, 2003 - Day #2
12:00 am Well, I took a break and took some time to think, but I am not getting much further on a theme idea, I think I may still do something like I was originally going to do for the very first ludum dare competition. You will set up army guys or tanks or something and so will the computer. Then you will let them go, and if your guys survive and the computer guys don't you win, if all your guys die and the computer's doesn't you lose. Otherwise, after a set amount of time, all of your guys can be left on the battlefield and tweaked or converted back into credits to purchase and set up new units. After which you start it up again until one of you wins or you have done it three or so rounds, in which case, the one with the most credits wins. For each unit you should be able to set some sort of mode such as patrol left/right, patrol up/down, or random walk, or hunt. Better AI would cost more money (hunt more expensive than patrol left/right) stronger units also cost more (army guy vs. tank). Sounds difficult, but maybe I can do it. I think I will have to constrain this to one screen again. It should make the game go faster that way at any rate. I think I will shoot for 640x480 and will make full-screen the default this time. No name for it as of yet. On further thought, instead of patrol up/down or left/right or hunt, I might generalize it into waypoints which you play forward then backward (up to 10 or so each unit). When a unit is within range of an opponent unit they will stop and fire until killed or until the opponent is out of range. When hit, a unit should turn and return fire until no target unit is within range or the unit is dead. The computer would just pick random waypoints, which will probably make it easy to beat, but hey, I only have 48 hours. I think i will let you cash out units and buy new units at end of turn, but it won't happen automatically. Maybe I should randomly place money bags on the field that let you buy new units on the next round. This would give the player and computer a reason to bump into each other. Almost sounds do-able. I think I will start coding now, I will set up a simple SDL application and create the same sort of sprite class I always start with. Then maybe I will may a wayPoint sprite from that. I think I will call it Robot War 2003 right now.
1:29 am I have a basic SDL app running now, but for some reason it seems to flicker in full-screen mode. Not sure if it has to do with double buffering and fillrect, but it might. I will keep an eye on it. Now I should create a cSprite class
2:00 am I now have a cSprite class, it is basically just like my otherones I have done except I peeked at that code, I didn't directly copy it. I am probably gonna peek at targetSprite from my previous competition entry sometime soon too, but I may go to sleep first. I might try to start designing some robots now.
2:34 am I created a robot tank sprite. Time to go to sleep
11:10 am I am back. Time to work on some more stuff. I will probably look at pictures first. Upon thinking, I think the next thing I should try to do it make the sprite load and then pick 10 random waypoints and move back and forth between them. That will be a good proof of concept that this stuff might work.
2:04 pm That took quite a while. Well, I think it is the call to SDL_FillRect that is messing up double buffered full screen. I will have to add a background image soon. I will probably have the GIMP make me a random background. I now have an SDL program that opens a window (full-screen default) and picks 10 random waypoints then moves from 0,0 to the first waypoint then bounces around between them. Currently it is leaving garbage behind, and I sure peeked at a lot of my old code, but it seems to be working. I have decided that I will need some sort of static display at the bottom of the screen (one for setup mode and one for running mode). I will probably only have two unit types, but I am not sure yet. Time for some lunch.
3:15 pm It was the SDL_FillRect call that was messing me up. I now have a background that looks OK courtesy of them GIMP. Now I just have to figure out what is next on the list.
3:51 pm I decided to work on the GUI. This seems to be the hardest part. Looks like there will only be one unit type per team. They may even be the same thing only in two different colors. Each unit likely has 10 hit points. If you delete a unit you only get money for the hit points. $1 for each remaining hit point. Might give the player $10 pity points (enough for one unit) for each round completed ($100 when starting a new game), that way you can always add at least one tank. You have to click on the tank on the battlefield to add/clear waypoints or delete it. Can only select your own units in edit mode. Still want to add random money bags (3 or so) just before the simulation starts.
4:15 pm Still working on the GUI FSM on paper, but I just decided to axe the ability to delete a weak unit for cash. Gotta keep it trim for a 48 hour contest, and I don't want to program an AI to know when to do that. No canceling a unit add either, at least not with a button. You can cancel it by clicking GO or clicking on one of your units
6:13 pm Well, I have a working splash screen. Not exactly what I was hoping to build, but I guess I am building top down. It took a lot longer to generate the title screen than I wanted. Anyway, now the game has a title screen with play and exit buttons that work by keyboard and mouse, and it tells you to go look at files for the rest.
7:21 pm I am back after a break. I just can't seem to concentrate on the game this competition. Anyway, I have decided to try to tackle fonts. I am going to make a little VB program that will generate a fonts bitmap and code file for dealing with it. Wish me luck.
8:02 pm That went faster than expected. Time for supper.
8:32 pm the letter i needed tweaking, j was on its territory. Attempting to design the status display area. Changed fonts, the other was too big. I think I messed up my system a bit, time to reboot.
8:54 pm now above the g and below the i need a little tlc. Looks better, but now it seems to short, I think I will leave it. It has been a while, I think I will check out the rest of the entries for a while.
9:39 pm Still haven't tackled the Status Display and mode code (can you tell I don't like that part), but I did get some waypoint flags done and a selection mask.
10:56 pm Well, instead of working of the Status Display and mode code, I put in code for the WayPoints and selection mask. I also changed the code from a single tank system to a STL list of tanks.
11:17 pm The stalling continues, you could now hit the tank and kill it if there were other stuff in the game that let you.
11:53 pm Hey, I finally did some Status Display / mode code. You can now add a tank to the battlefield until you run out of money. I think that is all I will do for the day.
April 6, 2003 - Day #3
9:57 am I am about caught up looking at the pictures. Stupid day light savings stole an hour from me.
10:57 am Ok, I finally got some work on the Status Display/mode code going. You can now have the game start, but it doesn't do anything yet, just time out. You can also add tanks to the field and clear the waypoints for the selected tank. Unfortunately, you can't yet select a tank or add waypoints, and the tanks don't battle yet. Also, the battle hud needs work. After that I might call it a game.
11:23 am Should now be able to add waypoints to tanks and select other tanks. The builder part might be just about usable. I also fixed a bug where trying to set a waypoint with a
12:43 pm I just finished regenerating the tank pictures and putting them in along with team designations. That took a while. I have to call update on a new tank when added, otherwise the sprite selected is all wrong.
1:27 pm The computer will now buy new tanks. I have also created a zap object and list even though you can't see them yet.
2:45 pm It is almost a game now. The tanks fire at each other (but there is some bug there) and can kill each other. I just need to fix the firing bug and put in win/lose conditions. Then maybe I can add some sound. I never thought I would get this to work.
2:59 pm Think I have the zapping error fixed. Now I need win/lose conditions and I will call it a game. First I will make the dialog background.
3:53 pm Woo Hoo, I think I now have something I can call a game. I backed it up to floppy just in case. Maybe I will try to add sound now.
4:20 pm I have now created the sounds. Now I just need to wire them in. Then I will create the readmes and such, package it up, and upload it all. Now to see if I can figure out SDL mixer.
5:08 pm I now have sound. I think the only other thing I will fix code wise is to turn of the blinking of tanks when in builder mode. Then I will write the readme & such, take screen shots, pack it up and send it in. :-)
5:26 pm Final burn complete. Time for readme.txt instuctions.txt story.txt and timelog.html generation.
5:40 pm OK, most of the files are done. I will now create the screen shots, change this log to HTML, package it up, upload it all and call it done. I had a fun time.
Source: ludumdare.com archive