How To Build a Game In A Week From Scratch With No Budget
The Development Diary of Hackenslash: A Game In A WeekHour 1 Wild Freeform Design and Base ClassesI spend this hour creating some basic classes for the game and using these to help guide my design. The world is represented as a series of rooms, connected by portals. Everything in the world is room-relative, similar to how old Adventures and MUDs are designed. Most objects in the game are represented by a "GameObject," which has a position and contents (which include other objects a map might contain rooms, a room contains a box, a box contains a sword and I guess the sword could contain more rooms, but we won't go there.)
I figure out how things will work and make corrections as I go. I don't even have PyGame linked in at this point I don't even have anything other than a console for output. But I feel like I've made great progress! Hour 2 PyGame 101The goal this hour is to initialize PyGame, and start putting things on the screen. Actually, I spend most of my time going through the PyGame documentation and figuring out how to do things, since I have almost no experience with PyGame or SDL. I end the hour bringing up a blank screen filled with black. So far, it's not very impressive. Actually, there's quite a bit going on behind that black window sort of like the Black Triangle story. There's a functional game-loop, page-flipping, the calling of several classes, and a lot of stubbed behavior. But that doesn't make the black screen any more impressive. Hour 3 If the Walls had Ears, I'd be cussing at them.This hour's goal is to get a room's walls displaying on that black screen. To make this happen, I need a room, and I need graphics. I spend a lot of time in GiMP touching up some textures downloaded from Mayang's Free Textures, so that they tile. I create a texture manager class. And I fill out a sample room structure. I also spend a bit more time looking through PyGame's docs to see if there's anything else I can use that might make the job easier. At the end of the hour, I still don't have walls on the screen. Hour 4 The Inn Now Has RoomAfter fighting some syntax errors, I finally get the walls to appear on screen. Not displaying correctly they are in the wrong positions, with gaps between segments. It's horrible. But with a little bit of tweaking and bug-fixing, I have something resembling a 10-square by 10-square room on the screen. Without a really detailed project plan, it's really easy to get lost when you get to one of those points where you wonder, "What next?" It's very easy to get stuck chrome-plating what you've already done without moving on to the next task. I decide that if drawing one room is good, drawing two rooms is better, and move forward towards this goal.
Hour 5 Hackenslash Gains More Rooms
Hour 6 Wherein We Practice Our Mad Drawing Skillz
Hour 7-8 Rotations and Exclamations!
Hour 9-11 Feature-ific!Once again, I face a troublesome "What next?" decision. Rooms need more interesting features, so a "feature" element goes onto the list. I don't know what sort of behaviors features should have, so I decide to go from specific to general. I decide on three static features that could be found in a dungeon room: A rug (visual only), a pillar (blocks movement and line-of-sight, like a wall), and a staircase (blocks movement from some directions along some tiles, and "teleports" you to a new location at the end.) I determine that features can be larger than a single square, and should be able to be rotated any ninety-degree step. (Editorial Note: In retrospect, a very dumb decision I spent way too much time on this feature and derived very little benefit from it.) I end up spending about three hours working on "features," between graphics and fighting some poorly designed code. Hour 12 13 We Want Loot!I create art and code for items. It's amazing how much time can get sucked away doing artwork. It's particularly annoying when it still ends up looking like dumb programmer art no matter how hard you work on it. I add a lot of details for items, including their value, size, equipment slot, graohics image data, and so forth. They aren't interactive yet, but at least they are being drawn in their correct locations in the room. Hour 14 CarpetsI'm clearly behind schedule, and what do I do? I decide that the black background is too ugly, and I put in floors. After working on the floor graphics, I discover that I'd forgotten to put a transparent background on the player and item graphics. So I spend more time fixing them. But the floors look cool. Cooler than black, at least. Hour 15-16 Click! Click!
By now, I've already crossed the threshold of Hour 17, so I start to get a little bit nervous. I should now be 2/5ths of the way done with this game the second "working day" of development. While what I've got up and running is pretty impressive thus far, I recognize just how much I've got left to do. I now have 4 more working hours to finish up basic player interaction according to the schedule. It's going to be tight but I still don't regret putting those floors in! Hour 17 Smooth Move, Until You Hit the Wall
Hour 18 Crossing the Threshold
Hour 19 Stairway to Heaven, Menu HellMy brother volunteered to do some music for the game. He did the music for Void War, and is really good. This reminds me that I need to do sound (and now music) for the game. This looks pretty simple in PyGame, so it shouldn't take too long (Editorial Note: I never did get around to this, sadly. Hackenslash ended development as a silent game.) My next goal is to handle interactions with creatures and items in Hackenslash. I'm really fond of how The Sims and Neverwinter Nights did context-sensitive pop-up menus that appeared when you wanted to interact with a game object. I'm thinking of doing something very similar here.
Hour 20 21 What's On the Menu?
Hour 22 Falling Asleep at the Wheel
It's getting very late I'm finding myself "zoning out" while working on this. If I wasn't paying attention to the total time sure, I'd work through it. Since I'm on a limited number of "work-hours" for the development of this game, having a less-productive hour is really bad news. It's interesting how your priorities shift when you consider time a limited resource. So I go to bed. Hour 23 Stat Attack!
Hour 24 Player Menus
Hour 25 I Take A Saw To Floors and WallsThis morning I had an idea in the shower (why is it that the shower is such a great place to have ideas?) for eliminating the overlap problem for walls shared by rooms (see the Hour 18 entry). What if I only draw half of the exterior walls (walls 0-3) in a room the half facing into the room? That way there'll be no overlap with walls of neighboring rooms, and I don't have to add some complicated logic to detect and resolve overlaps. I begin work (yet more engine / foundation work) on this "quick fix." Unfortunately, it really complicates my room drawing routing (for floors as well), and turns out to not be as quick a fix as I had hoped. It takes about an hour to create and debug this system to make rooms more seamless. But the results are much nicer. While debugging the code, I discover a few more movement bugs related to crossing portal thresholds with negative offsets, and fix that. |
|