Tuesday, 17 May 2011

A Newbie's Venture into Game Design (3)

Part 3 - Development and Where it All Went Wrong

So far in this series of blogs I've shown two portions of my game design process - research and concept development. Today I look at actual development, or the making of the game.

Step 3 - Development

In this case development included:
  • Sprite Creation
  • Animation of Sprites
  • Coding and Compiling

After a bit of research, I decided I wanted to create the game in Flash. I had played around in Game Maker already but didn't quite understand how to work it, and I still wanted a visual interface to work with even if it wasn't a proper game engine. In hindsight I'm not exactly sure why I decided Flash was a better idea than Game Maker and I may have to go back and check. Perhaps because there was less documentation and tutorials for it? Less community support?

Here's the thing and mistake #1. My goal was to create a fully functioning level of a platform game in under six weeks, with no knowledge of object oriented programming. Knowing basic functions of code in other languages meant nothing. This was like being dropped into the ocean after my only prior contact with water was getting my feet wet in the bathtub at home. This was a dumb idea.

Let's put aside my mistakes for now, and focus on what I tried to do. My first task was to animate the player character; give him an idle sprite, as well as a running animation. I took my concept art and got to work on spriting out the character. David Hellman's assets for Tim in Braid were a huge help to me, as - let's get this straight - I'm not a natural animator. I've had to create two walk cycles for my course this semester and they haven't been all that much better than my attempt for this game.

If you remember in Part 2 of this series of blogs, I talked about spriters using symmetry to avoid extra work and assets. This was something I could have taken note of when spriting my character if I was making him simple like 8bit Mario, since I ended up with 15 frames of animation in his run cycle rather than 7.

Below is the original set of images I used for the character's run cycle.
Original sprites
I prototyped these by creating a simple flash animation with the run cycle, even though the cycle wasn't complete (the character switches legs after looping). But I quickly realised they weren't going to work.

Technically I could have let the shoddiness slide, the problem was mainly with how jerky it was going between the idle animation seen on the very left while the character was waiting for the bus, and the run cycle. Sure, I could have added some sprites for him turning around - but then I'd also need another separate idle sprite. And why go to all the effort of creating new sprites if they were only going to be used for that single portion of the level's start? May as well just work on making the whole run cycle better instead. So that's what I did.

Better. I know I've only included half the cycle again, but you'll get to see the other half of the images in a bit.


Here's the final series of images for the character's run cycle, based a bit more closely off David Hellman's assets for Tim. They're still not perfect, but at least they worked.

I'm not here to teach you guys how to draw up walk cycles though, so I'll get to the point. My next point of focus was trying to prototype character movement. There were some lovely Flash tutorials for this on youtube which showed everything step by step, so I was really grateful for this while I waited for my Flash Programming book to arrive. They showed how to import images, how to code in movement with the arrow keys, how to program jumping and velocity and traction. Did I understand the syntax of the code and would I be able to write it again myself without looking at something for help? Hell no! But I was able to create my working prototype and that was enough for me.


Click here to try out this prototype. Arrow keys are used to move and jump. If it's not working, try clicking the white space first.


I was pretty damn happy with myself after getting this thing to work, I have to say. All I had to do now was find some code for a platformer and make a few edits in it for my own character and sprites, right? How hard could it be?

My Flash Programming book ended up arriving in the mail soon after I finished this little demo. And of course, I skipped all of the simple game examples and went straight to the last chapter on building a platform game.

This wasn't exactly smart. But now that I've taken up a programming unit at uni and finally learned how the structure behind most coding languages works, I can say that the book probably wouldn't have been of much help anyway even if I had started at chapter 1. The author's code had been written quite horribly - variables were named in such a way that I didn't know what was referring to what when it came time to modify the code. Plus he didn't really explain what I was coding, he just threw a bunch of code at me to type in.

One last sprite sheet with some additional sprites and the scale of characters-to-screen size.
I'm not even going to bother linking to the next prototypes I created for the game. Needless to say, they were bug ridden messes which didn't really resemble any kind of game I knew (they definitely weren't fun, I can tell you that!). Along came the deadline and the end of semester, and reluctantly I handed in my file and prototypes for display in the exhibition. I still managed to earn myself a High Distinction for my research effort on the project, but a simple number written on paper didn't really make me feel like I had accomplished anything noteworthy.

I post this blog up as something to learn from, a guide for myself (and possibly others) in the future. And because I don't really have any fear of people "stealing" my ideas here... they weren't really all that innovative in the first place and it was more parody/homage than anything else.

I'm slowly going back through that Flash Programming book now, armed with the knowledge I've taken from my programming unit this semester. I'll try and get into it a bit more when this semester is finally over and see if I can make something during the holidays... fingers crossed on that one.

Anyway, big props to anyone/everyone who endured through these blog entries. It's been pretty enjoyable writing them and looking back at what I've done; hopefully just as enjoyable and maybe a little bit insightful reading them.

~Nathan

2 comments:

  1. Another great blog Nathan. I have been following the blog since you first linked it on your twitter and they have been a great read time. It is fantastic to learn and hear of the experiences of someone who is going through university to acquire the skills that will allow them to pursue a career in the game industry (or related fields). I am myself just beginning to learn programming in my spare time (I am a newly-transfered PhD student in Epidemiology and Biostatistics in Canada) with ambitious dreams to learn enough coding that will allow me to produce a decent 32-bit RPG. Luckily I do not have any strict deadlines unlike yourself. I look forward to reading your future posts. Cheers,
    -Fraffy

    ReplyDelete
  2. Thanks very much, and good luck! :D

    I think deadlines can still be good sometimes, though. I'm naturally lazy and a terrible procrastinator so anything which forces me to work a bit faster is quite good.

    ReplyDelete

Leave a comment, yo! Or at least, a supportive/interesting one!

Share Float