Month: January 2006

Realization…

Last night I was driving home from work. I was pulling up behind a van at a red light when something caught my eye. I realized that the van had an onboard DVD player. Cute.

Then, despite the very bad lighting and small size of the screen, I realized that the DVD player was playing Blue’s Clues.

Then, to my horror, I actually recognized which episode it was playing.

I have a limited number of brain cells, and some of them are busily engaged in making sure I can recognize when Steve is singing “Heads, Shoulders, Knees and Toes”. Good grief.


The Ground Rules

Here are the rules for my Space RPG Project (I am going with the title Star Revolution, based on Sol’s suggestion):

1. I am free to use any code I’ve already written in this project. This includes my framework and any other code from Inaria or my previous projects.

2. The game must be completed by April 30th, since I intend to do three of these projects this year.

3. This game will have sound and will feature procedurally-created planets, since I need to learn how to do that. I’ll be using FMOD for sound, it’s teh awesome and I’ve used it before.

4. This game will not use the SDL. Instead, I will be using OpenGL. This is both to learn the API better and because…

5. This game will feature 3D entities in the game world – the planets and ships will be 3D. But because 3D content creation takes so long and because I can’t simply grab pictures of aliens off the web…

6. Only programming and design will count against my forty hours – creating 3D entities and other artwork will not. Otherwise, there’d be no way for me to get the project done in the required time.

Yes, I could probably use 2D-only graphics and grab alien art out of Starflight, but I was going over the technical requirements of the game and honestly…it’s not that different from Inaria. The procedurally-generated planets were the only real difference; otherwise this game is just “Inaria in Space”. I wouldn’t learn enough from making Space Inaria, so I added the new requirements. I don’t think I’m cheating that much; if this were a “real” project, all of that art would simply be handed to me by an artist instead.

So that’s the nature of the current game. Wish me luck!


1337 Sploitz!

Now I’ve really arrived – Tom found an exploit in Inaria. If you attack an enemy with the bow and keep right-clicking very quickly, you’ll be awarded the enemy’s XP several times until the enemy is finally removed from the world. This is because I never really made the game turn-based; I just made it so that enemies couldn’t move until the player took a turn. The game still updates on a per-frame basis; it should update on a per-turn basis.


The Envelope, Please…

First, I’d like to thank everyone who voted!

The results:

1 vote for a Platformer
1 vote for a Shoot-Em-Up
1 vote for a 3D Shooting Gallery
2 votes for a Civilization clone
2 votes for “Inverse Pac-Man, where you control the ghosts”
5 votes for an RTS
6 votes for a Starflight/Star Control 2 clone

And since that was my personal favorite of the suggestions, I will allow the vote to stand. My next game will be an outer-space RPG and combat game. I’m currently going with the title Star Sea, but that might change if I can think of something cooler. The title must have “Star” or “Stars” in it.

Before I can start on the game, though, my framework needs a lot of work. It may be a week or two before my first real update.


Help Me Pick My Next Project!

My 40-hour RPG is complete!

Which means I need a new project. Here are the candidates I’ve been kicking around my brain, feel free to vote for one, rank them in the order of preference, or even suggest something completely different!

1. Turn my 40-hour RPG into a 3D-based RPG with a simple software-rendered 3D engine, but adding no new functionality (unless I have time).

What I’d Learn: 3D math, raypicking, 3D animation

My rating (out of five): ***

2. Make a simple real-time strategy game, in the vein of Command & Conquer or Warcraft 2. This project would include an AI that the player played against.

What I’d Learn: Setting up a real-time engine, A* pathfinding, AI.

My rating (out of five): ****

3. Make a simple 2D Civilization clone strategy/wargame. This project would include an AI.

What I’d Learn: More about turn-based engines, pathfinding, AI.

My rating (out of five): ****

4. Make a simple 2D Master of Orion clone space-based strategy/wargame. This project would include an AI.

What I’d Learn: More about turn-based engines, pathfinding, AI.

My rating (out of five): ****

5. Make a 2D space combat RPG, in the vein of Starflight and Star Control 2.

What I’d Learn: Switching from turn-based gameplay to real-time gameplay, more about conversation systems, real-time combat, AI.

My rating (out of five): *****

So those are the options I’m currently entertaining. I really need to learn a lot more about 3D programming at some point, but writing a fully 3D game from nothing probably isn’t possible in forty hours, which is why the only 3D option on my list is to take my current game and make it 3D. It’s my least favorite option because frankly, I’m sick of Inaria right now I would still learn a whole lot from the other projects, and would have completely different, new games to show for them.

So, any thoughts?


Inaria Postmortem

Around the end of October 2005, I decided to try to write a complete computer role-playing game in forty hours. I was inspired by this article by Jay Barnson on GameDev.net, Jeff Vogel‘s excellent work, and by my own love of RPGs. I am a professional game developer, but I’d never written an RPG engine and considered that a “hole” in my experience.

I picked a time limit because I’ve also been fascinated by people being forced to do the best they can with their skills under such limits; this was one reason why I wrote my Iron Gamedev article (the other reason was that I was feeling really goofy that day). And of course competions like the Ludum Dare also inspired me.

The project is now complete. You can download the game here, and the source files for both the game and the editor here. Here’s a screenshot:

Mmmm...pixels.

Now, the point of this project was to learn, not necessarily to make a complete and fun game. That said, I did want to make the game as good as it could be in the time I had. Here’s an excerpt from my original design doc with my goals:

We need four things to be able to call the project a success.

We need to create the map structure and populate it with an initial terrain layout.
We need to allow the player to walk around the map and be blocked by passability data.
We need to create monsters and have them move toward the player and attack him when they get in range.
We need to allow the player to attack back, and to have the player somehow gain in abilities when he succeeds in killing monsters.

That’s it. If we get that, we can publish it without fear of too much ridicule.

But that’s not enough. What I want is:

A map structure where every map cell is a list of critters placed on that cell. When the cell is drawn, all objects in that cell are drawn, from bottom to top. Since the terrain object will be pushed on the map on load, it will always be drawn first, on the bottom.

A map structure that contains data for map links.

An inventory and a current equipment screen.

If we get all this implemented, I will consider the experiment a resounding success.

Finally, what I’d really like is:

An overworld, three towns, two castles, and eight dungeon maps.

An overall plot, no matter how thin.

Quests and quest objects.

If we get all this implemented, I’ll be damn suprised.

Well, I didn’t get quite everything on my list done, but I’m still very surprised at how much I accomplished. I got the map structure I wanted, an inventory, buying and selling, NPCs with different AI behaviors, levelling up, one town, two castles and eight dungeons. And a very, very thin plot, but not quests or quest items.

I kept rigorous track of my time, but since I have a full-time job and a family, I wasn’t able to spend my hours over the course of a weekend or even a week or two. It took me about three months to finish the project, and I actually feel I did well completing it in that time. I am actually alloting myself four months to complete my next forty-hour project.

I would break down my time spent as follows: about five hours was spent fiddling with graphics, about thirty hours was spent writing code, and about five hours was spent creating the NPC data files and game levels.

What Went Right

Kicking it Old-School

Emulating an old Ultima-style RPG was the right tack to take. If I’d tried to write a 3D RPG, I simply would have gotten overwhelmed and probably quit. The feature set I wanted fell into the “tough but doable” range and made for a perfect forty-hour challenge.

Using the SDL

I wouldn’t have completed what I did if I had not used the SDL and instead just used DirectDraw. End of story. I cannot imagine why someone would not want to use it for a project like this, it was so easy to use and saved me so much time.

Grabbing Graphics off the Web

All the items, monsters and NPCs in the game came from this page of free RPG tiles. This was a lifesaver – if I’d had to create the graphics myself, not only would they have looked like crap, I would have burned so much time on them that I would not have had any chance of completing my goal. As it was, I could not find any decent terrain tiles that I liked, so I ended up grabbing a lot of the ones I used out of Ultima VI. This cost me at least two hours, unfortunately.

Making an Editor

I spent about five hours making an editor for the engine – you can see a screenshot of it here and it’s included with the source package linked above. I think this may have been my smartest move. I ended up spending far too much time on the code and far too little on the maps (see What Went Wrong, below), but if I hadn’t had the editor I probably wouldn’t have gotten more than one or two maps into the game.

Using my PDA to Sync Projects

I have an Asus A620 PocketPC-based PDA. I love it, and one of the things I use it for is to keep projects synched between work and home. This way I was able to work on my project at work, sync my PDA, take it home, sync it at home, and pick right up where I left off. Now that I’ve got some webspace, though, I’ll probably set up a Subversion server to make it even easier, and give me real source control features like versioning.

Blogging the Process

This was vital. The fact that I knew people were watching kept me going when I got really tired of the project 🙂 I’d like to thank my friends Ryan Clark and Tom Mauer from work who tracked the progress of the project with interest, as well as Andrew Wooldridge and Gianfranco Berardi who linked to me, and to Sol who piped up with helpful suggestions when I mentioned I was using his tutorials.

What Went Wrong

Hoo boy, where to start?

Well, first, here’s a screenshot of the most visually interesting bug I encountered during development:

I'm walking on mouths.

Multiple Mistakes with the Editor

I made two huge mistakes with the editor. First off, I made it too early in the project. I made the editor when I felt I needed map data to work on, but once I had the map I then added lots of features to the map structure…which the editor then didn’t support. I had to add the map level number, map name and map links all by hand. The editor still saved me time, but it could have been even better if I’d just made a temp map by hand to work on, finalized my map data structure, and then made the editor.

My second mistake was a doozy. I split the editor off into its own project, instead of simply creating a new editor source file in the base project. By splitting the editor off, I ensured that all maps would have to be moved from the editor folder to the actual game folder before they could be tested – and then moved back if additional work was needed. Maps quickly got out of date and filenames got confused. I finally fixed this by putting a hardcoded path into the editor source so that it saved and loaded from the game folder, a terribly hacky solution.

Secondly, I ensured that all the changes to the source files I made while writing the editor had to be merged back over to the game project, and then changes made there had to be merged back into the editor…it was just bad. Still much better than no editor at all, but these mistakes caused me to eat up time that could have been spent making the maps better. Which leads me to…

Too Much Time on Infrastructure, Not Enough on Content

Now…this is a thing that went wrong, but in the end, this was a learning exercise, not an attempt to make a publishable game. I wanted the game to be as good as it could be, but in the end the quality of the game is not that important.

That said, the game could have been twice as good with just one or two more hours spent on the content – and I’d have had those hours if I’d both planned better and not made those boneheaded mistakes with the editor. There are features in the engine that the player will never see…because I didn’t have time to write content that uses them. Yay!

Schizophrenic Source Code

I almost didn’t want to post the source…in just about every case, I started doing things the “right” OOP-ish way, and then reverted to procedural programming when time got tight.

For instance, there is an NPC class. Great! Do I subclass from that for all my NPC types so that I can program in individual unique NPC actions? Nope, I simply use that one class and have the Update() function determine the NPC’s type and perform actions based on a classically bad switch/case statement. The input code is atrocious; I’m doing tons of stuff there that have nothing to do with input. I felt like crying when I put the code to draw the hit marker and projectile marker inside the input function with their own frame pumps…but it was either do that or cut them completely. I guess I can console myself with at least knowing that it was bad.

Conclusion

Despite all of that, I do consider the project a success. I learned a lot and created a fair amount of code that can and will be reused for other projects. And I’m planning on doing three more of these forty-hour learning exercises over the course of the next year.


Pencils Down

It’s finished!

Woohoo!

You can download a version to play here. A full postmortem is forthcoming…after I recuperate a bit 🙂

Here’s the readme file:

Inaria Readme File

This is a role-playing game I wrote from scratch in forty hours over the course of three months. To read more about the game’s development, please visit my weblog at https://viridiangames.com/blog !

BASIC CONTROLS

Inaria can be played with the keyboard and the mouse, or the mouse alone (sorry, there is no way to play it just with the keyboard).

You can move your character by pressing the arrow keys, using the WASD cluster, or left-clicking on the map where you want your character to go.

You can pick up items in the world by left-clicking on them. They will appear in your inventory. Left-clicking chests opens them, revealing their contents.

You can use items in your inventory by left-clicking on them. Left-clicking arms and armor equips them and gives you stat bonuses. Left-clicking potions drinks them.

The GUI pane in the bottom-right, right above the text area, is your main interface with the game. The four buttons on the left allow you to talk to, look at, pick up or attack anything or anyone in the game. The four buttons to the right of those are your spell buttons (although initially you don’t have any spells). The three buttons on the far right allow you to load, save and quit the game. All of these buttons work by left-clicking.

This game also uses smart right-clicking. Right-clicking an enemy automatically attempts to attack that enemy. Right-clicking a friendly NPC talks to that NPC.

OPTIONS

You can change the game to run fullscreen by opening the engine.cfg file and changing the line

full_screen = 0

to

full_screen = 1

I wouldn’t recommend playing around with any of the other options…they could very easily lead to crashes.

GAME TIPS

You start off with a little money, just outside a town. Run inside and visit the merchant. Buy a dagger and some leather armor; this will make you a bit more effective in combat.

When you find a dungeon entrance and go inside, look at the text displayed in the text area. This will tell you the name of the dungeon and its level. If the dungeon is significantly higher than your level, it’s probably a good idea to leave it and come back to it later.

Try talking to monsters!

The Clever Merchant in town is the only place where you can buy potions. If you’re having trouble finding them, sell all the weapons and armor you’re not using and use that money to buy more.

When you level up, clicking the muscle symbol increases your attack power, making you more likely to hit. Do NOT level up your speed, that statistic isn’t used in the game (sigh).

The game honestly is not well-balanced. I just didn’t have the time. As a result, it’s not that hard a game. If you play smart, you should beat it pretty quickly.


A Beautiful Mood

I am in a beautiful mood today. This doesn’t mean that I’m happy (although I don’t feel bad). It means that I am in a mood to experience and appreciate beauty.

The day didn’t start out this way, though. I woke up feeling pretty lousy. Over the last couple of days, some things have conspired to lower my mood. Which is also why nothing else has gotten done on the RPG.

So I was driving to work early this morning…and I didn’t go to work. Instead, I went to Whole Foods.

We are fortunate here in Austin to have the world headquarters of Whole Foods. It’s a huge store, it’s gorgeous, and there are about twelve different places inside where you can get a hot meal – everything from grilled salmon to Italian to rice bowls. Everything is made fresh with no preservatives. While I’m no hippie, my attempts to lose weight have taught me exactly how much junk goes into normal preprocessed foods. Whole Foods is basically where you go when you get tired of eating McDonald’s and Wal-Mart’s crap. You pay for it, but it’s very, very good food.

So I bought some white bread, some mayonnaise and some chicken salad. I took them back to work and made myself a sandwich.

Delicious.

Then I turned on WinAmp. The shuffle gave me this track. (If you need a plugin to play .SPC files, you can get one here. I recommend SNESAmp for WinAmp. Of course, you should have already done this when I talked about the Front Mission soundtrack. More Super Nintendo soundtracks can be found here.)

And that pretty much clinched it. Today is all about Beauty Appreciation. There will be no listening to Cypress Hill or Audioslave. Instead, today will feature pieces from Yoko Kanno, Nobuo Uematsu, and Björk, among others. Beauty forever!


40-Hour RPG Update 12: 35 Hours

I think I’m ready to call myself finished with the engine. There are known bugs in it, but they aren’t severe, and I could easily blow all my remaining time on fixing them. In which case you’d get to play an RPG with one map with no enemies on it.

Here’s what I’ve gotten done:

  • Buying
  • Loading
  • Dying (death is now fatal)
  • The Smite spell
  • Getting objects (you must now be next to an object)
  • Moving with the mouse (left click in the direction you wish to move
  • Smart right-clicking (right-clicking an object picks it up; right-clicking a friendly talks to it, and right-clicking a monster attacks it)
  • Hit marker
  • Missile marker (buggy, but I don’t have time to fix it)

What’s left:

  • Make the two remaining town maps
  • Make the eight dungeon maps
  • Make the final boss castle map
  • Tweak the monsters

I’ll probably start with the overworld, then do the final castle. Then I’ll do as many dungeons as I can. If I get all the dungeons done, I’ll do the other towns (you really only need one town, as Diablo proved). I believe that the project is still on track.


We Now Return to Our Previously Scheduled Program

Hi! I’m back. Christmas was good, thanks for asking. No, I didn’t get anything done on the RPG. I did gain about five levels in World of Warcraft, though (and these were levels 53-58, not insubstantial).

I honestly don’t know what to do about World of Warcraft. I’ve been playing for over a year, and I am the definition of the casual player. I am approaching level 60 with my first character (a human paladin named Surago) and now I’ve got some problems.

The first is that the paladin class is one of the worst in WoW. Blizzard just doesn’t know what to do with the class. We can’t fight; our damage per second is the absolute worst in the game. We can heal but our heals take a long time to cast and therefore half the time our target dies before the heal gets off. We can remove some debuffs but not all of them. In the end, everything we do can be done better by other classes, and the weaknesses of the class become more and more apparent the closer characters get to 60. So why did I pick this class? Because I didn’t know all this a year ago when I started playing, and because the paladin represented exactly what I wanted to play – a fighter who can also help others out with heals.

The second problem concerns the radical shift in gameplay that occurs in WoW once you reach 60. During the level progression, you can track how far along your character is and how much effort you need to expend to improve him. Getting better gear is nice, but levelling up will improve your character more.

Once you get to 60, the only way to make your character significantly better is with better gear. Unfortunately, all the really good gear in the game comes from random drops from raid bosses, and these drops have really low percentages. They also bind to your character on pickup, so they cannot be sold on the auction house to other players. So you run instances over and over and over and over hoping your item drops. A friend of mine in my guild just got the final piece of his Tier 0 set – which is the most basic class-specific armor set in the game – and it took him one hundred and seventy-six runs through the Scholomance dungeon before his damn hat finally dropped.

One hundred and seventy-six times through a 2.5 hour dungeon. To get one piece of an armor set that isn’t even that good.

What this means is that you can no longer track your character progression. The odds that anything you need will drop on a certain raid are about 2%. I’d never play a gambling game with odds that bad (and neither would anyone else!) but here I am paying $15 a month to do just that – spend my time gambling over and over, praying that what I want drops. To barely improve a character of the worst class in the game.

I think I’ll probably just start an alt instead.

Okay, new topic. Saw Ghost in the Shell 2: Innocence. In the end, I felt about it the same way I felt about the original Ghost in the Shell. Gorgeous movie, interesting ideas, tried too hard to mean something, but still very enjoyable. There wasn’t quite as much action in this one, though.

Let’s see…anything else? After I wake up a bit more, I’ll probably make the obligatory New Year’s Resolution post.