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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:12:39+00:00 2026-06-01T00:12:39+00:00

I’m working on an android game with OpenGL, and I have a game update

  • 0

I’m working on an android game with OpenGL, and I have a game update thread and an opengl render thread.

Currently I have them synchronized such update() and render() share a single lock, and I basically ping/pong back and forth between update and render. This is essentially the same as running update and render serially, as one is always waiting on the other.

In my game every object is a renderable, so I was thinking instead of having one global lock, I could let each renderable object have its own lock. That way whenever update is updating some object, the renderer can be rendering any of the other objects and vice versa. If an object is locked when either the render or update thread tries to access it, it can just skip it and push it to the back of the queue (assuming the order of update/render does not matter).

Now this game is my first time I have dealt with synchronization issues, so I was wondering if there would be any serious performance issues with having so many locks constantly locking and unlocking during every frame? Is this a normal way to synchronize update and render threads, or am I overlooking some obvious flaw?

The only flaw I can think of with this is that the renderer could be drawing objects from two different ‘steps’ of the game, as while it’s drawing some objects will be on gamestep N, while others will have been updated and be on step N+1, but I don’t know if that would be noticeable for my particular game.

Thanks for any thoughts you may have.

  • 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-01T00:12:40+00:00Added an answer on June 1, 2026 at 12:12 am

    I’m not a game developer but have come across this post from the maker of Replica island: Rendering With Two Threads

    Also this thread on GameDev StackExchange might be helpful: https://gamedev.stackexchange.com/questions/95/how-many-threads-should-an-android-game-use

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I am trying to render a haml file in a javascript response like so:

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.