my game right now has a main loop like this:
Where in all that do i put in something to control speed? How can i do this? (I've never made a large arcade type game before, so I've never really faced this problem)Code:PHP Code:
do { //check input functions// //update player position// //update computer logic (moveX, moveY)// //update computer position (xPos+=moveX, etc.// //clear screen// //draw background// //draw player// //draw computer// //flip screen// } while(!gameOver);