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
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