Categories
Game Development

Part 1 of Results of June’s Game in a Day

Click below to track my June 2005 GID development progress:
Part 1
Part 2
Part 3

This blog post and the next one will act as my .plan and document the implementation of my game design for June’s Game in a Day.

While it is supposed to be between Saturday and Sunday, Sunday is my sister’s gradution party. Instead, GID for me was from June 10th through June 11th. After I bought a 24-pack of Mountain Dew, got home from work, and had dinner, I set to work.
I already put six cans of Mountain Dew in the fridge to prepare for the night. It should be a good boost, especially since I don’t drink caffeine often. I also cleared my desk and made sure I had the right books, notebooks, and other tools available.

June 10th

7:00 PM

Cans of Mountain Dew: 0
Subversion Revision: 0

Logged into #gameinaday and ready for coding action!

I set WorkRave to give me 20 second breaks every 10 minutes. It isn’t very disruptive and lets me rest my eyes. At the end of 4 hours, it will force me to take a 10 minute exercise break.

I already setup my Subversion repository for the project and created the normal directories: source, documentation, and resources. The first two are self-explanatory. Resources are things like music, sound effects, images, and other data.

I started by trying to create a basic finite state machine as described by Tony’s Game Programming Tutorial. I didn’t want to just copy the files and use them as my own, since I didn’t like the naming scheme and the C code strewn throughout. I wanted to use Kyra instead of straight SDL. Besides, I will learn a lot more about how the FSM works by writing it out than by copying and pasting.

7:45 PM

Cans of Mountain Dew: 0
Subversion Revision: 6

I’ve written a few source files but it is mostly for infrastructure rather than game code. TomB warned me that I can get stuck trying to build the framework, especially since I am basically doing this from scratch.

Even though I asked people to leave me undisturbed, I still must do some laundry.

7:58 PM

Cans of Mountain Dew: 1
Subversion Revision: 6

First can of Mountain Dew opened.

Still writing the FSM…

8:45 PM

Cans of Mountain Dew: 1
Subversion Revision: 8

The basic FSM game engine is written. Now onto making individual states.

8:54 PM

Cans of Mountain Dew: 1
Subversion Revision: 9

It compiles and builds cleanly for the first time! A window appears and then promptly seg faults since I don’t have any states yet.

9:18 PM

Cans of Mountain Dew: 2
Subversion Revision: 9

Hit my first snag. Everything compiles, but it won’t link. Spent almost an hour before finding that I didn’t declare a static member in the implementation file before using it. Doh!

11:22 PM

Cans of Mountain Dew: 3
Subversion Revision: 10

Oh boy. I’m hitting a wall. I’m not sure how to proceed. A KrEngine is declared within GameEngine, but none of the states know about GameEngine. I ended up making GameEngine a Singleton and having everything accessed through it, which took quite a bit of refactoring.

The result:

Blank Triangle on Black Window

I’ve been working on this project for about five hours now and I don’t have much to show for it. But I can’t get discouraged. After all, I have more done than I did five hours ago.

June 11th

12:48 AM

Cans of Mountain Dew: 3
Subversion Revision: 14

Now I have a splash screen. Yes, it is programmer “art”.

Sprayed on brush metal???

3:18 AM

Cans of Mountain Dew: 4
Subversion Revision: 15

Ok, I’m learning. Virtual destructors and static members are parts of C++ that I am not terribly familiar with, so I am glad I get the chance to fight with them now. Still, I would love to be further along than I am. From splash screen to menu screen. No gameplay yet.

Play the game already!

I’m also getting sleepy. Should I rest or push forward? Push forward!!!

..after a quick bathroom break.

5:27 AM

Cans of Mountain Dew: 4 (-1 bathroom relief modifier)
Subversion Revision: 17

I’ve finally gotten to the point where I can write the PlayState, where the actual game takes place!

I’m used the Gimp to draw up a few images of the main Player. I decided to make a crude alien. The Player class was easy to make since it just has to encapsulate KrSprite and some data about the Player. I can probably get it playable fairly quickly. Even if you can’t do anything else, you should be able to move around and possibly shoot something.

A green alien

For now, I can detect the arrow keys and change the action of the Player. The screenshot doesn’t show it, but his eyes move depending on the direction you press.

5:55 AM

Cans of Mountain Dew: 4
Subversion Revision: 20

About 10 hours later, I finally have the main character moving about the screen according to the arrow keys. He only moves in four directions, but I’m not going to draw up more images for diagonal movement this late in the GID. I’d rather spend my time getting the fusion part of the game going.

I will try to take a nap now, but check out the 1.6MB project (mostly due to the raw images in FuseGB/resources/) so far:

Categories
Geek / Technical Politics/Government

Part 2 of Software Patents? No Thanks!

I wrote previously about software patents in response to an article on Gamasutra. Gamasutra also had a Question of the Week, and the responses show that most people are clearly against software patents.

The authors of the previous letter wrote a response to the feedback. In it, they defend themselves as just the “messengers” and for the most part I can understand that they believe in their work. They make a good point that regardless if software patents are good or bad, currently they exist. I don’t believe they are hear to stay because there is nothing intrinsically permanent about them.

But then I read items like the following:

As we mentioned above, we are the messengers, encouraging developers who come up with legitimate video game inventions to protect, or at least give some thought to protecting, those inventions because that’s their legal right.

Not to get picky, but I don’t remember encouragement for legitimate video game inventions. I do remember reading that you can “patent everything under the sun”.

Also, they present a paragraph of philisophical questions. Can there be novel and innovative software? Shouldn’t someone be able to get a patent for such software if they could get it for a machine? If software can’t be patented, but the algorithm is implemented in a machine instead, is that somehow patentable?

I note that none of the questions are: Isn’t an algorithm in software simply math, which isn’t considered inventable so much as discoverable? I seriously believe that if software patents existed when computers were new, the for loop, if statements, and arithmetic functions like addition would have been patented.

And then the last few lines are the kind that upset me the same way their previous letter did:

Do we all somehow have a “right” to copy computer programs? Have you ever gotten upset at someone copying your work?

Once again, they tried to imply something that just isn’t the case. Getting rid of software patents doesn’t somehow grant everyone the right to copy computer programs! That’s called copyright infringement (and even then, there are some who believe that software can’t legally be copyrighted either), which has nothing to do with software patents. Do away with software patents, and all software is still protected under copyright unless it was explicitly placed into the public domain by the author. Whether your code is proprietary or open source, it is protected by copyright. No one can copy it without your explicit permission.

While I don’t believe these people can be equated to “ambulance chasers”, I would respect these “messengers” if they wouldn’t be so blatant in trying to confuse the issue and muddle the waters. Software patents and copyright law are confusing enough as they are.

Categories
Game Development

June’s Game in a Day Theme: Fusion

For June’s Game in a Day, the theme is fusion:

fu·sion (fyzhn) n.

1. The act or procedure of liquefying or melting by the application of heat.
2. The liquid or melted state induced by heat.
3.
1. The merging of different elements into a union: the fusion of copper and zinc to form brass; the difficult fusion of conflicting political factions.
2. A union resulting from fusing: A fusion of religion and politics emerged.
4. Physics. A nuclear reaction in which nuclei combine to form more massive nuclei with the simultaneous release of energy.
5. Music that blends jazz elements and the heavy repetitive rhythms of rock. Also called jazz-fusion, jazz-rock.
6. A style of cooking that combines ingredients and techniques from very different cultures or countries.

A lot of potential. I keep thinking of the episode of Invader Zim where the aliens try to fuse things together with duct tape. “Let’s feee-yuuuze him with this juicebox!”

I’ve been trying to come up with some ideas for this GID. I thought of one where blob-like organizms would combine together to form larger ones. Another one featured a Fuse Ray/Gun that would lock two items together: two enemies, an enemy and another object, etc. A third involves the main player riding around in a tank that would fuse to nearby objects that act as weapons or armor. Another ideas was a game where you have to mend pipes that are about to burst by fusing the cracks shut.

That tank idea apparently has already been done. TUMIKI Fighters is kind of like combining Katamari Damacy and a sidescrolling shooter.

I’ve decided to go with the Fuse Gun idea. I imagine it would be funny to see characters getting fused with objects and trying to move about. Two really quick characters might struggle to move together, resulting in a slow moving composite. Some objects might actually make them stronger, though. Fusing a metal bucket to a small creature would result in a living tank.

I’ve decided to use C++, Kyra, and SDL for this project. I think most GIDs seem to use Garage Game‘s Torque engine, but there is no rule about what you can use.

I’ve been warned by TomB in #gameinaday on irc.maxgaming.net that I really should pick something simple for my first GID. The fact that I feel I need a design means that it is too complicated. Perhaps he’s right, but we’ll see how I do.

The Design

Fuse Gun Blast, or FuseGB, is a game where the player can use a gun to fuse enemies and the environment together. I am thinking of making it an overhead game like The Legend of Zelda, and the player can move in 8 directions.

Fusing
When the player shoots the fuse gun, a charged bullet will continue until it hits a wall and disappears or hits an enemy/object. If it hits an enemy, the enemy is frozen and charged for a few seconds, and the player can shoot a second enemy or an object. The two will then fuse together, and their abilities and movements will be changed.

Enemies can be fused to existing fused groups. For example, if there are three enemies, you can fuse two of them together, then fuse the remaining enemy with the group. Objects, such as buckets, can be fused to these “enemy farms”.

For simplicity, two objects cannot be fused together, and nothing can get fused to the walls. If a fuse blast hits an already charged enemy, the enemy is simply stunned for a time, but takes no damage.

Levels
Each level is made up of a room filled with objects, walls, and enemies. Destroy all enemies to complete the level. The less ammo you use to destroy enemies, the more points you get. Fused enemies share the same life force, so fusing them together allows you to use less bullets to kill all of them at once. Objects such as dynamite and bombs obviously allow you to destroy larger enemies easily.

I’ll likely only have one level at the end of this GID.

Enemies
They can move about in 8 directions as well. Some are quicker than others. Some are bigger than others. If they touch the player, the player takes damage and/or dies. When fused with another enemy, their stats are kind of averaged out. Enemies with 1HP and 3HP in a fused enemy farm will have 2HP combined, for example. They will try to move independently, but obviously can’t. On the other hand, if they try to move in the same direction, the farm will move faster than either normally would.

Items
Some items will be explosives. Other items will be speed reducers, but they can also act as armor and add protection. I am thinking that some items can be fused to enemies, turning them into friends instead. But that might add too much complexity to an already complex design.

I’ll leave it at this for now. I’ll document the development process as I go and post a blog entry at the end. Hopefully, I’ll have a working game to show for my effort, but even if I don’t, it should be fun and I should learn a great deal.

Click below to track my June 2005 GID development progress:
Part 1
Part 2
Part 3

Categories
Geek / Technical

I Can Finally Make My Own Robot!

I’ve reading a few different articles about the new robotics kit being sold at Radio Shack. PC Magazine had a review of the new VEX Robotics Design System.

At about $300, it isn’t exactly cheap, but it is definitely a lot better than getting a kit that makes only one kind of robot. Those kits are usually not more than toys. VEX RDS is inspired by the kit handed out for the FIRST Robotics Competition. I never took place in the competition, but I can imagine it is a lot of fun.

I always wanted to build my own robot, but I never wanted to use the kits I had seen before. It would be like writing code but being told you can’t do anything but copy it from a page in a book. Sure it would be cool the first time, but I would want to be able to make my own creations. Now I can.

Categories
Geek / Technical Politics/Government

Why Monopolies Are Bad

My friend Larry Garfield posted about Yahoo!’s poor customer service recently.

Essentially, someone managed to get access to his Yahoo! account and changed the password. Larry contacted Yahoo! a number of times, and each time he got a scripted response that naturally didn’t help. I personally use a Yahoo! email account, but Larry doesn’t. He does make use of Yahoo! Messenger and Yahoo! Groups and a number of other Yahoo! branded communities. Losing access to all of these, especially as an admin for a number of groups, would be terrible. Larry described how he couldn’t get support because the zip code on file was apparently wrong, and Yahoo! support basically says that “according to their TOS it’s my fault and they’re going to refuse to talk to me anymore.”

This, my friends, is known as a monopoly. This is why monopolies and oligopolies are a very bad thing. If you don’t like that Yahoo Support is impotent, where else are you going to go? Do I get a new account and orphan dozens of mailing lists and put myself at risk of the same lack of support again? Or do I dump Yahoo, the dozens of mailing lists I’m on, the dozens of people I know on Yahoo Messenger, and lock myself out from some very active and often pleasant online communities?

Granted, there are other places to go. Google Groups, IRC channels, etc. But there are problems with going elsewhere, since not everyone you talk to will move as well. What Larry just described is called “vendor lock-in”. When people complain that they are tired of getting burned by security issues in Windows but are too invested to move on to greener pastures, that’s vendor lock-in. When you’re told “do it our way or don’t do it at all”, that’s vendor lock-in.

I personally haven’t felt the need to move to GMail since I was actually happy with Yahoo! Mail. I didn’t care about 1GB of email, since 250MB was pretty huge already and I didn’t see the difference. On the other hand, Google’s probably got much better customer service. After all, point 6 on their philosophy page is “You can make money without doing evil.” For one thing, their login for GMail is secure by default, unlike Yahoo! Mail.

Categories
Geek / Technical

Debian 3.1 Released

Good news for Debian fans: Sarge is now Stable!

Debian has a number of releases. The stable release is locked down and only security updates make it through, and I believe it is argued that, while usually out-of-date, it is the most stable distro release out there. Testing is where development can happen, but things are still rather well tested. Still, things can break, but it isn’t often. Unstable is where all new development occurs, and it has been called a developer’s playground. Expect things to break often there.

Debian gives their releases code names. Traditionally, these names derive from Toy Story. Currently, “Sarge” is the new Stable release, and “Etch” is now the new name for the Testing release. “Sid” is always the name of Unstable. It’s apropos since Sid was the name of the neighbor who would break all the toys.

Debian has always had a reputation of being safe yet useless since Stable had such old versions of packages. Now, even Stable/Sarge has OpenOffice.org, KDE 3, Firefox, Thunderbird, and many more applications.

While I’ll still make use of Testing/Etch, even people new to Gnu/Linux will have an incredibly stable, solid, and modern distro.

Categories
Game Development Games Geek / Technical

Difficult Questions About Video Games

I recently bought Difficult Questions About Videogames from PublicBeta. They are giving it away “free”, saying that it is £100 off and I only had to pay shipping…yet the book arrived with a price on the back cover of a little over £14. Not sure what that’s about…

Anyway, I actually like it. It asks questions like “What is a videogame?” and “What is gameplay?” These are terms that get thrown about in game reviews and general conversation, and yet no one has a definitive idea about what they actually mean. Also, they use videgame as a valid word, but some of the responses they received questioned its validity since it should be “video game” much like rap music instead of rapmusic.

And it is amazing how different everyone’s opinions are! Some people make a distinction between video games and computer games, claiming that the former involve dedicated proprietary machines whereas the latter makes use of general purpose computers and software. Others make some incredibly arbitrary definitions in my opinion (usually played with thumbs? Seriously?). My favorite was: “Pass.”

It is clear that the language of video games isn’t very clear. Everyone knows what a video game is, and yet everyone disagrees about the exact definition. We apparently can feel good gameplay, yet can’t say what be improved for something that has “bad” gameplay.

It’s hard to believe that with video games being as popular, profitable, and important as they are, we still don’t know how to talk about them so that everyone understands what we mean. At first “what is a videogame” sounds like a simple question, but if you try to define it exactly, you can quickly see that it is a difficult undertaking. Difficult Questions About Videogames is definitely a good read for game developers and players alike.

Categories
Game Development Games Geek / Technical

Will Wright’s Spore

I finally had a chance to sit and watch Will Wright’s Spore presentation at the GDC. Yes, I’m probably the last to do so, but I found out through from Game Girl Advance that even though I missed GDC, I still could see the presentation.

When I first read the articles about it, I remember getting very excited. Now that I’ve seen it, my only request is that it be available for Gnu/Linux. B-) If anyone knows anyone at Maxis/EA, can you please pass that request along? Thanks.

Anyway, there is almost always talk about how stagnant the video game industry is. Most of the highly anticipated games are sequels, and usually just better looking ones at that. Nothing truly innovative about them. People say that we don’t want more of the same, but if you look at the big sellers, we do. Games like SimCity and Katamari Damacy occasionally come along and are new, fun, and easy to get into, but most innovative titles tend to get great reviews but poor sales. I have yet to play Prince of Persia: Sands of Time, but I heard that it was an amazing step forward for games of its kind. Sales figures, however, say that most gamers didn’t care. Then the sequel, Warrior Within, was released. Apparently the developers of this title decided to play it safe and go with what worked in the past. Sales were great.

Was Warrior Within a good game? I haven’t played it, but I heard it was. Just not as great as Sands of Time. Half-Life 2, Doom 3, Unreal Tournament 2004…all of them sequels, all of them basically first-person shooters. Vehicles, shadows, and gravity guns are their claim to fame. The next Unreal Tournament looks awesome, but then, you could compare it to Half-Life 2.

That’s not to say that I think these games are bad. Far from it. I’ve always felt that people tend to put too much importance on innovation. Sometimes a good game is just a game that is fun to play. Imagine if there was only one copy of every game type. Would it be better if Wolfenstein 3D was the last FPS? No way! The ability to actually aim in three dimensions is a nice feature to have these days. Better user interfaces make for better games, even if you are playing what is basically the same game. At the same time, if you are only going to play games that invent new genres, you will miss out on a lot of quality games while you wait.

Will Wright’s Spore, on the other hand, shows that huge leaps in innovation are possible, and it also demonstrates that you can mix genres with great results. Granted, the game isn’t out yet. All I’ve seen is the presentation he gave. But the capability to make the kind of game he is talking about is definitely there. And you don’t have to be Will Wright to do it, either. He said that his biggest bottleneck was convincing himself that it could be done.

Most new game developers learn that they should never undertake a huge project when they don’t know how to do anything but come up with an idea. Start smaller. It’s good advice, but at some point, when the developer has more experience, that good idea has to be brought back out into the light. Everyone had that RPG they wanted to make. Everyone had that cool game mechanic they thought would make Super Mario Bros 3 so much better. After all, there had to be something that made you want to make games in the first place. You didn’t want to just make puzzle and Pac-man clones all your life, right?

…Right.

Looking at the project ideas I’ve come up with, I can see that they are impotent in comparison to Spore. I could console myself with knowing that Will Wright and Spore put a lot of game developers to shame; however, I’d rather push myself to do better. I can come up with much better ideas than what I have now. Yes, ideas are a dime a dozen, but that just means I can afford to come up with a few hundred or a few thousand. One of them is bound to be the beginnings of a great game.

So I’m optimistic about the games of tomorrow. Spore shows people that they can do much better. I’m sure others will make fun games that are innovative. And I’m also confident that I can be one of those developers.

For now, I still need to finish my first project, even if it is based on a clone.

Categories
Personal Development

May’s Monthly Review

It’s eye-opening to review your progress towards your goals every so often. GTD advocates will push for the weekly review. I try to use my Saturday mornings to go through my non-urgent snail mail, enter my monetary transactions into GnuCash, and update my calendar. I’m still pretty new to using GTD techniques, but I already know I can make huge progress. And while the weekly review is great, I know that I need to also schedule other reviews to keep myself on track, especially when I miss a week or two…or three. Maybe four.

That’s how May was for me. I wasn’t nearly as productive as I have been in previous months. I wasn’t keeping on top of things. I meant to keep a list of items on a pad of paper with me, but I almost never had it updated or nearby.

I did manage to make a simple game, as I mentioned in the Learning Kyra series. In the last article, I mentioned that I was considering the project complete and moving on. Apparently I didn’t listen to myself. I’ve already changed it a bit, and I’ve decided that I will continue to work on it until it is fully polished. Menus, levels, etc.

I unfortunately haven’t touched this project in weeks.

So I can see that this month wasn’t very productive, and yet I did manage to do certain things regularly. In fact, if I was this productive years ago, I would have been happy. So what went right?

The Unix utility calendar was an amazing tool for keeping me on track. It’s a command line tool similar to the Mac application Remind, which was covered at 43Folders.com a few months back. Basically, you enter a date, a tab, and single line into a file called calendar in your home directory. When you run calendar, it will tell you what’s going on that day, and you can also set it to tell you what happens for an arbitrary number of days or on a specific date. A portion of my calendar file:

/* PROGRAMMING */
Mon PROGRAM: 2 Hour
Tue PROGRAM: 2 Hour
*/SunLast Chicago Indie Gamer Meeting (last Sunday of month)
6/11/05 Game in a Day: Theme == Fusion
6/12/05 Game in a Day: Theme == Fusion
7/16/05 Game in a Day: Theme == Ghosts
7/17/05 Game in a Day: Theme == Ghosts

/* APPOINTMENTS */
8/20/05 Dentist Appointment @ 9AM

So as you can see, I have set aside Mondays and Tuesdays for programming a couple of hours a day. I also have some specific dates. This coming June 11th and 12th are the dates for Game in a Day. I also have a dentist appointment on August 20th. The last Sunday of every month is the Chicago Indie Game Developer’s meetup.

Ok, so now they are all in a file, but that’s not entirely useful by itself. What is useful is that the command calendar can be set to run whenever I login to a shell on my Gnu/Linux system. I added the following line in my .bash_profile:

calendar -l 7

Using “-A 7” would do the same. When I login to a shell, it will output what will happen for the next week. For today, for example, calendar -l 7 outputs:

Jun 02* DLC: Meeting
Jun 02 Open Source Seminar
Jun 03 PAYDAY!!!
Jun 06* PROGRAM: 2 Hour
Jun 07* PROGRAM: 2 Hour

Since I am always using my computer, this tool is great. Every day I am aware of the coming week. Even if I am not updating my own paper calendar, I always update the computer listing. I’ve been using it for months, and I keep track of appointments, weddings, and deadlines with ease. Even when I am having a poor productivity month, I will at least not forget important birthdays or anniversaries. Which reminds me…

And the fact that I am being reminded of anything means that I am keeping things in my head when they should be down on paper. Therefore, I’ve dedicated June as the month when I improve on my ability to track goals and progress.

Categories
Geek / Technical General

Wikis and Collective Knowledge

Wikis are great resources for collective knowledge. Wikis are counter to the culture in which copyright and patent laws encourage scarcity and “mine vs yours” debates. When everyone in the world is involved in a project, you would think it would break down, but they don’t. You would think that defacement would be a huge problem, but it isn’t. Most defacements are caught within minutes on Wikipedia, for instance. Anyone can make changes, but anyone can revert changes as well.

Wikis are great because anyone can make changes. Something missing? Add it! Spot an error? Fix it yourself! It’s open source hacking, but you don’t have to know how to program to participate. You just have to know how to write. It’s been used to document things publicly, such as software projects, but it is also used privately. Supposedly The New York Times used an internal Wiki for its staff.

I’ve contributed to a few Wikis, and I know more changes have been made since then by others. Post a comment and let me know what your favorite Wikis are!

General wikis:
Wikipedia: the free, online encyclopedia
Wike-Wiki: documentation on using Wine
Wiki Science: a Wiki about Wikis?
A Wiki in the Desert: about the game A Tale in the Desert

Game Dev:
Game Programming Wiki
Indie Wiki
Game Programmer’s Wiki
PixelateWiki
UnrealWiki: about the Unreal Engine

Programming:
GCC Wiki: about the Gnu Compiler Collection

Technical:
KDE Wiki: about the popular, open source desktop
Gentoo Linux Wiki: all about the popular Gnu/Linux distro
Linuxquestions.org Wiki: learn all about Linux