Tag Info

New answers tagged

1

Ah! I missed the obvious reason for the odd behavior while first looking at your code (I think). Essentially, there are three potential problems here: First: Missing Updates Each and every iteration you'll update your game logic only once (or not at all). In a similar way, you draw your screen (or skip drawing). However, this causes one problem: Let's ...


1

I guess the two parts I'm having trouble understanding is in #3, how would the waiting be accomplished since thread sleeps are often not accurate enough? Can't answer this for sure as I haven't seen the XNA source code. MonoGame uses thread.sleep // NOTE: While sleep can be inaccurate in general it is // accurate enough for frame limiting ...


1

Typically a physics engine will follow these steps: Broad-phase collision detection. Typically using bounding volumes, this reduces the set of all objects to a small subset of potentially colliding objects. Some data structures to handle broad-phase are AABB trees, KD-trees, Octrees, etc. Narrow-phase collision detection. From the subset of potential ...


0

You can send messages to each entity in the collision, containing the collision_type of the other object, it's mass and velocity at the time of collision, and the contact point on the messaged entity. Entities handle the messages for collision_types they want to respond to, and ignore the others. Also, a couple of nice optimizations can be done. 1) Start ...


0

One thing stands out to me that could likely explain the difference in how smooth it looks: I don't see any indication that your updateLogic() method is using the actual delta time between frames. If I'm correct in assuming that dt is your delta time variable, it should not be constant. This probably won't be cut and paste usable, but it should be ...


3

If you have seen a game running at 60fps, then reverting to 30fps will always be noticeably less smooth - it's a perception thing. Get someone who has never played your game before to play it at 30fps and they'll probably think it's just fine. Most games target 60fps these days as games running at 60fps have a much better feel. Most recent (high end?) ...



Top 50 recent answers are included