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
0 votes
1 answer
26 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....
user avatar
0 votes
1 answer
53 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 ...
user avatar
0 votes
0 answers
27 views

Python GLFW and PyOpenGL: How to update a VBO from a thread while rendering at the same time

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 ...
user avatar
1 vote
1 answer
203 views

Using Unity Jobs to encode file to PNG and then save it on Main Thread

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 ...
user avatar
0 votes
0 answers
52 views

What's a good architecture for a simulation?

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, ...
user avatar
  • 610
0 votes
0 answers
80 views

What is the most performant way for a game engine to poll gamecontrollers?

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 ...
user avatar
0 votes
1 answer
187 views

How do game loading screens work?

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 ...
user avatar
  • 103
1 vote
1 answer
129 views

Wait for a function to return value without impacting framerate

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 ...
user avatar
0 votes
0 answers
65 views

ECS multithreading without value types?

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 ...
user avatar
  • 483
1 vote
0 answers
58 views

Advice on Multi-Threading Vertex Buffers in Vulkan (or any api)

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, ...
user avatar
0 votes
1 answer
84 views

while(1) in separate threads. safe and efficient

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: ...
user avatar
1 vote
1 answer
196 views

Multithreading vs Asynchronous game loop for multiplayer online game?

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 ...
user avatar
  • 111
0 votes
2 answers
366 views

How to process events as well as do OpenGL rendering using multithreading?

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 ...
user avatar
-1 votes
1 answer
88 views

Parallel transformations tree update

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 ...
user avatar
2 votes
1 answer
545 views

Question on parallelizing ECS Systems

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 ...
user avatar
  • 121
0 votes
1 answer
126 views

Should a server run all maps in one loop, or a thread/game loop per map?

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 ...
user avatar
1 vote
1 answer
78 views

Multithreaded callback

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 ...
user avatar
  • 183
0 votes
1 answer
128 views

Running multiple game servers on single host

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 ...
user avatar
0 votes
1 answer
127 views

How can I handle hundreds of calculation heavy nodes at the same time?

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 ...
user avatar
1 vote
2 answers
423 views

is unity DOTS mature enough to build a whole project on it? [closed]

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 ...
user avatar
  • 2,438
0 votes
1 answer
192 views

Is Dedicating A Thread To Inputs A Good Idea In Game Design?

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 ...
user avatar
  • 101
1 vote
2 answers
778 views

How would I optimize that piece of code using Unity?

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 ...
user avatar
2 votes
1 answer
299 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, ...
user avatar
  • 183
9 votes
2 answers
9k views

Should I use Async & Await, instead of Coroutines, in Unity?

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?
user avatar
  • 5,221
0 votes
1 answer
49 views

Unity: How to connect to server with status in dialog

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 ...
user avatar
  • 57
1 vote
0 answers
57 views

Binding Lua Function to Perform tasks using std::async

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 ...
user avatar
  • 11
2 votes
1 answer
483 views

In Unreal why is it safe to access a UTexture2D's properties from the render thread despite the documentation stating this is not allowed?

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

Multithreaded design for a game server

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 ...
user avatar
0 votes
1 answer
72 views

Box2d: crash on createBody in beginContact callback

I am getting this error on creating body in contactListener ...
user avatar
0 votes
1 answer
248 views

Worker threads are not being utilized in Time rewind system, is this job system really multi-threaded?

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 ...
user avatar
0 votes
0 answers
112 views

Help deciding data structure for spatial partitioning, using only value-types in c#

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 ...
user avatar
0 votes
1 answer
145 views

Managing large amounts of data and processes for an economy management game

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 ...
user avatar
  • 11
0 votes
0 answers
68 views

How should I cycle my game to be more scalable?

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 ...
user avatar
0 votes
2 answers
827 views

Should I create thread for both UDP and TCP?

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

How to make progress bar in EditorWindow with Threading in Unity?

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 ...
user avatar
1 vote
1 answer
274 views

Multithreading: Each system on a different thread or a thread pool?

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 ...
user avatar
  • 181
2 votes
1 answer
553 views

JWJGL Multi-threading to separate update and render

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-...
user avatar
  • 193
-1 votes
1 answer
234 views

Does SDL_SetThreadPriority work with std::thread

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 ...
user avatar
  • 3
1 vote
1 answer
144 views

How to control JavaFX's animations execution order when animations "queue" is being altered in run-time?

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 ...
user avatar
0 votes
0 answers
153 views

How to fx low FPS in a single threaded Directx9 3D game

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 ...
user avatar
1 vote
1 answer
252 views

What's the best practice to use the pbo to upload multi textures?

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 ...
user avatar
1 vote
2 answers
1k views

OpenGL draw functions and multi-threading. How they work together?

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 ...
user avatar
  • 475
1 vote
1 answer
423 views

Calculating distance using Job System

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 ...
user avatar
  • 370
5 votes
1 answer
1k views

Multithreading MMO Server. A thread per area OK? [closed]

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 ...
user avatar
  • 161
0 votes
2 answers
577 views

While loop running in thread, but not doing anything [C++]

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, ...
user avatar
1 vote
1 answer
376 views

My Java Game's movement looks awfull. Maybe Problem with Thread.sleep

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 ...
user avatar
0 votes
1 answer
98 views

processing request in order on game server

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 ...
user avatar
  • 135
0 votes
1 answer
694 views

Unity: Loading screen without a coroutine (is it possible?)

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 ...
user avatar
  • 267
0 votes
3 answers
2k views

Two Gameloops instead of one, wouldn't it be better?

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 ...
user avatar
  • 11
0 votes
1 answer
587 views

Access a ID3D11Texture2D in another thread

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 ...
user avatar

1
2 3 4 5 6