Sunday, June 24, 2012

Turquoise Mars & Dream.Build.Play 2012

The strange, minimal banner for the Dream.Build.Play contest
A few weeks ago, Microsoft's 2012 Dream.Build.Play contest concluded it's entry acceptance period.  I wasn't going to do an entry this year, but after the Game Developers Conference, I decided to.  There was one problem though:  I only had about 3 months to create my game.  Even if it would be a colossal failure, I decided to crunch, and, to my surprise, I actually finished!  Now, unlike last year, mobile games for the Windows 7 Phone were accepted so I decided to do that.  I figured it be easier in some aspects and a change of pace from keyboard and controller input like I was used to.  My game definitely leaned away from the easy side, at least in my opinion, because I decided to do 3D graphics instead of 2D and learning and getting the hang of touch inputs was definitely a challenge, but after several months of long, frustating nights, I was able to finish my game, Turquoise Mars:


Ooh, a trailer!

  The Idea

So where did I get the idea for this strange game of giant rats, clawed warriors, and floating heads of evil?  It's a rather simple answer:  John Carter of Mars.  There, I said it; I'm not ashamed.  I saw this movie during my last day at GDC in San Francisco with a coworker, and though it wasn't the greatest movie -- alright, it was pretty cheesy -- there were some aspects to it that I liked, particularly the costume design.
Even on the Red Planet, good guys wear blue!
I even got part of the title, obviously, from this movie.  Anyway, I decided to take some theming cues from JCoM for my game.  So with some subtle theming in mind, I started to answer more important questions for my game and "Frankenstein" this thing together.

Fighting Games on a TouchScreen? 

If you know me, it's definitely not a secret that I love fighting games.  Because of this, I wanted my game to be similar to a fighting game.  Now, two people playing a game on the same mobile device, especially a fighting game, seemed silly and I didn't have the time or skill to develop network-based gameplay, so I decided to do something for a single player.  I took a page from Capcom's Red Earth:

How do you go from WarZard to Red Earth?
You can say this is the second half of my inspiration for this game:  a main character fighting bosses that are larger and with unique abilities.  Another design question to answer was how am I going to get fighting game input.  Recently a lot of fighting games have been released for iPad using a touchscreen dpad for input.  I don't like this though; it doesn't feel as responsive or satisfying, so I decided to try a combination of gesture and touch location.  For example, if you hold the left side of the screen the character moves to the left, and to jump, you swipe up, the direction and speed, determining the angle and strength of the jump.  This was very risky and experimental, but I felt it could be something different and stick out from some of the contest's other entries.  If you're wondering, I referenced this for most of my gesture coding.

Hypercalamari

So one issue I had to solve, and quickly, was how am I going to do 3D models in a short period of time.  Now originally, I wanted to do 5 bosses and a main character and 6 environments.  I quickly cut that down to a main character, 4 bosses, and 4 environments.  You can cut scope all you want, but work eventually has to be done.  So, using some base models from the Urban Mages project,
*sigh* This game again...
I was able to create the main character for this game.  I then had to make the other four bosses for my game, and this is where Turbosquid came in.  What I was able to find on the site -- for cheap -- is what essentially determined the design of my four bosses.  I found a really nice rat model that was already rigged and has some basic animations as well as a spider.  I used these without hesitation.  I edited them a bit, adding a rhinoceros-like horn to the rat and some strange wings to the spider.  If I had more time I probably would have done tons more, but they were really nicely done, low-poly game models.  However, not all models from this site are perfect.  I downloaded a rigged lizard character whose vertices were already bound.  Now, the model was a little high-poly, over 20,000, so I thought I could easily cut down a few vertices, but model optimization takes a lot more time than just applying the "Optimize" modifier in 3D Studio Max.  Next I thought I could use skin wrapping to quickly reskin the optimized model to the old vertex binding, but no, the original model was using an outdated vertex binding method known as "Physique" that doesn't work with Skin Wrapping.  Fortunately, after some plug-in searching, I was able to get this model optimized, skinned, and wrapped.  Then, I had to solve the problem of the 3DS Max biped and the fact you can't make knees bend backwards!  Essentially, I had to reskin the legs and make sure this new leg rig lined up to the originals as closely as possible.  Since this had to be done, I learned my lesson that not all Turbosquid models are created equally.  Needless to say, I definitely had a "buyer beware" moment.

Effects, Effect, Effects 

OMG!  THIS GAME IS THE BEST GAME EVER!!!
Effects are a big thing in games today.  They can be used to convey information; they can be used to give a sense of artistic polish.  Because of both these things, I wanted to attempt to have some decent effects in my game.  The first effect I made, however, was a bit of a waste.  I learned a lot and felt good that I was able to get it to work, but I just didn't use it that much.  I made this trail effect:


A trailer for trails?
This effect wasn't easy to implement.  Essentially, a set of positions are set and then quads are created based on the positions and the changes in their positions.  Here's a crude diagram explaining what I did: 
Anyway, in the above diagram, the right image or "Created Mesh", has points Ac, Bc, Cc which are the recorded positions in the trail.  Lines AtAb, BtBb and CtCb, run through the center points and are determined by a width that decreases by a specified parameter as well as the deltas from a point and the one preceding it, so Cc to Bc and Bc to Ac.  The dotted lines signify the triangles used to make each quad, and the square on the left display how the UVs are plotted so the texture runs through the entire trail.  Of course, my diagram is highly simplified and the one in game has several dozen points being registered at a time.
Anyway, despite all the time I put into it, it didn't look that great and caused some strange depth-fighting, so I only used it to indicate to the player that they could perform a really special attack.  Now, it took me about a week and a half to make this trail effect, and because my knowledge in graphics and rendering programming isn't that strong, I decided against creating a particle engine from scratch.  I researched a bit and came back to Mercury Particle Engine.  This is currently what I'm using for the revamped effects in Battle High 2.  MPE has one version, 3.1, that is for XNA 4.0 but is mostly 2D and doesn't work for the phone -- to my knowledge -- so this wasn't an option since I was doing a 3D mobile game.  I then learned that they had the source code for a 3D version that also worked on the phone.  My only real mistake was waiting near the end to implement my particle effects.  Not only did I not have an editor to use to create my effects, forcing me into an adjust-a-number-recompile-test-start-over process, but I had to create some of the modifiers like a Trajectory Modifier, which I use for Turquoise Mars's hit particles.  Regardless, using MPE helped out tons, even if some of the fullscreen particle effects drop the frame rate a bit.

Friends

No!  Not these dingles!
Now even though I can probably do every aspect of game creation -- some much better than others -- I still needed some help to finish my ambitious game with its even more ambitious schedule.  No matter how independent you want to be, you still need to find help sometimes.  Anyway, I found some awesome friends who were willing to help me.  One did music, another sound effects, and a third created 2D character portraiture used in the game's UI.  Now, there is one issue with using friends to help you make a game.  Essentially, there's no consequence if they do not do the work you want; however, you don't reserve the right to be an asshole to them.  They are doing you a favor.  That's the most important thing to keep in mind.  Even if you may not love what they did, if they did it quicker and better than you would, you should accept it with a smile, as I did.  There are two other things I did that I think helped this go more smoothly.  One was to treat the situation professionally.  Stay in contact with your friends, answer their emails quickly, and make them asset lists.  Personally, I like having minimum and maximum list.  For example, for the 2D art, I had one image at a minimum and about twenty at a maximum.  Due to time limit and other things, about five were done, which was wonderful and all I wanted.  It is also important to have a contingency plan and be able to improvise.  When it came to the soundtrack, I needed about 5 songs and only 3 were done, and again, I wasn't mad, things happened and the deadline was short to begin with.  So, I improvised; I found the wonderful Wub Machine and essentially remixed two of the tracks I had.  The remixed tracks weren't perfect, but using them was better than omitting content completely.

Conclusion

This is an image of the main character drawn by Penelope Barbalios.
The rest of the project involved testing on the Windows 7 Phone I got from the 2012 Global Game Jam, iterating on gameplay, checking for bugs and tons of other hectic things until finally turning in my game, which is surprisingly less than 50 megs.  In conclusion making this game in about 3 months was stressful and sometimes bordered on the "unfun" side, but I'm still happy I was able to finish it.  Will I release this for the Windows 7 Phone?  Maybe.  Will I win the contest?  Most probably not.  All of these questions I won't know the answer for sure until the Dream.Build.Play results are released sometime in August, so until then, the fate of Turquoise Mars is unknown!

No comments:

Post a Comment