Code design structure

BlitzMax Forums/BlitzMax Beginners Area/Code design structure

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

What is the best practice when designing your code.
There are two prevailent methodologies. upfront design (Waterfall) and itterative prototyping (Agile). Each have their streangths and weaknesses.

How do you structure your code?
In such a way that it is readable and maintainable.

Most games I've seen written in Blitzmax just use while not keyhit(KEY_ESCAPE) around the whole code.
Yup. This is what's known as the main loop.

How would I incorporate a game menu with the ability to pause a game, start a new one and exit (using the exit button, not pressing escape).
You can do it procedurally with states and branching, or you can do it object orientedly with different objects representing what you want to do at any given time.