Archived

This topic is now archived and is closed to further replies.

Weston

Better way to blit

Recommended Posts

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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites