Archive for October, 2008

Programming on Paper

I want to discuss a technique that I have been using which works very well to get past the initial strain of programming a new part into your game. Yesterday I was trying to figure out how I would program the abilities system for units ( it is a Diablo style game, so there is a possibility for a lot of abilities ).

After staring at the screen for a while, I pulled out the ol’ handy dandy notebook and just began writing things down on paper. Shortly thereafter I had the entire system programmed, and it worked great!

So, the process of programming on paper works like this:

  1. Decide your problem. Write it down.
  2. List out the steps that need to take place from the player’s view in order for the problem to work. IE:
    • Player chooses class ( Wizard for example )
    • Unit is given abilities.
    • Player presses ability 1 key, ability 1 activates.
  3. Now that you see what is required to complete your problem it is much easier to program it. Decide on which classes will be needed, and then write out how it will all work using pseudo code…so for me it was something like this:
    • Ability Class, abilities will extend this…for example: HealAbility, ProjectileAbility, etc.
    • onKeyPress( “A” ) : Unit.useAbility( 1 );
    • Unit.useAbility(): ability1.execute();
    • ability1.execute(): unit.addHealth( 20 ); //or spawnProjectile( “Fireball” ); //or unit.addBuff( … )
  4. Once you have all of it written down in pseudo code like that it really makes it super simple to code everything because you are just basically putting it in Actionscript.

Originally I had thought it would be difficult and take quite some time to design and program all of the things I did yesterday (it was a lot) however since I used this technique I believe it relieved the pressure of creating code that doesn’t work and just let me focus on the concept of HOW it should work. Hopefully you can find a style or programming on paper that works best for you as well.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

An update and something funny

Last night I was looking on digg and found something hilarious.

Coincidence? Who knows...

Coincidence? Who knows...

Well I haven’t written anything of value in a while due to being super busy ( and gone ) so here is a bit of an update. During half of September and most of October I was in Bridge City, Texas which is a small town that was probably hit the hardest during the hurricane. Only 14 homes in the ENTIRE city were not destroyed by flood. The town has around 4000 homes.

Now that I am back I am working diligently on a new project, which should be done in the latter part of November if I keep on track ( which I am doing ). Also I have some articles planned which you all should look out for.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...