Effort of impementing interpolation in networked Asteroids

  • Effort of impementing interpolation in networked Asteroids Ciaran

    Questions: When we draw with interpolation, where should the collision detection code be? Is it worth implementing interpolation in the following situation?

    This is for Scrolling Asteroids. I have my game working at the moment without interpolation. It does physics updates using fixed step time deltas. The frame display rate is decoupled from this. So, it might be doing 40 Physics updates per second and 75 frame draws per second. Up until now, it is in the physics update routine that I do the collision detection and response. Your ship can collide with a rock. Your photons (bullets) can collide with a rock.

    Now I am considering improving it to use interpolation as per all the good articles recommend:




    So when this is implemented, I might be making the following calls:


    The floating point numbers shown are examples of actual calculated interpolation value i.e. the proportion of the physics update that is complete at the time the frame is being drawn. I am going to have to change the draw code to draw the objects at a fraction of the distance between their previous and current value positions and rotations. That is yet to be done.

    Question: Will I also have to do move my collision detection code out of the update routine and into the draw routine, seeing as I will be drawing these interpolated frames ?

    Bear in mind, my highest priority goal is to make this networked: multiple player ships on as large a Universe as possible. So a physics update solution that is compatible with the networked game that is required. Is the interpolation worth the effort? Right now. I rarely if ever see a problem with smoothness. If I reduce my physics updates to 25 per second which I have only done as an experiment then it is a bit jerky. But the game easily runs at higher rates than that so there may never be a problem.

    So the two questions:

    • Collision detection where?
    • Is introducing interpolation worth the effort or should I proceed to networked version straight away?

    Thanks in adance:

  • The point of the interpolation usually is that it is done client side, while your server keeps track of the 'true' state. There are many problems arising, depending on game, and no perfect solutions available. All networked multiplayer games have to deal with this to some exxtent, be it WoW or a racing game. You will, if you compare two games side-by-side over the internet, notice significant lags in all triple A quality games, signifies: there is no perfect solution. Best you can do is just to make it work, as smooth as possible.

    Short version: if collision is your main point, PvP collision will be the hardest challenge, while PvEnvironment can be relatively easily handled.

c++ collision-detection game-loop interpolation
Related questions and answers
  • Collision Resolution ultifinitus

    with a working algorithm, but I'd rather not =). So what in the heck do you think I should do? How could I change my collision resolution system to fix this? Here's the program (temporary link, not sure how...Hey all, I'm making a simple side-scrolling game, and I would appreciate some input! My collision detection system is a simple bounding box detection, so it's really easy to implement. However my... xAxisOffset as well. Now this is working great, in general. However there is a single problem. When I have a stack of objects and I push the first object against that stack, the first object get's "stuck

  • from it. As an added touch i have made it so after you collide while traveling down the randomly generated map (or rather as the walls move uppward while your character stays put) the X chars you've... in the main function * not Finally.. but i believe that te numb_coll problem has something to do with the time and framrate. When running full speed i quickly die upon entering a wall as numb_coll... == true){/*do something here or i might not need it.....*/} } /* end of if(kbhit())*/ char coll; // the buffer for the collided char theScreen.check_collision(player, xMove, yMove

  • for my needs. Ah and I forgot to mention that nodes can have hierarchy, but this is not a problem if the frame data is reduced. The structure instances don't get duplicated unless any value changes. When...well... I'm building the animation system of my game engine (the skeletal and skinned animation stuff), and I came to a point where I added so much functionality in the frame and node structures... I was thinking about making smaller structures with the fTime variable each so I can have attribute keyframes, light keyframes and buffer keyframes, then make the node structure look like

  • I'm creating a component-based game object system. Some tips: GameObject is simply a list of Components. There are GameSubsystems. For example, rendering, physics etc. Each GameSubsystem contains... by title. Of course, ComponentTitle should not be rewrited or inherited in this case. B. We can reorganize existing GameSubsystems. For example, GameSubsystemAudio, GameSubsystemRender... Components. 3: Component registers itself in GameSubsystem(s). We know at compile-time that there is a GameSubsystemRenderer, so let's ComponentImageRender will call something like

  • Say I develop a game for mobile platform running OpenGL ES 2.0. I have done 2D part, and now I wish to import some 3D objects. The imported 3D objects must contain the following: Vertices positions Normals UVs Texturing information Animation information Collision mesh Maybe some other things... I am aware, that I could and (maybe should) create my own file format that brings these data from..., that will let me import 3d meshes into my game, ready to use? The solution/middleware should be: easy to use easy to port efficient not consuming too much memory with unnecessary things containing all

  • I have been playing around with Ogre3d and trying to integrate bullet physics. I have previously somewhat successfully got this functionality working with irrlicht and bullet and I am trying to base this on what I had done there, but modifying it to fit with Ogre. It is working but not correctly and I would like some help to understand what it is I am doing wrong. I have a state system and when... physics properties. I know there will be errors here as I get the items colliding with the ground but not with each other properly. So I would appreciate some input on what I am doing wrong. void

  • Since building a game is not about 2D anymore, I just want to build a list of the (not necessarily best, but good enough) open source software available to make games. I prefer to put emphasis.../index.php/Libraries - Multipurpose/Multimedia: - SDL http://www.libsdl.org/ - SFML http://www.sfml-dev.org/ AI/Behaviour/PathFinding: OpenSteer http://opensteer.sourceforge.net/ Physics: NxOgre (plugin for Ogre3d) http://sourceforge.net/projects/nxogre/ Bullet Feel free to update this list and/or add categories.

  • have updated my code with a new algorithm that checks where the ball was previously before collision. Corner cases work on that single platform correctly now, but when I have a wall of objects, I keep...I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics. My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all

  • I been working in the animation of a 2D platformer game in C++/SDL/OpenGL, and my team and I reach the point where we need to establish that every animation of the player (Walking, Running, etc..) needs a different framerate for our concept, but I use as a guideline the Game Programming All In One as a example for the smooth animation, and in the book recommend have variables that limits... points of the game the animation doesn't look really smooth when in other points it is. I leave the video of the "gameplay" so everyone could see what I mean. http://www.youtube.com/watch?v

Data information