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
1
vote
0
answers
91
views
Correctly handling input in case of frame drop
My game loop looks roughly like this:
...
0
votes
0
answers
90
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
0
answers
63
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 ...
1
vote
2
answers
292
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
139
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
340
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
86
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
2
answers
229
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.
...
0
votes
1
answer
687
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 ...
0
votes
1
answer
259
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 ...
1
vote
1
answer
527
views
How would you write a multithreaded gameloop in C++20 (+) or C++/WinRT?
What are the pros/cons of using either C++20 std:async or C++/WinRT's asynchronous thread and messaging support?
What would the code look like when implementing multithreaded game-loops that ...
0
votes
0
answers
572
views
Message pump and D3D11 DXGI in separate threads
I have read:
https://learn.microsoft.com/en-us/windows/win32/direct3darticles/dxgi-best-practices#multithreading-and-dxgi
https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/d3d10-graphics-...
1
vote
1
answer
256
views
Multithreading in extra large MMO worlds
How is a gameworld of super large size handled? I was always wondering how games handle large MMO worlds. Until now I thought that separation of areas was the key for games like World of Warcraft. In ...
0
votes
1
answer
80
views
Any way to copy data into a component in another thread?
Pretty sure the answer to this is a resounding no but just in case...
Running an expensive algorithm in a separate thread. However, it returns data that must be copied into the arrays of a Shapes....
0
votes
1
answer
2k
views
How to use Unity job system to do background work spanning multiple frames?
I have a slow level generation algorithm that freezes the main thread when it runs.
I found this post which is exactly the same problem, but predates the Jobs system.
All the jobs examples I found are ...