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.

274 questions
11
votes
6 answers

What is the best way to exploit multicores when making multithread games?

Many people suggest to write a program, and then start optimizing it. But I think that when it's coming to multithreading with multicore, a little think ahead is required. I've read about using threads, and experienced it myself during some courses…
Keeper
  • 327
  • 1
  • 10
9
votes
3 answers

When does a parallel-tasks engine becomes a good solution?

I'm often tempted to break the game I'm working on to try a parallel-tasks based architecture, but that don't seem a big requirement for my project so I avoid this for the moment. I'm planning to just try it in a toy project first, to "play with the…
Klaim
  • 2,624
  • 1
  • 26
  • 37
5
votes
3 answers

What operations should be multithreaded?

I wonder what game operations should be multithreaded, and which should always run on the main thread. The most expensive operations I could come up with are: loading a level loading resources (for each level or at game initialization) updating…
user1306322
  • 1,399
  • 1
  • 19
  • 38
5
votes
1 answer

Is locking required to implement a seperate rendering thread?

I have been reading a lot about this, but still not sure about a proper way to implement an independent render thread, using a variable time step and running in parallel to a physics thread, which uses a smaller, fixed time step. I'm familiar with…
1
vote
0 answers

Multi Threading - How to split the tasks

if I have a game engine with the basic 'game engine' components, what is the best way to 'split' the tasks with a multi-threaded approach? Assuming I have the standard components of: Rendering Physics Scripts Networking And a quad-core, I see two…
Xenoprimate
  • 689
  • 5
  • 22
1
vote
1 answer

Implementations of task-based parallelism in game engines_

I'm looking for implementations of this because I'm having an especially hard time understanding how data is usually handled. As I understand it, simply using critical sections and locking code regions where modification of shared resources happens…
TravisG
  • 4,402
  • 4
  • 36
  • 59
1
vote
1 answer

Multithreading in Gamedevelopment, specifically Networking

Let me quick explain my actual setup: I use 2 Threads, one for networking and one for the main-loop (input, update, render). I have two synchronized queues, one for mainthread->networking and one for networking->mainthread. When a chunk of bytes…
tkausl
  • 1,860
  • 19
  • 25
0
votes
3 answers

Threads slowing down application and not working properly

I'm making a software renderer which does per-polygon rasterization using a floating point digital differential analyzer algorithm. My idea was to create two threads for rasterization and have them work like so: one thread draws each even scanline…
toby
  • 176
  • 13
-4
votes
2 answers

Libraries for multi threading

When multithreading a game what do i need to think about when picking the Libraries when developing for pc? I have been looking at process.h and was wondering if there are any big downsides (like speed or stability) whit this library and if i should…
Borgel
  • 123
  • 1