Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

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 vote
0 answers
126 views

My game loop looks roughly like this: ...
pan's user avatar
  • 111
0 votes
0 answers
98 views

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 ...
Depenau's user avatar
  • 111
0 votes
0 answers
85 views

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 ...
xarxarx's user avatar
1 vote
2 answers
336 views

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 ...
Valtsuh's user avatar
  • 139
0 votes
0 answers
161 views

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 ...
Pale_Gray's user avatar
1 vote
2 answers
392 views

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, ...
jasonmzx's user avatar
1 vote
0 answers
97 views

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 ...
Krupip's user avatar
  • 1,811
0 votes
2 answers
252 views

I am trying to set up a basic toy example of how a loading screen would work in SDL. Here is my code below. ...
lancen's user avatar
  • 33
0 votes
1 answer
740 views

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 ...
xGolden's user avatar
0 votes
1 answer
296 views

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 ...
Nitron_707's user avatar
1 vote
1 answer
566 views

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 ...
elika kohen's user avatar
0 votes
0 answers
611 views

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-...
Peter's user avatar
  • 1
1 vote
1 answer
288 views

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 ...
plomba's user avatar
  • 13
0 votes
1 answer
90 views

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....
arcadeperfect's user avatar
0 votes
1 answer
2k views

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 ...
arcadeperfect's user avatar
0 votes
1 answer
579 views

I'm really new to this community. I'm sorry for any mistakes in advance.I'm making a game like minecraft with GLFW and OpenGL. The problem is, I just can't render a VBO while I update it from another ...
N3RDIUM's user avatar
  • 53
1 vote
1 answer
2k views

I have a following code , and i can not retrive encoded Output from Job. If I Use JOB : The result is not a valid png file. What I get is a 67,2 MB file which can not be opened with any image editor ...
Corvus Ultima's user avatar
0 votes
0 answers
150 views

I have a concept that involves a world being simulated. Lots of entities and processes acting upon them, not to mention interactions, etc... Every SimulationTick, ...
Basic's user avatar
  • 1,287
0 votes
0 answers
250 views

I am working on a game engine, and currently I hesitate on this decision. I developed a library that allows Dualsense and Dualshock4 devices to be used in the engine. XBox Support is made possible via ...
broken-bytes's user avatar
0 votes
1 answer
747 views

I have successfully developed a 2D game. I display sequential introduction images then load the start screen after that of course I load the game level in a single thread, it is a basic functional ...
D.elp's user avatar
  • 103
1 vote
1 answer
432 views

I'm looking to do some possibly heavy calculation in my game. An agent in my game needs to evaluate up to 1000 objects while performing heavy calculations to select his next job. I want to either ...
caleidon's user avatar
  • 591
0 votes
0 answers
191 views

Im working with an Java based ECS framework called "Artemis ODB". Its great so far but it lacks multithreading or jobs. So i wanted to add them by myself. I actually wanted to give each job ...
genaray's user avatar
  • 517
1 vote
0 answers
140 views

I have managed to multithread everything in my voxel engine besides two vkCmdCopyBuffer() calls that constantly update a single massive vertex and index buffer using an array of thousands of regions, ...
Tristan367's user avatar
0 votes
1 answer
376 views

In my TCP multithreaded server written in C, I have multiple threads with infinite loops checking for new inputs from thread safe queue and then doing their jobs. pseudocode: ...
user154155's user avatar
1 vote
1 answer
711 views

I'm trying to create a turn based multiplayer online game where players can be grouped in a room/lobby and play (similar to Ludo but number of players can be more than 4). There can be multiple such ...
Kaushal28's user avatar
  • 111
0 votes
2 answers
2k views

I am working on a very complicated graphics rendering, using OpenGL, and it is very time consuming, in the sense that it creates a delay in the event handling, of my application to an extend that, the ...
Aravind A's user avatar
  • 103
-1 votes
1 answer
206 views

I create my own pet-project graphics engine for the learning and research purposes. Now I'm trying to create a more efficient scene transformations update technique. My current approach is the linear ...
FoxCanFly's user avatar
3 votes
1 answer
5k views

Learning & Implementing an ECS system for my game, I'm wondering how I am supposed to parallelize the systems on multiple threads. Different systems can't run at the same time (unless they operate ...
yggdrasil's user avatar
  • 131
0 votes
1 answer
288 views

I'm working on a real time multiplayer browser-based game. The game is top down on variable size tile based maps. There is no central map where all players come together, the entire game plays out in ...
sushibrain's user avatar
1 vote
1 answer
268 views

I'm making a multiplayer game where players fight in vehicles, and I am doubting my server architecture. As it will be physics, network and AI intensive I would like to split these 3 topics into their ...
AnnoyinC's user avatar
  • 198
0 votes
2 answers
603 views

I want to use a vps/dedicated server for game hosting. I expect hosting a lot of servers on that. For the connection, should I assign a unique port for every server or change IPs for every server. And ...
CoolingJam19341's user avatar
0 votes
1 answer
528 views

I'm currently trying to implement a basic boids simulation with godot in c#. Currently I managed to implement evasive behavior which works fine for a boid count of roughly 300. Everything beyond that ...
Crude Code's user avatar
0 votes
2 answers
592 views

maybe you assume this question opinion based but its not. please read the whole question. the question has 2 aspects. are all features implemented? just better say, can i do everything or any ...
virtouso's user avatar
  • 2,680
0 votes
1 answer
1k views

Say I design my game targeting a specific PC to run it on 120 frames per second. And say I need to get Input data from the controller at a frequency of 800 times per second, and feed that input data ...
Physician's user avatar
  • 101
1 vote
2 answers
1k views

I'm doing filtering on a depth image and I would like to convert that piece of code into job system of unity, because it's so slow. The image update is called each frame ...
Andre Ahmed's user avatar
2 votes
1 answer
1k views

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, ...
AnnoyinC's user avatar
  • 198
11 votes
2 answers
16k views

Should I use Async & Await in Unity? Or should I keep using Coroutines? If I should use Async & Await, how can I do so in a manner comparable to Coroutines?
Evorlor's user avatar
  • 5,881
0 votes
1 answer
100 views

I am trying to build in unity a basic logon screen. Now I'm building on something if the connection will have delay or so... There will be a dialog, where the progress of connection to server will be ...
Zechy's user avatar
  • 67
1 vote
0 answers
116 views

I am trying to load a bunch of mesh resources in the format of .obj files. Some of the files are very high in poly count so when loading using the below method It takes more than 10 seconds. I would ...
JJerome's user avatar
  • 11
2 votes
1 answer
1k views

I've been trying to implement something that will update textures on the render thread from a background thread. And from what I've read of the unreal engine documentation you should never access a ...
J. Rehbein's user avatar
2 votes
1 answer
3k views

I would like to start developing my own game. Basically, the game has a "world" that players can travel around and modify. Think of it as a much more realistic version of Minecraft or an open world ...
Java Developer's user avatar
0 votes
1 answer
128 views

I am getting this error on creating body in contactListener ...
Shubham Agrawal's user avatar
0 votes
1 answer
388 views

I am trying to make a simple time rewind mechanic. It's working but it becomes slower as number of game objects increases. I decided to give Job System a shot. My idea is to interpolate between ...
videogamechef's user avatar
0 votes
0 answers
290 views

I simply want to implement some sort of grid where I can sort units in an RTS into cells, and then for each unit check to avoid other units and attack other units, in 2d. My map grid is currently 10 ...
Tree3708's user avatar
0 votes
1 answer
193 views

I'm making a management game in the vein of Anno or Stellaris, but I'm unsure how to manage all my data efficiently. Short example: the player controls multiple islands. Each island has factories on ...
J. Doe's user avatar
  • 11
0 votes
0 answers
91 views

I'm trying to improve my game emulator so it can handle more users. I currently have one separate thread and execute all processing there. The cycles processes players and rooms, rooms are individual ...
Ash Ketchum's user avatar
0 votes
2 answers
1k views

So I have TCP connection for stuff like leveing, player info, etc..And I have UDP datagram for stuff like player position, rotation, etc..Should I create new thread for both TCP and UDP on both client ...
Vuk Uskokovic's user avatar
0 votes
1 answer
2k views

I need to make a progress bar in EditorWindow. To do this, I perform the function of calculations in threads: Thread thread = new Thread (_worker.Work); thread.Start (); The class itself emitting ...
Ivan Triumphov's user avatar
1 vote
1 answer
2k views

I'm building a fairly involved game using OpenGL and C++. I've been thinking about how to implement multithreading, and the two options are: 1) Each system (Graphics, Audio, Physics, et cetera) gets ...
Rish's user avatar
  • 181
2 votes
1 answer
1k views

Introduction: I am currently designing a game in Java using the LWJGL 3.0, with Gradle. I have quite an advanced knowledge on multi-threading, and I am aware how GLFW does/doesn't implement multi-...
Kris Rice's user avatar
  • 193

1
2 3 4 5 6