Game Development Community

Requesting Advice

by Justin Proffitt · in Game Design and Creative Issues · 05/28/2009 (2:31 pm) · 1 replies

This is probably an odd topic, but I am fairly new to the world of torque (game builder), and I was wondering if there were any general dos and donts that anyone has discovered, specifically while scripting, that would save me a lot of time and trouble later. By dos and donts I mean pointers like "dont put all your game scripts in one file" or "use echo functions to locate errors."

Also if there were good tutorials outside of the torque documents/tutorials, id appreciate a little shove in that direction.

Thanks!

About the author

I am a college student majoring in physics. As it so happens I like programming, a hobby which extends my profession in web design.


#1
05/28/2009 (3:01 pm)
Comment your code as you go along. There have been times when I read over something I wrote a week ago and say out loud (literally) "What the f***."

Try to execute your scripts in a logical order and grouping. This makes it easier to debug very odd syntax errors that might pop up in one script that borks the rest of your exec(...) calls. For example, execute all your GUI scripts in one section.

Plan out your behaviors ahead of time. If you are creating an adventure RPG with a single player that has multiple abilities, separate those abilities: Stats, Movement, Collision/Damage, etc. One massive behavior can be hell to deal with.