Added: 5 months ago
From: mikhog
Views: 81
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (2)

Sign In or Sign Up now to post a comment!
  • Hey I'm new to C# programming. This is a really great project. I am currently working on something just like this for school and I really need some advice.

    My 2D engine runs, but I cant get a constant framerate in my game loop. So the game jumps around. Also how did you implement XNA to get the engine to work.

    I would really appreciate it if you could help me out, thank you.

  • @samirtleal Thanks! To account for your framerate not being constant you should always multiply by passed time since last loop, the parameter called GameTime in a lot of functions in XNA. For example if you have a variable called acceleration which is 3m/s/s then this value is multiplied by the number of seconds since last frame and added to velocity. Velocity is then multiplied by time and added to position. If you handle all variables in such a manner then a non-constant framerate will be ok

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more