Skip to main content

Questions tagged [multithreading]

Multithreading allows multiple threads to exist within the context of a single process sharing same resources but are able to execute independently.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
431 views

I'm trying to set the priority of my threads so that my UI thread can be given priority over background calculations. I noticed that SDL has a SDL_SetThreadPriority ...
Disako's user avatar
  • 3
1 vote
1 answer
254 views

What is the proper way of handling synchronization between GUI animations' execution order and the user's dynamic input? More specifically, I would like to know how to enforce some logical ...
Julian Broudy's user avatar
0 votes
0 answers
396 views

We're having issues with low FPS in a third-person shooter 3D game. This happens when you have too many polygons on screen. The FPS is locked to 60, and the gameplay is fine, but the moment when you ...
ryspbsk's user avatar
1 vote
1 answer
460 views

I have a basic model to upload textures as shown in the following picture. I design this for several reasons: Only the primary thread owns the OpenGL context, so I choose to create buffers, map ...
Sheldon Wang's user avatar
1 vote
2 answers
2k views

I want to apply multi-thread in a simple way to control and draw 4000 objects. I am using SDL and OpenGL. control : locations, collisions, calculations ... etc draw : OpenGL draw functions ...
Emre Kaya's user avatar
  • 555
1 vote
1 answer
763 views

I am trying to find out the distance between game objects and the player position using Job System, But I am getting an error of unsafe pointer race condition. Can anyone tell me how to access ...
paul p's user avatar
  • 380
5 votes
1 answer
2k views

As a personal project, I'm setting up a MMO, and writing the server in C#/.NET Core. As of now my architecture is as follows: The world exists of different areas ( you can go from area to area trough ...
TanguyB's user avatar
  • 161
0 votes
2 answers
1k views

I am trying to multi-thread my game so that one thread updates and renders the player, while the other listens for inputs. I used a while loop to keep my detached thread running in the background, ...
Priswall's user avatar
1 vote
1 answer
610 views

I have a big problem with my Java games. In every game I make the movement of the player and objects just looks awfull. The framerate is 60 fps without any problems. But the movement looks extremly ...
MarTUN Up's user avatar
0 votes
1 answer
148 views

I am creating a simple multiplayer puzzle game in which multiple players can join a lobby and compete with each other. the player that submits the answer first gets the highest point, the player that ...
anekix's user avatar
  • 145
0 votes
1 answer
865 views

I need to accomplish something specific but I'm not sure how to do it exactly: My game has 2 scenes: The main menu that has a couple of buttons... ... and the game scene that displays a different ...
Neph's user avatar
  • 267
0 votes
3 answers
2k views

I have been thinking about this a lot and don't know if i'm thinking incorrectly. Most games have one game loop that can be split into three functions. A basic game loop would look something like ...
Dolfos's user avatar
  • 11
1 vote
1 answer
1k views

I created a ID3D11Texture2D texture on a thread with DirectX graphics and I passed its pointer to a worker thread. I'm assured that the creator thread will no ...
user3834459's user avatar
0 votes
2 answers
2k views

I'm currently developing a 3D game with its own engine. I have some performance issues in the function that orders all the draw events and sends them to the GPU. I've heard about threads, and I ...
Cabreira's user avatar
0 votes
0 answers
343 views

So, I came across an interesting problem. I'm implementing some threaded game logic, and one of the things I decided to do was to use Multiple Lua VMs, with each worker thread containing its own VM. ...
moonshineTheleocat's user avatar
2 votes
0 answers
522 views

I am not asking about parallelization of physics and so on stuff with parallel_for() like stuff. I've managed to have separate rendering thread from logic thread, ...
xakepp35's user avatar
  • 191
1 vote
1 answer
890 views

I have a class which is not a monobehaviour (lets call it "Generation"), and as such running CoRoutines from within are not an option. I have a monobehaviour (lets call this "TestScript") which needs ...
pingu2k4's user avatar
  • 205
1 vote
1 answer
340 views

Let's say, for example, that my target framerate is 60 frames per second. Now, I know that I have a maximum of 16.6 milliseconds to "do everything" every frame in order to maintain that framerate. ...
flatterino's user avatar
1 vote
1 answer
1k views

I want to create a class which is a "Renderable class". Basically, world objects will use this as a Base class to create objects that can be drawn into an OpenGL window. This is what i 've got so far: ...
k_kaz's user avatar
  • 125
0 votes
1 answer
1k views

My game is based on a client / server architecture where client only sends input and receives server output. Server has to keep track of the game, updating the world etc. But also listen to clients ...
Rien's user avatar
  • 135
3 votes
0 answers
222 views

I am using glfw and let's say I track controllers with a simple struct: ...
Sky Doge's user avatar
0 votes
1 answer
985 views

I was reading about how task schedulers work in game engines. What is unclear to me is what kind of work is usually scheduled inside these tasks. Do engines usually tick an actor inside a separate ...
Björn M.P.'s user avatar
1 vote
0 answers
206 views

I'm using https://github.com/socketio/socket.io-client-cpp with cocos, because the built-in socket.io doesn't support callback (http://discuss.cocos2d-x.org/t/doesnt-work-with-socketio-2-0-1-and-...
TomSawyer's user avatar
  • 243
1 vote
1 answer
614 views

There are several questions and articles which deal with timestep - for example: Should game logic update per second or per frame? https://gafferongames.com/post/fix_your_timestep/ Accounting for ...
davidkomer's user avatar
3 votes
1 answer
1k views

I have a Qt (5.9.1) app that on Windows many of the geometries I'm drawing flickers. My problem description is vague because I'm at a complete loss. Does anyone know if there's an issue with ...
Matt's user avatar
  • 175
0 votes
0 answers
48 views

Hi I'm trying to improve a thread tool and would like to make a function which use the idle time before the next frame. So how can I determine the time left?
Johan Holtby's user avatar
2 votes
1 answer
540 views

I want my thread to run seperately, but I want to be able to keep executing the game loop without killing the thread scope, If I remove the join there is a crash ? What can I do ? My desired result ...
RNewell122's user avatar
0 votes
1 answer
849 views

I am using SDL/Glew to create an engine for a game I want to make. I am trying to set a constant framerate of like around 60 (once every 17ish ms). I don't know the best way to do this so I do ...
Reece Ward's user avatar
0 votes
2 answers
253 views

Issue: I want to be able to set up my game loop to work concurrently with my pathfinder request, that would be a queue which different units request for in order in the pathfinder thread. My ...
RNewell122's user avatar
0 votes
1 answer
2k views

As one cannot play around with threads themselves, the user-made code that uses unity's API is executed on the main thread. I'm sure unity uses some sort of thread ...
agiro's user avatar
  • 269
2 votes
0 answers
83 views

I'm making a block game in c++ that stores voxels in a octree and because, at least in my implementation, editing the octree is slow, I'm generating the chunks of land in a separate thread. I manage ...
Ben Beazley's user avatar
0 votes
1 answer
162 views

I'm making a real-time risk-like game in Python. Players can move armies from one region to another. I want army movement to take time proportional to the distance between the two regions, therefore I ...
asdf's user avatar
  • 1
0 votes
0 answers
65 views

First of all, I'm a Java coder. Usually, when you write a game, you run it on thread different than the UI one like: ...
Jacob's user avatar
  • 2,552
0 votes
1 answer
556 views

I'm currently learning to properly use multithreading in C++ in combination with OpenGL and GLFW, and I encounter a strange bug in my application. I'm generating a procedurally generated terrain in a ...
Kiryu144's user avatar
  • 137
2 votes
1 answer
4k views

I have learned how to create and manage threads in C++. Now I'm trying to create game loop based on multithreading but I can't imagine how should I split whole game to tasks. I mean, should rendering ...
Akasata Akasata's user avatar
1 vote
1 answer
1k views

I am working on a Mobile MMO and I am using .NET to build a MMO Server. My current application architecture is as follows. Clients are accepted using Async Calls (BeginAccept/EndAccept). Data incoming ...
Rithesh's user avatar
  • 21
6 votes
2 answers
3k views

There's a simple guide on the Firebase's website on how to implement the AdMob's rewarded video: https://firebase.google.com/...
Jacob's user avatar
  • 2,552
2 votes
4 answers
921 views

I have seen guides on how to implement a loading screen using more than one thread. But sure it must be possible to do so with one thread, since older (even 2D) games that run on single-threaded ...
ClassicEndingMusic's user avatar
5 votes
1 answer
1k views

I'm trying to make a loading screen. My idea is to have two threads working - one in the background loading the 'game' scene, one displaying 'load' scene. When building 'game' scene is finished, it's ...
matzar's user avatar
  • 163
5 votes
1 answer
3k views

I writing this as I have run into a dilemma that I cannot readily answer. Specifically, how many threads is too many? Background tl;dr: Writing a game (Surprise.) C++11, all server-side bits ...
Beau B.'s user avatar
  • 139
0 votes
1 answer
85 views

So, I'm working on an IEnumerator() that is called to spawn objects in a fountain style (kinda flying up and out and landing at a random spot nearby). I feel like I had this working for a hot minute, ...
Jesse Williams's user avatar
1 vote
0 answers
1k views

I am working on an application where I need to record images seen from an in-game camera. Initially, the method was to set up a TextureRenderTargetResource from the in-game capture component, and ...
HighVoltage's user avatar
3 votes
0 answers
1k views

I am working on an Unreal based open-source UAV simulation (Microsoft AirSim) where I am trying to capture and save images from a camera that's attached to the drone. The image underneath gives an ...
HighVoltage's user avatar
-1 votes
1 answer
2k views

I want to implement a custom TCP Client in Unity that has separate threads for sending and receiving certain messages. For sending, the Client is supposed to have a blocking queue, that receives ...
IARI's user avatar
  • 103
3 votes
3 answers
4k views

So I've been playing around and developing in C++ for a couple years now and have built a very simple C++ game engine for learning purposes. I now want to try and develop a simple 2d, stick figure ...
Jason's user avatar
  • 423
1 vote
0 answers
110 views

I'm working on a multiplayer game, and today I implemented basic "spatial hashing" in my entity-component-system. Before implementing that algorithm, I was sending players actions to all connected ...
Aldo's user avatar
  • 309
5 votes
2 answers
1k views

I am currently developing a rendering engine, which I plan to use for creating games. The engine makes heavy use of multithreading; I have a thread for OpenGL rendering, a thread for updating, a ...
MathuSum Mut's user avatar
1 vote
0 answers
603 views

So I'm writing this MMO server, and I'm really struggling in this topic. I'm writing a fast paced MMO, and the server max players would be 800. I have read that one thread per connection is not a ...
Jose Lopez's user avatar
1 vote
1 answer
148 views

This has been a question that has always troubled me while thinking about the code and logic behind gaming, I was wondering when and when not, is it appropriate to create new threads for different ...
Hamish's user avatar
  • 11
4 votes
1 answer
4k views

I have this game client which connects to the server and sends requests and getting responses. I have created a separate thread for listening to the server. Based on the response from the server, I ...
john6667's user avatar