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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:34:53+00:00 2026-06-03T08:34:53+00:00

My question is about game loop design in opengl. I believe that game loop

  • 0

My question is about game loop design in opengl.

I believe that game loop can be spited in 3 main steps

  1. accept input – it may come from users click on the screen or system alert, or anything else.
  2. do logic
  3. update view

To make it simple let’s just focus on step 2 and 3.

I think that it will be wrong to run them in parallel order or to mix them in to one step.
I give you an example.

Lats say you are creating a war game, and you need to draw 100 soldiers fighting on the screen, the logic will be to update their position, to update the background area, and then you need to draw the result. You can’t start drawing one soldier before updated the position of another soldier.

So according this simple steps, it is clear that step 2 and 3 need to be synchronized some how, and step 2 must be done before step 3.

Now tell me how it is possible to run game loop on more then one thread, and more then one process? Does opnegl use multiCore? How?

Edit: one way to use multithreading is to precalculate the game logic, or in another words using Vectors. But there are two big disadvantages in vectors that make them almost unrecommend to use.

  1. Some times you wan’t to change your vector, so there were lots of calculation that you did and you are not going to use them
  2. in most of the cases you are trying to reach 60+ FPS witch mean 16 milliseconds for game-loop, switching threads requires some kind of synchronization, any synchronization is bad for performance, from what I saw, even a simple Handler.post() in android(just adding task to queue to run it on other thread) may take up to 3 milliseconds(18% from your frame rate time), so unless your calculation take longer then that, don’t do it! For now I did not found anything taking so much time.
  • 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-03T08:34:54+00:00Added an answer on June 3, 2026 at 8:34 am

    Now tell me how it is possible to run game loop on more then one thread

    The idea of multicore computing is parallelization, i.e. splitting up computational intensive tasks into independent working sets that can be processed in parallel. Games have surprisingly little space for parallelization, as you found out yourself.

    The usual way to use multiple cores in games is to parallelize I/O with logic operations. I.e. doing all the networking and user interaction in one thread, AI and scene management in another. Sound is usually parallelized away, too.

    Does OpenGL use multiCore? How?

    The OpenGL specification doesn’t specify this. But some implementations may choose to utilize multiple cores. though it’s quite unlikely. Why? Because it creates unneccessary cache management overhead.

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

Sidebar

Related Questions

I have a question about lists in C++. I am creating a game, where
I got a question about good practice. I'm making a simple game and, I'm
Naive question about Java syntax. What does <T> T accept(ObjectVisitorEx<T> visitor); mean? What would
Yes, this is another question about my game engine, which is coming along very
I am working on a card game iPhone app and have a question about
I'm currently making a pacman game in java. I have a question about the
I am currently building a multiplayer system, and I have a design question about
As the title suggests, I am asking a question about a game I've made
Question about how to perform a django query. I have a Game model with
I'm making a game with my friend. Now there is a question about levels.

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.