ElfCraft's Time log
TIME LOG: ElfCraft a Holiday Non-Competition Entry December 22 - 29, 2002 by Stewart Gray (SEGludian)
12-22-2002 The theme is Christmas + Crowd Control. I want to do a Christmas RTS, but I think that is way too ambitious, must think of something else.
Tried to render some elfs, but the program kept crashing.
12-23-2002 10:00 am Still can't think of anything. I will try to make some elf art so that I can get something going.
1:43 pm I finally got the elf done. The program crashes less since I put it on software renderer instead of DirectX. I now have a red elf, a green elf, and a santa elf which is just the red elf with a beard. Still no ideas. I might try and do a final fight game if I get too desperate, I don't want to because then I am ripping off someone elses idea I saw online on one of their picture descriptions (RCR style rumble by Impossible).
8:00 pm Still no good Idea, I will do an Orc model and see if I can think of something.
10:20 pm Nope, nothing yet, but the Orc is done. Maybe there will be new pictures online.
12-24-2002 11:20 am I finally have an idea, it came to me last night.
You are an elf. Many of the other elfs have been kidnapped by Orcs and put in a block of ice. Your job is to find them and free them (by touching them). There are also Orcs on the map who may be roaming around (random walk), patrolling L-R or U-D, or standing still. If you get close to them they attack by hitting. You can attack an orc by throwing snowballs at it. If you free an elf it joins your party and thus increases your strength. Game over when all your free elfs have been knocked out, or when you free all the elfs. The game should have an elf-o-meter which points in the direction of the nearest captured elf.
Still RTS-ish, but now much simpler and more do-able.
Now I will work on a snowman model. When you defeat an Orc it will be covered in snowballs and I have decided that that means it will turn into a snowman. Also, the beared elf is no longer santa, he is just a beared elf and I may make a green version of him.
11:54 pm Snowman model is complete
12:05 pm Santa -> Red Beared Elf, and I made a Green Beared Elf too. I decided beforehand to do this in SDL this time. However, christmas stuff beckons. Be back in a while I hope.
2:00 pm 2:20 pm Made a font bitmap for SDL use.
12/26/2002 Took christmas off.
5:20 8:45 Made sprite sheets for green bearded elf, red elf, orc, frozen elf (red/green) and snowman. Due to time constraints I will not support a red bearded elf or a green elf without a beard. The downloader probably doesn't care because graphics right now are already 1.12 MB. Wow, that took a long time, and still no code. That should be next. I think I will start by just making an sdl screen and then letting an elf walk around via mouse control or something. Gonna see if there are new screenshots yet. Mike Doty was done this morning, I am jealous. There was one more, Reindeer Rampage.
8:55 10:45 I now have an SDL app that shows a bitmap and closes when you hit a key or the mouse button. SDL is nasty to get set up the first time. Should go faster now I hope. Runtime must be a MultiThreaded DLL.
11:30 pm I now have a double buffered screen with a spinning red elf as a cursor.
12/27/2002 12:25 am Well, I now have a better cursor with a spinning red elf at 0,0 and a screenshot function when you press F10. Not too impressive.
3:10 am Well, I was having major problems with the target following code. Instead of one elf there always seemed to be two side by side and he just plain dissapeared when facing certain directions. Turns out I had the sprite set too wide and it screwed up everything. Now after tweaking some graphics and walking speed, I am going to quit until I wake up some time later today. So far I have an elf that moves around the screen in response to mouse clicks. Not exciting either but it is a start. Well, maybe I will upload a screenshot first.
3:25 am OK a screenshot is now up. A pretty quiet competition so far.
4:25 5:35 pm I shouldn't have but I went in and changed the elf direction code to be more bressenham-like otherwise he would just go in a diagonal and switch to a Up/Down/Left/Right when he got close to the target, it was bugging me. I also took out the direction facing code and reimplemented it. The arcTan2 call is now gone. Unfortunately, this means the current compiled code looks pretty much the same.
My last picture is still the latest one up.
5:55 pm The elf class now supports red, and green bearded elfs
Oh, by the way, I have made the following changes for speed sake. 1. All action happens on one screen, no scrolling 2. All elves are always selected and move to the same spot.
Let's see, what is left Classes: cElfList cFrozenElf cFrozenElfList cOrc cOrcList cSnowball cSnowballList cSnowman cSnowmanList
Graphics Background Image Title Graphic Snowball
GUI Menu Screen About Screen Story Screen Controls Screen
Other Scoring Win/Loose
Wow, that is a lot and I have probably left things out.
6:45 pm Well, I now have a cElfList and it uses STL. Hooray, I finally got STL working after three competitions. Game Programming Gems I sure made it a lot easier to understand than my other book. Timeout for supper now.
7:30 pm back from supper. Currently exercising elf list class. I have 10 elves on screen listening to my mouse clicks. They all get piled on top of each other unfortunately.
8:10 pm I have been working on a frozen elf object. It should be pretty simple. Also instead of making a bunch of list class objects, I am going to make one giant one that contains them all. Goodby cElfList hello cGameObjectList.
8:20 pm The SDL surfaces should probably belong to the cGameObjectList otherwise I can't properly spawn an elf from a frozen elf.
8:35 pm Frozen Elves are now in the game. Once I have collision detection in, you will have to sit on them for a specified period of time to break them out of their ice cube prison. I don't like the everyone move at once thing, I don't want to do mouse drag selection either, I might change it to select one at a time or something. Time to see if there are any new screen shots.
8:45 pm Nope, no new screen shots, chat seems pretty empty too. Oh well. I should probably start adding the orc. I am downloading Mike Doty's entry from the link he put in the forums. I hope my machine isn't too weak and screwed up to run it. I want to try it out. Need to take a break for a while.
10:20 pm OK, OK, I am back, time to start on the Orc. Oh, by the way, I tried Mike Doty's program, unfortunately it dies with a Introductory Version message box and quits. It looks like it is a Direct3D game so my machine would probably barf on it anyway.
11:43 pm I now have Ors roaming around the screen. It is starting to get close to something you could call a game. Right now it is still more of a simulation. I think I will go to be on that note, after I load a screenshot to the site.
Well, let's do a to-do check shall we. What is left. Classes: cSnowball + change cGameObjectList cSnowman + change cGameObjectList
Graphics Background Image Title Graphic Snowball
GUI Menu Screen About Screen Story Screen Controls Screen
Other Status Display Game Scoring Win/Loose Sound
11:56 pm Screenshot upload complete. I think that is it for the day. I might hang out on chat a while but otherwise goodnight.
Not too bad as far as classes go.
12-28-2002 1:30 pm I am back. I did a new selection graphic. I think I will move the graphics (already loaded) into the cGameObjectList including the new selection bitmap. Then I will make it so you can only move one elf at a time and only if it is selected. When drawing, the elf should have a selection graphic around it if it is selected. This could take a while.
2:30 pm Well, instead of sticking everything in cGameObjectList, I made a new class that is supposed to be singleton-like that has that data. Seems pretty good so far.
2:35 pm If you could wake a frozen elf, it would now turn into a regular elf. Now to make the elves selectable.
3:10 pm I can now selected individual elves and move them around (not as fun actually), but the selection graphic is missing.
3:30 pm OK, I finally got the thing working. I guess it just doesn't like me getting the screen surface from my singleton-ish array. Oh well. It is kind of fun to move the little elves around now.
3:35 pm I think it is time to start waking up frozen elves. If an elf intersects (bounding box wise) with a frozen elf, it will send it a wake event. When the frozen elf has had enough events it will wake up and turn into a regular elf.
3:55 pm OK, Frozen elves are now unfrozen by sitting on them for a couple seconds. Now I just need to have orcs hurt elves whenever they touch and elves throw snowballs at orcs that hurt orcs whenever an orc is a certain distance away (< 100 pixels deltaX squared + deltaY squared < 10000, and to be safe both delatX and deltaY < 100). After that I should have something which can pass as a game once I add win/lose conditions. I will then need to tweak it so it is more balanced, add a status display, and then the menu stuff, then I think I will call it done. I am going to start with snowballs.
5:40 pm Thought I had elves auto-throwing snowballs, but I can't see them. I loaded the graphic properly, but they just don't seem to be drawing. I put breakpoints on things and they seem to be working but I don't know.
5:50 pm Dumb old me, I forgot to set the snowball width/height properties. Yeah, snowballs are now flying.
6:00 pm OK, elves can now snowball orcs to death. Need to add the snowman soon. But first I want to let Orcs hurt elves.
6:15 pm Elves should face in the direction of the snowball they threw, hard to tell if it is correct, but I am not tweaking it any more.
6:20 pm I think it is almost a game. I need to put in the snowman (maybe) and add the win/loose condition and then tweak it so it is harder to play. Maybe you only start out with three elves or something. After that I should probably put in a background instead of a large white box, and add the menu system, and sound. If I get that far, I will call it done.
6:35 pm Lazy guy that I am, I did the background first.
7:10 pm Then I did the snowmen, they are kind of cute.
7:30 pm You can now win/lose, but all it does is stop the game. I think I need to load the font bitmap I made a while back and make a faux-message box and a status display. Anyway, I am tired. I am going to put up a screen shot and take a break for a while. Maybe until tomorrow.
8:00 pm Screen shot is up, poking around the site a bit. Need dinner. See you tomorrow if not sooner. Wait, first I want to calculate an approximate number of hours spent so far. 33 hours 24 minutes so far yikes!
11:30pm I decided to take a crack at the text display before turning in.
12/29/2002 12:50 am Wow, that took a while. I now have a text display on my screen. It shows you the number of elves, frozen elves, and orcs remaining.
12:55 am OK, let's do an inventory of what is to complete (not necessarily in order). - Win/Lose Screens <-Required - Main Screen - Story Screen - Controls Screen - About Screen - Game Reset and try again - Gameplay tweaking - Sound (May not do all of these: Orc hit by snowball, Elf hit by Orc, Elf Die, Orc Die, Frozen Elf awoken, Elf throw snowball, You Win, You Lose). SDL_Mixer is approved right? - Timelog -> HTML <-Required - Recompile as Release, add Fullscreen command line flag. - Package up and upload code/binary. <-Required
I also need to do one last screenshot along the way.
12/29/2002 12:20 pm I am gonna start out by making some graphics You Win, You Lose, Pause, Title Screen.
1:25 pm I now have graphics for Title Screen, Lose, Win, and Pause. Time to make the code load them.
2:00 pm Pause seems to be working, Win/Lose partially working, needs title screen, and clickability. I put in a full-screen command line option (just type full after the filename) wow, it is a lot faster. I need to put in a speed limiter.
2:30 pm Almost got the title screen working, but the system has become unstable. Time to reboot.
2:40 pm Rebooted, but it didn't help. Turned out I had a syntax error that was making the compiler barf. Seems to work again. I still get mysterious lockups. They concern me. However, I can now go back & forth between game and title (via keyboard only so far). The exit button works too.
3:40 pm For some reason it won't restart the game anymore. It dies during the update, but doesn't if you single step through. I think I need to switch over to the other stuff before trying to tackle that some more.
4:22 pm I can now click on the title screen buttons, but I still can't fix the crash when trying to restart the game. No Story or Instructions mode yet. I may just make it quit when you win or lose.
4:32 pm Well, I finally wised up and put code generation on the Debug Multi-Threaded DLL, it has a strange conflict, but the interesting thing is it doesn't like my new/delete in cText. I took it out of CText and it played correctly. I will have to put it back on normal MultiThreaded DLL and look at this again. Hopefully this is the reason for the random lockups. Hmm, normal works again. Let me rewrite it to use a fixed buffer. Maybe that will still work. 256 characters max.
4:40 pm Aw NUTS, I was updating the buffer after it was deallocated. Worse yet, I didn't have to. It was in the destructor. This Debug DLL is nice. Still getting a freeze up. Something must not be thread safe and needs to be.
I think it is more reliable now even if it does still lock up. By the way, if anyone can figure out what I am doing wrong, I would appreciate it if you could let me know.
So, what is left: Story Instructions Sound <-- May be dropped Gameplay Tweaking Last Screen Shot Timelog->HTML Package Up Upload.
4:50 pm Let's start with that frame rate limiter.
5:00 pm Looks good.
I only have about 1 hour left to play.
5:50 pm Just finished writing up readme.txt, story.txt, and timelog.txt Need to throw out some stuff. Looks like the Instructions and Story will just pop up a graphic telling you to refer to instructions.txt and story.txt sorry. The timelog will stay text, and then I will package and upload. Time is just about up for me.
Source: ludumdare.com archive