Menus

Blitz3D Forums/Blitz3D Beginners Area/Menus

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.

Functions are definetly a good idea.

I always find that anything you can do with a label, you can do much
better using a function. Functions help keep your code much cleaner,
and easier to understand.

And I believe that you are correct, that those problems were caused
by there being too many things in the main loop of your program.

Its a good idea to keep your programs main loop as small as possible.

Just include a few basic things, like drawing images, and have functions
take care of the rest.


;Example Of How The Main Loop For My Programs Usually Looks.

While Not Keydown(1)
Cls;Clear the screen

Drawimage PlayersImage
Drawimage BackGroundImage

MovePlayer();The function that moves the player

MoveEnemys();The function that moves the enemys

Flip
Wend