Better way to blit

Started by
1 comment, last by Weston 21 years, 8 months ago
Should I perform all game logic first and blit all objects afterwards, or should I blit as I am performing the logic? Another thing I could do is blit before perfoming logic. Why? Because if two objects are about to collide, and you perform logic first then blit, you will see the reaction before you see the objects touch. I want to actually watch the objects overlap or touch before any reaction. I suppose that I could just have a bounding RECT inside the sprite itself, which is used for collision instead of the RECT used to draw with. What do you think? --- Help points: 2 (Eh... I have to start somewhere)
---Will DDR for food.
Advertisement
Well, say your game is 60 FPS...

Your functions are getting called MORE THAN ONCE PER SECOND so it''s highly unlikely that you can see the reaction before the collision occurs..trust me.
In general, it is a good idea to perform game logic and rendering in seperate places. Any discontinuity between the two will be unnoticable at 60fps, as Weston said. I actually do these two things in seperate threads.

This topic is closed to new replies.

Advertisement