@Ryan,
as the other posts already spotted, you can't run two functions in the same time. To to that, you need thread support, which is not implemented in B3D.
That means that the statement you write when you code, are later executed sequentially. The trick is, they are executed so fast that it seems that they runs at the same time.
You may find out, using a sort of pseudo code, what your program should do, and divide each part of it in separated sections; for example, in a game like pong where a ball is moved and bounced, you may have these functions in your main loop:
The two functions above will be executed sequentially, that is, the ball is first 'moved' - that is, you update the ball coordinates, then the ball is drawn on the screen.
You have already good knowledge about flow control and backbuffer, as I see above; but you need to sort out first some ABC of programming, so my suggestion is to read some tutorial here and @blitzcoder.
Have fun,
Sergio.
as the other posts already spotted, you can't run two functions in the same time. To to that, you need thread support, which is not implemented in B3D.
That means that the statement you write when you code, are later executed sequentially. The trick is, they are executed so fast that it seems that they runs at the same time.
You may find out, using a sort of pseudo code, what your program should do, and divide each part of it in separated sections; for example, in a game like pong where a ball is moved and bounced, you may have these functions in your main loop:
;Main loop while not keydown(1) ;while esc is pressed ; Cls ;clear the screen player_control() move_and_bounce_ball() draw_scenario() draw_ball() ;... and more Flip wend end
The two functions above will be executed sequentially, that is, the ball is first 'moved' - that is, you update the ball coordinates, then the ball is drawn on the screen.
You have already good knowledge about flow control and backbuffer, as I see above; but you need to sort out first some ABC of programming, so my suggestion is to read some tutorial here and @blitzcoder.
Have fun,
Sergio.