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 7764677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:58:28+00:00 2026-06-01T14:58:28+00:00

I got a question about good practice. I’m making a simple game and, I’m

  • 0

I got a question about good practice. I’m making a simple game and, I’m messing around with some sprites.

I have a sprite class. In that class there is a timer that runs every few milliseconds.

Now, I have a List<Creatures> and everyone of the “Creatures”, got a Sprite object in them to run the animation. So that mean every creature has a timer that does the same thing.

I decided to change that, and make one timer that just iterate on the list, and call the function that create the animation for each “Creature”.

What is a good practice?

  1. Give every “Creature” its own timer.
  2. Creating one “big” timer in the Form that iterate on the list, and call the function that is creating the animation from each object.
  3. A different way
  • 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-06-01T14:58:29+00:00Added an answer on June 1, 2026 at 2:58 pm

    I have a sprite class. In that class there is a timer that runs every few milliseconds.

    Unfortunately, it doesn’t in reality. You are limited by the resolution of the (non-high performance) system clock, which is in the neighborhood of ~15 ms. So, you can set an interval of 1 if you like, but that’s not what you actually get.

    Back on topic, for a game, everything should run on the same clock. For each tick, you will have a loop which updates the logical state of the game (positions and whatnot) and then the display (animation frames, blit to screen, etc.). You will likely run into problems if you have them on different timers as it will become extremely difficult to coordinate the state of your objects when they are being updated in parallel.

    Also realize that you will need to normalize the update rate to ensure that things don’t update too quickly or too slowly (depending on how long it takes for you to render a frame). You need to check the delta between the last update and the new update and act accordingly.

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

Sidebar

Related Questions

Good day! I have got a question about the Internet Explorer 9. Can anyone
I posted this question about 15 minutes ago and I got some good responses.
Hay I've got a question about relationships. I want to Users to have Friendships.
Although the context of this question is about making a 2d/3d game, the problem
Good morning, i've got a question about cobertura report integration in sonar. I've tried
I've got a simple CSS/HTMl question. I've got an image and some text in
I asked a question about interfaces previously and got some excellent responses. I'm really
I have a thorny question about transforming Linq Expressions. I had a good search
I have got a question about event and bound command. What happens if I
got a question regarding serializing classes that I've defined. I have some classes like

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.