Debugging idea: test loop

For discussion of the code running behind the game

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8662
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Debugging idea: test loop

Postby Roots » Fri Jan 05, 2007 12:37 am

An idea has been creeping up in my mind lately. You know how there's always that one simple feature in an engine component that we need to test/debug? Its not always easy, because you have to find some appropriate place in one of the game modes to insert the feature, make sure it meshes with everything else, test it, and then remember to delete all your modifications to the game mode code in question. Frankly, its tedious and it shouldn't be.


I'm thinking of having a new command line argument call -t/--test, that if detected, will do all the normal game initialization, but instead of going to the usual game loop, it will execute in a nearly identical test loop. The main difference is that the test loop doesn't open up boot mode and do all that nice stuff. Nope, instead it will push a test mode on the stack (which will be a game mode explicitly created just for testing purposes) and we can mess around with that file all we want to test different features.


This is just an idea I'm proposing. Maybe I'm the only one annoyed at how tedious it is to test features, I don't know. I have thought a little bit about the details for us to take full advantage of this test mode, but first I'll wait to hear your thoughts on the matter. :)
Image

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests