Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 589325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:24:45+00:00 2026-05-13T15:24:45+00:00

I understand why it does that but I don’t really have any idea of

  • 0

I understand why it does that but I don’t really have any idea of how to prevent that. So the scenario is, every frame I move the car by a certain of predefined pixels. What happens is when I go on slow or faster computer… well I get less or more frames per seconds so the car moves either slower or faster. I was wondering how I could prevent that.

I suspect that I would have the same problem using any library… This is my first time doing real time stuff like that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:24:45+00:00Added an answer on May 13, 2026 at 3:24 pm

    I suspect your current code looks somehow like this

     // to be called every frame
     void OnEveryFrame()
     {
         MoveCar();
         DrawCarToScreen();
     }
    

    But it should be like this:

     // to be called - for example - 50 times per second:
     void OnEveryTimerEvent()
     {
         MoveCar();
     }
    
     // to be called every frame
     void OnEveryFrame()
     {
         LockTimerEvents();
         DrawCarToScreen();
         UnlockAndProcessOutstandingTimerEvents();
     }
    

    You have to set up an according timer event, of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see that in different plugins and codes, but I don't understand what does
I understand that 2 options are available: Non-persistent Persistent But what does this actually
Does [_\s^] mean underscore and whitespace but not (quote) in Reg I understand that
Cheers... I understand that it stands for Hardware Abstraction Layer but what exactly does
I understand that the AntiForgeryToken feature in ASP.NET MVC does prevent cross-site attacks. However,
Does anybody have or know of a TextWriter for the Console that understand how
I don't really understand how does createElementNS works. For example: svg = http://www.w3.org/2000/svg; group
I have some Haskell code that does work correctly on an infinite list, but
I understand that the browser does all the work in processing client side scripts
I understand that shared memory on GPU does not persist across different kernels. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.