Sunday, May 29, 2011

Battle for Venga Islands Post Mortem...

So, the game has been out for a few days now, and I've some chance to reflect, I figured I'd write down some notes.

The Good

As a pretty mature technology, there are a lot of libraries that people have created for XNA game programming.  This is wonderful.  I love using stuff that other people have made and provided for free.  I'll even modify my own game design vision if I can find free tools that are cool enough to lead me in another direction.


When I first started playing around, I tried to implement Andy Shatz's lighting algorithm, with only moderate success.  I was never really able to able to get it working 100% (my own fault).  I soon after discovered the Krypton Lighting Engine, and immediately thought it was a better choice for my purposes.  It was simple enough to conceptualize, but powerful enough to perform well and do what I wanted.  My game isn't very light/shadow intensive, but it added some cool effects.

I also used the Mercury Particle Engine again, and will always continue to do so.  There's absolutely no reason I can see for anyone to ever write their own particle engine while this thing still exists.

I also used Renier Prokein's character sprites, and am amazed at how much awesomeness he has just given away for free.  Love it.

And finally, the key to the whole project was using the fantastic Spyn Doctors high score sharing component.  This is an extremely well done peer-to-peer data sharing component, with nice documentation and example implementation (for sharing high scores).  This is the backbone to the game.

When it comes right down to it, the game was kind of an experiment.  Was it possible to do a persistent peer-to-peer world?  A massive p2p structure isn't really something you can test on your own little network, either, so I did a lot of visualizing and thinking rather than coding and testing.  I'm pleased to report that it works perfectly.

Releasing the game was a thrill, because the high score list started out blank, and the map started with default positions captured.  But as time passed during release day, the high score list started filling up, and regions started being captured.  In fact, with so little data per transfer, you could see people responding to previous captures, trying to head them off at the pass and so forth.  With "Bad Golf", I had to wait a couple days for feedback, so it was neat to see people actually playing the game.

I'm also pretty pleased with the actual gameplay.  I like the four weapons, and think they have distinct strengths and weaknesses.  The enemies are ok, but maybe not varied or interesting enough.  Initial testing indicated, though, that the gameplay was fun and addictive, and some of the high scores bear that out (you simply can't play the game over 500 times if it's really that bad, right?)

Adding the health drops were a late change, and I though they added a fun decision point.  Go for the health that's in a dangerous place, or stay safe?

I was also put in touch with a student musician, and was pleased by the music he created for the game.  My boy Eryn also created a really nice loading image for me, which was awesome.

The Bad

After enough time passes, I simply lose motivation.  The map data has things like elevation and biome type, and it would have been great to have more varied environments to fight in.  I sufficed to change the background color of the ground, but that's it.

I also didn't realize how locked up the map would be once all the regions were full.  New players were entering the game with only "Difficult" and up regions available.  I wish I did more testing to realize that would be the inevitable result.

The reviews that I've read are pretty spot on.  The game is good, but not great.

The Ugly






When writing the game, I didn't take any measure to data security.  Spyn Doctor even warned me that my data files might be at risk, but I ignored his advice for security.  I figured that if my game was popular enough to get hacked, then I was ahead of the game anyways.

So when it actually happened, when I woke up to see a high score of over 19000, I was surprised by my emotions.  I was upset and pleased and happy and angry all at the same time.

I also released the game right at the end of a big list freeze, and also just before some other big names were dropped onto the New Releases list.  So that timing wasn't optimal.

The Future

Given the success of the peer-to-peer persistent world, I'm encouraged to try something like that again.  I'm also excited about my upcoming 1.1 patch that will fix some of the above problems (data security, difficulty issues), and I'm just sorry it wasn't part of the initial release.

In the end, I'm pleased with the game.  I had secret hopes of it being a huge cult hit, but I'm happy that it all worked as well as it did.

Friday, May 27, 2011

Time Lapse

One of the big bummers about the XBLIG platform is that trial games can't join network sessions.

The real selling point of Battle for Venga Islands is its online map, and you don't really get a taste of that when you download the demo.

I don't have a good way to doing time lapses, unfortunately, but I set up my camera on a tripod and took a picture every couple of minutes, to give some sense of what happens in the game.  It's totally budged, but I hope the idea gets across.


Battle for Venga Islands 1.1

Working on the 1.1 update.

  • Difficulty ratings are decreased.  Surrounded regions behind enemy lines will still be very difficult, but border regions should be easier.
  • Ocean regions act as friendly neighbors.  This is a pretty big change, and means that there should be a lot more opportunity to start new attacks behind enemy lines.
  • Data files are now tamper-resistant (I hesitate to say "proof").  Hopefully this should make it harder to hack the leaderboard.
  • Health balls will drop slightly more frequently.
  • Players can now change teams (one time only!)
I think the first two will make a big improvement to the game.  It was really difficult to imagine how the game world would play out, and I didn't foresee it getting as locked up as it has.  So I'm anxious to get these changes out asap.

Thursday, May 26, 2011

Hacked

Well, it was only a matter of time.

I really have no idea about the file system on the Xbox 360.  However, I do know that you can save files to a USB drive, and then take that USB drive and plug it into a PC.  So it's probably reasonable to think that someone would have access to saved game data.  When creating the game, I never really cared about protecting the data.  I figured that if the game actually was popular enough that someone wanted to hack it, I'd consider that a success in its own right.

I save a file called "MyCapturedRegionCount.sav".  It's four bytes (one integer) long.  I'll give you a million dollars if you can figure out what data is stored in that file.

Someone apparently already figured it out and edited the file, and now we have a new surprise leader on the Hall of Champions!  Previous high score was 550 or something.  New high score?  OVER 19,000!  So much for subtlety.


Since discovering this, I've gone through all kind of emotions.

I'm angry, because one person is ruining the integrity of the game, and potentially costing me bad reviews, lost sales, and lost income.

I'm disappointed that someone would want to take a good thing and ruin it, just because they can.

I'm immensely proud that I've actually created a game that someone cares enough to hack.

I'm intellectually challenged, and want to fight back with encryption and checksums and so forth.

I'm defeated, knowing that whatever safeguards I put in place, there will always be a way around it.

I don't really know how to proceed, so I think I'm just going to wait and watch and see what develops.  When faced with conflicting options, I've found that "do nothing and see" isn't a bad one.

Wednesday, May 25, 2011

The XBLIG marketplace is broken


 Here’s what’s supposed to happen:

1)  Developer makes game, and publishes to the Marketplace.
2)  Game shows up on “New Releases” list, and is highly visible to consumers.
3)  People buy the game, and the Game shows up on the “Top Downloads” list.
4)  If people like the game, it gets rated highly, and goes on the “Top Rated” list.
5)  As new games are published, the “New Releases” queue moves, and old games fall off the end.

The problem is that #3 is broken.  The “Top Downloads” list hasn’t changed in over two weeks.  This is great news for people who happen to be on it at the time it was frozen.  This is terrible news for people like me who just released a game.  We’re missing out on prime visibility.  With Bad Golf, 95% of all sales were made in the first few weeks while the game was on the lists.  Once it fell off the New Releases list, that was pretty much the end.  So these first few weeks are critical.

I was so excited to release this game, I didn’t even think to check on if the Marketplace was working.  You just kind of assume that it would, ya know?

There are worse things that could happen, but still, it’s a little disheartening.

Tuesday, May 24, 2011

Day 1 Thoughts...

The game has been up for over 24 hours, and it appears to be working as designed.  I'm very excited.

I didn't anticipate two things.

The first thing is how difficult it would be to press into enemy territory, once battle lines are established.  I knew I wanted to have a range of difficulty levels, and make it easier to attack regions where you own some of the neighbors.  But I didn't realize that the difficulty level would still be Challenging, Difficult, or even Heroic/Legendary.  I also didn't realize how difficult it would be to try to re-capture an island if it's entirely owned by the other team.

The other thing I didn't realize was how addictive the game would be for some people.  I was astounded to see some players capturing hundreds of regions on the first day.  The high score list shows players up over 200 and 300 captures.  Pretty impressive.

I'm not allowed to submit a patch to the game for a week, but I'm considering the following:

1)  Reduce difficulty levels by one level across the board.
2)  Make ocean regions behave as friendly regions when attacking a coastline.

The idea is that the FUN part of the game is attacking and gaining regions.  I don't want to make it TOO easy, but I think it's too difficult at the moment.  I also would like to make it harder to dominate an entire island, and I like the idea of a sneak attack behind enemy territory... hence the ocean change.

I'm going to think hard about these changes over the next week, and monitor the map to see how it goes.  I don't want to make any rash decisions. 

I'd appreciate any user input, if anyone is reading this.

Monday, May 23, 2011

Dude!

The map is filling up fast!

I'm a little concerned about how things will work once all the regions are taken.  Obviously I knew that was going to happen, but I just hope there are enough regions that aren't all Heroic and Legendary to fight over.  I was able to singlehandedly take some Heroic regions, so it's possible, and with a teammate, it should be even easier.


It's been a crazy day.

The Battle for Venga Islands has begun!

When I checked on the status of my Peer Review this morning, it said it was ready to publish!

All thoughts of timing the market, waiting for summer vacation, and so forth went right out the window.  I decided to try the ol' "Monday morning 8am release."  I published at around 8am, and the game was available to play by about 10am or 10:30am.

I sent out a slew of emails to some reviewers saying "try my game!", and then sat back and watched.

I have a little "Online" indicator that is a debug tool to tell when data is being transferred to another client.  I was able to watch that light up, and look around the map and see that some new regions were captured.  I also have a "most regions captured" high score list, and I started seeing names pop up on that.  IT'S WORKING!

After an hour or so, some people have gotten online, captured a region or two, and left.  But one or two players are systematically capturing strategic regions, trying to surround the starting lands of the other team.  Another player noticed this, and they are in kind of a slow-moving chess match trying to surround each other.  It's thrilling to watch.

There are currently 11 people on the high score list (including me).

I can't wait to see how this all shapes up!

With Bad Golf, I had no sense of when people were playing the game, or how much.  I just needed to wait a couple days to actually see results show up in the reports.  With this game, I get a very real sense that people are actually playing it RIGHT NOW, and can track their progress.

So cool.

Friday, May 20, 2011

Venga Island Predictions...

BfVI is making its way through Peer Review.  It has 5 or 6 passes (out of 8 needed, I think?), which has gotten me thinking about release day.

The Powers That Be added a new feature to the XBLIG system, which is that developers can now choose their own release date.  In the previous system, games that passed Peer Review would automatically go to the Marketplace.  Now, they go to a holding area until the developer actually clicks the "Release" button, and they appear on the Marketplace within 24 hours or so of that.

This allows for you do build up some buzz before the game is released, and perhaps also time your release to a coveted Friday release day.  It's a double edged sword, though, because if everyone did a Friday release, you'd get shoved down the "New Releases" list pretty quickly.  So it's a big meta-game.

I don't know when I'll release it.  I'm thinking on a Monday or Tuesday in an attempt to maximize time on the New Release list, but who the hell knows.

I was just daydreaming about what it will be like when the game actually goes live.  I will buy the game myself, and start it up.  I will be presented with a blank map, with only a few initial regions claimed by either Queen Allison or King Burr the Little.  In a best-case scenario, the regions will start to be populated before my very eyes.  Every minute or two, the map will update as other players buy the game and start conquering regions.  Since it's easier to capture adjacent regions, hopefully the Red and Blue areas of the map slowly expand outward, and battle fronts form.  The high score list will get populated with the Top 100 players, and people will vie for the top spot.

The worst case scenario? I can think of a couple.  The game crashes for an unknown reason at random times.  The entire map turns instantly to a single color (indicating that someone hacked or cheated and claimed every region).  Or the map simple doesn't change at all because no one has bought or played the game.

Who knows?  But I'm dying to find out!

Wednesday, May 18, 2011

Battle for Venga Islands

After Bad Golf, I took a month or so off of game programming, but then I got a bit of an inspiration.

I read about Spyn Doctor's high score sharing component. This is a bit of code that replicates the idea of a central, shared scoreboard for a game. So, pretend you have a Space Invaders game. It's a single player game, and you play to see how high a score you can get. Wouldn't it be fun to see other people's scores? This component allows for that.

What it does it open network connections while you're playing the game, and it looks for other people playing your game that that exact same time. When it finds someone, it takes your high score table, and their high score table, and merges the two together. So now your high score table has aggregated scores from two people. This process repeats, always looking for other players, and keeps sharing and sharing and sharing as much as possible. And when you share, not only do you share your own high scores, but all the high scores in your list (that might have come from somewhere else). So scores propagate around the system. It's very unlikely that everyone's high score tables will be in sync, but you get the idea.

Now, the glorious thing about the code is that it's generalized. It doesn't HAVE to be used to share high scores. It could be used to share any kind of data. He just provides sample implementation of sharing high scores.

So I got to thinking. What kind of game could I make that shared some other kind of data?

The immediate issue is synchronization, or lack thereof. You have to make a game where it's ok for things to be out of sync as you share data with someone else.

My first thought was something like this: What if you have some huge amount of "work" that needed to be done. Each player begins playing, and requests pieces of work that haven't been done yet. When they finish a piece of work, they mark it as complete, and repeat the process. The data that is shared, of course, are the pieces of work that I've completed.

The idea is very much like the SETI@Home system. It doesn't matter if multiple people work on the same piece of work, as long as SOMEONE does it.

So, what kind of "work" could I provide to players that would be fun? My first thought was a giant maze. Like, a 2D maze that you'd make on graph paper. Each cell of the maze is a room (like, in Zelda). Players would play some little game in the room (like, killing all the monsters), in order to mark it as complete. When a room is marked as complete, that data is shared with all other players. If multiple players mark a room as complete, it's ok. Nothing breaks.

As more and more players fill in the maze, everyone can build off each others work, and finally complete the entire world. What then? Who knows.

Early Maze Game


That idea morphed a bit into having a country, with multiple regions in it. Players would be assigned to one of two teams, and try to capture regions, again by playing a little mini-game in each region. Region ownership data, then, would be the data that is passed around to peers.

I started out with an SVG map of the United States, divided up by counties. Dealing with SVG proved beyond me. But I found some fabulous information about making polygonal maps, including a tool to create your own and export it as XML. Soon enough, I had my own big map going.

Early Map



The game started to take shape. Players are assigned to either the Red or Blue team. They look at the map, and who owns what regions. They choose a region to try to capture, and play a little twin-stick shooter mini game to try to capture the region. If they capture the region, then that goes into their "high score list", and marked as data to be traded with other peers.

During development, Magicka came out. So I tried my hand at special effect programming to make some cool spell effects, and that did a lot to set the tone of the game.


Early Gameplay


The key to the entire system is that the time that each region is captured is stored in a synchronized timestamp. When region data is compared, that timestamp is used to determine who owns the region.

An example is in order:

Player R is on the Red team.
Player B is on the Blue team.
Player C is on the Red team.

Player R captures region #123 on his own local Xbox.
Soon after, Player B captures the same region on her local Xbox.
Player C doesn't do anything.

At this point in time, all three maps are out of sync. Region 123 is claimed by red for R, blue for B, and unclaimed for C. (Do you see why?)

As the games detect each other on the network, these differences are worked out. If R and B connect, then B's map won't change, but R's map will show the region now owned by the Blue team (because B captured it later). When either R or B connect to C, C will be updated to show the region owned by Blue.

When taken all together, this provides a shifting, changing, evolving battlefield. IT DOESN'T MATTER that everyone's map may be wildly out of sync. What only matters is that each individual player will see their own map changing.  Until I'm proven wrong, I think this is pretty clever, and I don't think anything like it has been done on the XBLIG platform.

After some time, the map and gameplay were all pretty much set. I added a Difficulty rating to each region that is dependent on the surrounding regions. That is, a region that is surrounded by regions owned by your team should be much easier to capture than regions that are surrounded by (or owned by) your opponent. This should (I hope) have the effect of creating natural "battle fronts".  It should be pretty impossible to capture a region that is "behind enemy lines", but much easier to capture regions on the border between yours and theirs.

I also added a "Regions Captured" high score list, that is shared in the traditional way.  This is a globally shared list that shows the top 100 conquerors. This should provide some motivation for players to capture more and more regions for their team.

I'm a PS3 and PC gamer. Multiplayer gaming has always been free for me. To do network gaming (even data sharing in the background!) for the Xbox, however, requires a paid membership. This meant that only a subset of actual players would get the full experience of taking part in the dynamic world. Everyone else will just have a blank map that will never get updated. Pretty boring. I added a "Quickplay" option, where they can just play the fighting part of the game (and choose their own difficulty), but I admit I'm not sure that's worth the price of the game.  Luckily everyone gets to try it before they buy it.

After a few months of development, I got things all up and tested. I enlisted my friend Eryn to do a pretty cool loading screen, and was put in touch with a student musician to do custom music for me.

I threw together a little video and some screenshots, and submitted for review!








And some screenshots...
















The whole thing is a pretty big experiment, but I've gone over it every which way in my head and don't see any reason why it shouldn't work.  It's halfway through peer review, and should come out very soon, so nothing to do now but wait and see!  I plan on leaving my Xbox on, at least for a while, to see how the world evolves.  Should be pretty exciting!

Monday, May 16, 2011

Bad Golf

In September of 2010, I started working on "Bad Golf".

I'd been playing a lot of "Stick Golf" for the iPad, and figured I'd more or less rip off the concept. The idea of a 2D physics golf game isn't anything new, harkening all the way back to gorilla.bas and Scorched Earth, so I didn't feel too bad about it.

Bad Golf was intended to be a multiplayer golf/fighting game. The players would play golf on a 2D side-view course, but between shots, they could fight each other and slow down the other players from reaching their ball.

Once I got the main golf game going, I saw that I was going to have a problem. I wanted to have courses that had "islands in the sky", or other kinds of landscapes and layouts that wouldn't necessarily be readily accessible by a player running around. Would they have jetpacks? Or grappling hooks? Or could they climb vertical walls? Pretty quickly, I nixed the whole fighting aspect, and just went with a straight golf game (but the title stuck).

After working on so many projects where I lost steam, or painted myself into a corner, I knew that I needed to rely on as much external help as I could. For example, I was absolutely willing to change my vision of the game depending on what free tools and libraries were available. Many people wouldn't settle for a third party particle system library, for example, because it didn't have all the features they might want. I knew that if I took the time to write my own, I might run out of gas before I got to the end.

Bad Golf makes heavy use of the Farseer Physics Engine, and it's great. It took some time and effort to figure it all out, but soon I had a ball bouncing around the screen. Farseer has "texture to physics" functionality, which basically meant all my course design could be done in a paint program. One less tool to worry about.







Particle effects were done with the Mercury Particle Engine, another fantastic tool for making pretty flexible and substantial particle effects. Why on earth would I even start creating my own particle engine when I have options like these?

Coding was pretty easy. The game is straightforward enough that I didn't need to struggle with any design decisions or tuning problems. Course creation was a big pain in the ass, but I eventually got to the point where I said "screw it, it's good enough" and pushed forward.

I wasn't going to plunk down the $99 for the Creators Club fee until I was damn sure I was actually going to release the game. When I finally got to the point, getting it up on the Xbox was pretty much a breeze. I did have one big issue, in that it took about 40 seconds to load a level on the Xbox, compared to maybe one second on the PC. This was a problem, and introduced me into the wonderful world of the Content Pipeline.

You see, every time a level (hole) was loaded, I was reading in multiple graphics files. One was the background, and one was the foreground, but another one defined the physics of the hole, and another one had the special features (water hazards, sand traps, tee location and hole). Those last two textures had to be analyzed, and the texture-to-physics process run. What I realized was that I could do all that analyzing at compile time, and spit out raw level data. Then, in my game, I didn't need to recalculate everything, I just read in raw data and draw my level. Load times went from 40 seconds to sub-second. Classic Content Pipeline problem.

I was surprised at how much plumbing needed to be done, once the final gameplay was all working. Menus, fonts, screen changes, high scores, blah blah blah blah. That was kind of tedious. I used the Game State Management sample as a base, but customized it. Spending time learning the GSM is well worth the effort. It's a great starting point to any game.

I enlisted my friend Eryn to work on art for me. He did a fantastic job, but I quickly realized that it would take a lot of time and effort on his part to make 36 pictures.



So I found some textures and did some Photoshop magic to create a kind of flat-paper theme. Good enough. I threw together an official preview video, and I was good to go.



Bad Golf had a relatively uneventful playtest, and went into peer review in early December. On December 24th, it was released to the Xbox Marketplace. A day I will never forget. My game was actually published. For professional game devs out there, this maybe isn't a big deal, but as a hobbyist, this was huge.

I had no idea what to expect. Honestly, all I wanted to do was make my $99 back. Spending all that time and energy and losing money on the deal would have sucked. I told myself that I wasn't doing it for the money (and that was true), but it still would have sucked.

I had to wait a few days for the first sales reports to come up. I asked a friend of mine at work to guess how many copies were tried and purchased? He guess eight trials and one purchase. The real answer was something like 700 trials and 200 purchases. I made my $99 back on the first day!

While Bad Golf stayed on the New Releases list, it continued to get dozens of downloads per day. Then it pretty sharply dropped off, and for the last four or five months has been getting about 2-3 purchases per day.

Here are the statistics, as of today:
Trials: 7251
Purchases: 1760
Purchase/Trial Ratio: 24.27 %

That 24% conversion rate is something I'm pretty proud of.

The first week of sales (the last week of December, 2010), netted me about $500. The next quarter (Q1 2011) netted about $600. $1100 over the course of a few months isn't life-changing money, but it's satisfying to know that people are out there playing my game.

What I didn't expect were the reviews. It was thrilling to read reviews of MY GAME out there on the Internet. Some reviews were prompted my emails from me saying "Please review my game!" Others were just on their own. One guy made his own YouTube video of him playing the game. These were all awesome.



This was pretty much the icing on the cake:



Bad Golf is a crummy little golf game, but it's MY crummy little golf game, and I'm proud of it.

In the Beginning

I've been a gamer for about as long as I can remember.

My family got an Apple ][+ when I was around 6 years old. I still remember that the two games that came with it were "Castle Wolfenstein" and "RobotWar". The former got me into gaming, and the latter probably kicked me off as a programmer.

As an adult, I still play games, but also tend to swing back and forth between that and actually trying to make games. I've started dozens of projects, but I usually get to the point where I say to myself "Who is actually going to play this? Maybe my friends will humor me, but is it really worth all this effort?"

The along came XNA and the Creators Club.

I'm a professional C# programmer by day, so XNA wasn't too difficult to learn. And after so many failed projects, I'd already learned a lot of lessons on my own.

I've said it before on the forums, but I'm still totally shocked that Microsoft gives us access to all the tools needed, as well as a publishing platform to MILLIONS of Xbox Live players, for an annual fee of $99. This really is a dream come true, and was sufficient motivation for me to actually finish one of those projects I'd been working on. Not having any audience or publishing platform was a sufficient deterrent, but the final piece of the puzzle was now in place.

printf("Hello, world");

So, I figured with my second game coming out, I might as well start an official game development blog. More soon.