The refresh rate of the monitor is irrelevant here. I only brought it up as an example of why it's better to run your game logic at a high rate, which is it gives you much smoother game-play regardless of what a user has their display set at.
For the type of games that PopCap produces, 100 updates a second is plenty. I use 200/250 updates per second as my games tend to be more action than puzzle, so benefit from a higher logic rate.
@Christian223, for each of your game objects you need an Update() Function and a Draw() Function. You main game loop will then have an Update() Function that calls each of the Update() Functions of your game objects, and a similar Render() Function that calls all the Draw() Functions of your objects. So you would have something like this...
The above obviously does not include the main loop, as I've already provided an example of that. Hope it helps.
For the type of games that PopCap produces, 100 updates a second is plenty. I use 200/250 updates per second as my games tend to be more action than puzzle, so benefit from a higher logic rate.
@Christian223, for each of your game objects you need an Update() Function and a Draw() Function. You main game loop will then have an Update() Function that calls each of the Update() Functions of your game objects, and a similar Render() Function that calls all the Draw() Functions of your objects. So you would have something like this...
Type TGameObject Function Update() ' update logic for ALL instance of this game object EndFunction Function Draw() ' draw ALL instance of this game object EndFunction EndType ' main program Function Update() TGameObject.Update EndFunction Function Render() Cls TGameObject.Draw Flip EndFunction
The above obviously does not include the main loop, as I've already provided an example of that. Hope it helps.