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 ...

2 Comments so far »

  1. John said

    am October 31 2008 @ 10:33 am

    It’s amazing in this day and age how much better pen and paper is for initially getting those ideas down when you aren’t ready to code.

    Recently though I’ve been playing with mind-mapping software and that seems to work really well, especially for planning out class and package structures. It’s a bit like using UML software, only I never really got on with UML at all.

  2. Colby Cheeze said

    am October 31 2008 @ 3:35 pm

    Mind Mapping can be a great tool for visualization and idealizing many things. Whether you do it on paper or using software I suppose is totally up to someone’s personal preference and how comfortable they are with the software etc.

    I tried to look into UML but it really just seemed like it would cause me more trouble to use it than to just keep on doing what I am doing.

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: