GML Blog‎ > ‎

Tips for Testing

Test everything as you do it.  Don't make another change in your code before you guarantee the previous change.  If your foundation isn't perfect, nothing else will be.  Since all of your code can be considered a foundation for other pieces of your program, then every piece must be perfect.

If your testing a game, make sure to do the unexpected.  Jump onto the platform and let go of the controls and let the character slide off.  Does it look smooth?  Does the character stop at the edge.  Do this in slow motion.  In Game Maker, turn the room speed down to about 5fps.  Do you see the character jerk erratically for one frame then return to the correct position.  These are all things that may lead to problems further on, let alone being problems themselves.

If you don't test your code for perfection, you shouldn't be programming.

Anyone can design and build a grand statue. If it collapses under its own weight, the blame is not always on its builder.  It could be attributed to faulty concrete mixtures, micro cracks in the steel, or rust build up.  When your program collapses under its own weight, it can mean only one thing.  It collapsed under its own weight.  There was no concrete, no environmental effects causing rust or cracks, and no thick-boned pigeons sitting on it.  The only thing stopping your program from working correctly is you.  Yes it could be the operating system or shared libraries, but even those could only be blamed on their creators.  Think of programming as an extension of you and your ability to plan a very long list of events and have them interplay without a single hiccup. 

Yes you can miss something that will only happen when 100 variables are just right, but extended testing will greatly increase your chances of finding these one in a million bugs.

Affiliates