Wednesday, December 31, 2008

Game Cow Week: Day 3


I stopped early today, about 5:30, because it was new years, and because I was starting to get burned out. Although after nearly thirty six hours of programming in just three days, it’s not much of a surprise.

I got some good stuff done today. I added barricades, two varieties, that can easily be expanded into three. I set it up so that when you place a barricade it barricades all four sides of the tile, with an empty space inside which you can place defenders. The defenders can then shoot out of the barricade at the passing zombies. I also got the zombies to chase defenders, so if a zombie sees a defender it will attack it, meaning that packs of zombies will move out and swarm around defenders. So if you have a defender behind a barricade, then the zombies will swarm the barricade and beat on it until it falls apart. The path finding works so that the zombies will sometimes decide that it is faster and easier to beat their way through a barrier, rather than going around. Also at times the zombies will be going around a barrier, except for a few who are trying to get at a defender who is inside. When they finally get through the barrier the other zombies will start following the shorter route opened up by the destruction of the barrier.

I also added a water tile. Water tiles slow zombies down, so they will avoid them if possible. I’m thinking it would be fun to have zombies randomly get washed away in the current, and that shouldn’t be too hard to implement. Maybe I’ll do that tomorrow.

Another new feature is two additional types of zombies. Now there are the standard slow zombies, a faster variety that moves about three times as fast, and a big powerful zombie that moves slower than the others, but is much tougher. The big zombies are giving me a little bit of trouble, because they move slower they don’t flow through the level as nicely as the other varieties. I’m going to have to play around with them some to see what I can do to get them to work better.

Tomorrow I’m going to dive into developing the humans more. I think it could be fun to have the human units be unique, something like your units in Fire Emblem, which would better facilitate a story and be pretty unique for a tower defense game. But I don’t know if that will work out. Usually tower defense games require you to have lots of towers out on the play field, and if I have the units be unique I’m probably looking at only about thirty or forty units total over the course of the whole game. A possible solution might be to have a mix of hero units that are unique, and generic grunt units that aren’t unique. I guess time and playtesting will show what will work.

Labels: ,

Tuesday, December 30, 2008

Game Cow Week: Day 2

This morning started off a little rougher. I realized that I needed to rework some of my underlying systems, so I spent most of the morning doing that with little visible result. But the change will pay big dividends in the next couple of days.

What I was doing was having each of the objects using their own timers to update things. This made it really difficult to script anything, because the zombie spawners couldn’t be controlled, and the zombies themselves couldn’t be paused or anything. So I set it up to have one class that has a timer, and it sends tick events to all of the objects that need to be updated. Certainly not anything new, but it works well, and it allowed me to easily implement a pause function. It will also make it easy to put in story events.

The reason I had to add this in today was because I was working on making it so that the user gets a bit of time at the beginning of the level to choose which building to hole up in, and where to place defenses. The way it was working zombies would just start spawning as soon as the level started, but now I’ve got it working on a schedule.

Which brings me to the new features. As seen below in the screen shot you can select which building you want to hole up in. This also necessitated some path finding for the zombies, since they might need to head anywhere in the level. Rather than implementing AI for each of the hundreds of zombies on screen at any time, I set them up to use a technique called potential fields. What I do is use Dijkstra’s algorithm to find the shortest path from any point on the map to the target building. Then I set up each tile on the map with a force vector to push the zombies towards the next closes tile. Almost like the zombies are little scraps of paper being blown about in the wind. It works pretty well for herding hundreds of zombies towards their destination, and assures that even if one gets off the normal path it can still find its way.



I also added in human defenders. In the second screenshot you can kind of see a couple of little blue guys, and you can see some of their bullets that they are shooting at the zombies. They work pretty well, too well in fact. I’m going to have to do some balancing, five or six guys strategically placed can take out thousands of zombies no problem. I’m hoping to tackle that problem some tomorrow.



I’m planning on having the human defenders be subject to attrition, over time their morale drops, and they need to go back to the base for a while. That should make it interesting as the player constantly has to move defenders around, to keep fresh ones near the front lines. Also, at the moment zombies don’t even touch the human defenders, I’m going to have to fix that as well, that will require some interesting programming I think to get nearby zombies to head towards humans. Additionally I’m hoping to implement an experience system. In most tower defense games you level up your defenses by spending resources gained from killing baddies, I’m thinking instead that I want the defenders to level up as they kill zombies, which again will figure into the attrition thing.

So, tasks I’m hoping to look at tomorrow include: zombies attacking defenders, adding in barricades that the player can set up in the streets, different classes of zombies, and different classes of defenders.

By the way, if anyone is curious I’m using the Torque Game Builder. I’ve been really impressed, especially at the speed that I’ve been able to learn it. I looked at it a little bit about a year ago, but it’s been pretty easy to get up to speed on. I don’t actually own a license yet. I’m going to be buying one when I finish the week out.

Labels: ,

Monday, December 29, 2008

Game Cow week


Today I started an experiment, to see if I could build a game in one week. I’ve heard people describe what a great experience it was, and I’ve heard others talk about how it can sometimes take a big hairy audacious goal to really motivate you. So I came up with the idea last Saturday, I thought about it Sunday, and this morning at 7:30 I started working. I'm calling it game cow (Complete in One Week) week. If it goes well I may need to make it an annual event.

I’m going to update every day with progress reports, and screen shots so you can see how it’s coming.

It’s going to be a tower defense style game, with zombies. So today I worked on laying out a city that you could defend, and getting the zombies to walk through it. The image is a screenshot of what I got done today. You can see the hordes of zombies parading through the city.

I’m going to see what else I can get done before bed tonight, but tomorrow I’m going to start work on dynamic path finding. Today the zombies follow a hard coded path, but the player will be able to select which building they want to put the survivors in, and they will be able to blockade roads, so I’ll need the zombies to figure out the best path on a changing map.

Tomorrow will also see work on defenses. I’ll come up with some soldiers that the player can put throughout the city to take down the zombies as they go shuffling past.

If everything continues to go as well as it did today. Then I should have a functioning demo on Saturday for people to play. It won’t be very pretty, but it will work, and it will be fun. Check back daily for more zombie programming madness.

Sunday, December 14, 2008

An Expressive Tool Unique to Games

In order for games to become a valid and recognized art form, they are going to need to stop relying on the expressive tools of other mediums. All mediums, when they first come into being rely on the expressive tools of other mediums. For example, for the first period of their life movies were largely stage plays that were filmed. Then people discovered all of the unique things you could do with a camera that you can’t do with a stage play. Similarly, video games are often viewed as interactive movies, or interactive books, or interactive comics, basically an interactive version of some previous format. Eventually, we hope, game makers will figure out the expressive tools that they have at their disposal and put them to good use. Today I wanted to talk about what I thought could be a particularly powerful expressive tool, unique solely to games—alternate timelines.

For the most part the other mediums, if they even include time as a dimension, are strictly one dimensional. No matter how they are presented there is only ever one way that the events occurred. Occasionally a work will dabble in with this, showing what could have been had a single choice been different, but it isn’t common. Games however have vast potential in this area. As the player moves through a game world, making decisions they are changing the narrative landscape, and bringing the story to a place uniquely their own. Each time they play through they can see a different aspect of the world, and see what effects a different decision would have brought.

Imagine a game where the player is trying to save a town from a disease. On the first play through they work tirelessly to overcome the disease. The disease spreads viciously, claiming a good portion of the town, but in the end they beat it back and triumph. This could be a story about the power of humanity in the face of terrible hardships. On the second play through, they play in a more relaxed manner, and discover that the disease doesn’t spread as viciously. Over many play throughs they come to realize that the spread of the disease is connected to their efforts to fight it, and the game becomes instead a story about the need to relax and accept our position in nature. The true nature of the game world only becomes clear after the player has gone through the game a couple of times, and seen how their choices affect the events of the story.

This adds another dimension to storytelling. Almost the way sculpture adds another dimension to paintings or photographs. It doesn’t necessarily make it more expressive, but it does offer a powerful expressive tool that is not as readily available to other forms of art. I believe that this will be a key technique as we learn to give video games their own expressive voice.

Sunday, December 7, 2008

Game Length and Narrative Power

Let me describe to you what I believe the best format for a narrative game would be. First, a first time player would be able to be played through the game in around four to eight hours, with the length depending largely on the scope of the story being told. Second, the game would be broken into chapters, or acts, with each act taking around one and a half, to two hours to complete. So far what I’ve described sounds like a short novel, or a long movie trilogy. Playing through a game of this kind sounds like it would be about the same as watching the Lord of the Rings trilogy, or the Star Wars series. But here’s the difference: to make the most of the interactive medium, these games would need to tell stories interactive enough that the player could play through them three or four times and have radically different experiences each time. I’m not talking about different meaning the first time I shot everyone on sight, and the second time I snuck past everyone. Or the first time I chose the evil dialog tree option, and the second time I chose the good dialog tree option. I’m talking about differences where the entire meaning of the story is changed from one play through to the next, by seamlessly integrating each of the player’s actions into the story, and reacting to those actions in an intelligent way.

That is where we will see the true power of interactive storytelling, each play of the game will render a different experience, but each shedding additional light on the story’s primary theme. As the player chooses different approaches to the game, the narrative would change and reflect the game creator’s views on the subject. Each play-through would show a different aspect of the story, with it a different view of the designer’s vision. Additionally different characters could be used for subsequent play-throughs, allowing the player to see the same events from a different perspective, and gaining even more understanding into the importance of what happened in the game. In this way the interactive nature allows the author to speak more clearly, not just showing or telling the player how they feel about the world, but actually making the player experience it.

There are a couple of reasons why a game of this type would have to be kept short. First, replayability. A game that takes forty or so hours to get through is going to be a difficult to play through multiple times. Further, at forty hours there is just too much story for the player to remember and be able to contrast across different play sessions. Second, development costs; highly interactive stories are very difficult to make, which is why a lot of games are very linear. In order to create a game story that is able to support player influence, it needs to be shorter than the average game. Fortunately, the cost of creating a deeply interactive story will be offset by savings in art assets. The player would still experience forty or so hours of play, by playing through to experience the different facets of the story, but each one would be done with the same art, meaning that the game would require around a quarter of the art a typical game requires.

In the end a game narrative that really allows the player to author the story with their choices would be much more compelling and satisfying than a linear story that lasted even four or five times longer. But more importantly, such a game would be able to be truly artistic in conveying important themes and ideas to the player. Such a game would be more than just an interactive movie, or mindless diversion, it would be a culturally relevant piece of artistic expression—that also happened to be a video game.

Labels: ,