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.
279 questions
14
votes
4
answers
3k
views
RTS Game AI Thread
I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics.
I know how to program. I also have ...
1
vote
0
answers
127
views
Correctly handling input in case of frame drop
My game loop looks roughly like this:
...
4
votes
4
answers
2k
views
Do games use threads?
I 'understand' that the concept of how a game runs i.e
while (game_loop = true)
{
//handle events
// input/output/sound etc
}
But it has come to my ...
0
votes
2
answers
1k
views
Game thread, render thread, animation/inverse kinematics, and synchronization
In a multithreaded setup with a game logic thread and a render thread, with some kind of skin mesh animation with inverse kinematics plus etc how does animation work? Does the game logic thread just ...
0
votes
0
answers
99
views
Understanding C# Tasks
I use a lot of path finding in my Monogame project which is taking a toll on the framerate, because in the worst case finding a path can take 200ms. So I looked into using Tasks to spread path finding ...
0
votes
2
answers
255
views
How to setup a loading screen using SDL_Threads?
I am trying to set up a basic toy example of how a loading screen would work in SDL. Here is my code below.
...
2
votes
1
answer
1k
views
How do multiplayer servers handle receiving, handling, and sending packets?
I want to make a fighter jet simulator game.
The server (authoritative) and client communicate over udp.
The server sends out updates about the gamestate at a fixed rate. Think of plane positions, ...
1
vote
2
answers
338
views
Making a game loop to run multiple threads
I'm having a really hard time understanding Threads and their contents.
What I'd like to have is a main game object (which I have) and a loop, where I can measure the time it takes for two threads to ...
0
votes
0
answers
85
views
Splitting world data between multiple threads in C++
I'm currently working on world management system for my multi-threaded game engine in C++. The problem I'm facing right now is synchronizing world data between main and render thread. The current ...
0
votes
0
answers
163
views
Multithreading Chunkbuilding - Thread.Start() acts as it is on the main thread
I'm building a game from scratch using OpenTK, in C#. It is in its base form a mesh-based voxel engine. I have a decent startup on the chunk building algorithm, multiple blocks, block data, etc, but ...
1
vote
2
answers
396
views
Bullet Physics Multi-threading Rigid Body transform jittering issues across threads
I've been working on a game using Bullet Physics for C++ as well as SDL for the windowing (with OpenGL)
I've recently threaded the game, so that a separate while loop runs the Physics Simulation, ...
1
vote
0
answers
97
views
Physics interpolation given an asynchronous physics thread
I've followed https://gafferongames.com/post/fix_your_timestep/ to do interpolated physics. I have a separate thread entirely from my graphics thread. I use vulkan which allows me to do asynchronous ...
0
votes
1
answer
750
views
Should networking and rendering be separated in multiple threads?
I've been trying to code a multiplayer client/server prototype game using SFML's networking.
My server and client use TcpSelectors to wait for a certain amount of time for incoming packets without ...
18
votes
3
answers
35k
views
Smooth loading screen between scenes
I created a loading screen to display a loading animation as the next scene is loading. I load the next scene asynchronously with:
...
0
votes
1
answer
303
views
Render and Process loop synchronisation with threads
I am developing an interactive visualizer for a project using Pangolin and OpenGL. The idea is as follows.
There are two threads:
1. Render Thread
2. Process Thread
- acquire lock and swap ...