Multithreading allows multiple threads to exist within the context of a single process sharing same resources but are able to execute independently.

learn more… | top users | synonyms

5
votes
3answers
281 views

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 ...
7
votes
1answer
543 views

How wise is this multithreading architecture?

I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
6
votes
3answers
2k views

Mixing threads and coroutines in Unity3D Mobile

I had a coroutine in Unity3D that downloaded a zip from a server, extracted it to the persistent data path, and loaded its contents into memory. The flow looked something like this: IEnumerator ...
0
votes
1answer
128 views

Receiving server data inside game loop

I'm planning on how my multiplayer game client game loop should work. While I'm convinced that server should be moved from game loop into it's own thread, I'm not sure what should I do about receiving ...
3
votes
2answers
530 views

Implementing multithreaded loading screens

Ok, I have fairly little multi-threading experience, but i have done a similar thing before without issue...but this has me stumped. This is in C++, Directx9 Visual Studio... My game basically runs ...
0
votes
1answer
155 views

Can threads be used to run resource consuming methods without -ever- freezing UI?

Until recently I was sure that running expensive operations in threads can prevent UI freezing, but now I'm not. Is it not guaranteed that a threaded operation will not hog the main thread's ...
1
vote
0answers
261 views

Expensive operations and threading in XNA games [closed]

There's this post, it's highest voted answer got me curious about the many ways of threading games. My game has input update, game logic update, user interface update and expensive operations ...
0
votes
1answer
252 views

SpriteBatch.end() Issue because of a thread

While playing, I use a thread to Load() and Unload() Texture2D. I have multiple ContentManager to only Unload() Texture2D I want to unload. But sometimes, I have this issue on the SpriteBatch.End() : ...
1
vote
2answers
331 views

Multiple pipelined game loops

I am considering using the following game engine design pattern, but I am unsure if it's a good idea or not: Each major task (drawing, physics, logic, networking, disk I/O) will have its own ...
3
votes
1answer
452 views

Unity editor stalling on second attempt to play

I am attempting to use a Tobii TX300 eye-tracker as an input device for Unity. This device is connected via LAN (TCP connection managed by Tobii SDK). The Tobii SDK has appropriate methods (I am ...
2
votes
1answer
1k views

Code structure in Android 2D game

Well I've finnaly decided to start Android game dev, and my first project will be simple 2d canvas based game. I have some experience in game developing with C# and XNA, and I'm a bit confused now. ...
4
votes
1answer
770 views

How do I use threads together with DirectX11?

I have only found the documents on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476884(v=vs.85).aspx Although it doesn't say anything about creating them, it mentions that device is ...
4
votes
1answer
432 views

Splitting logic into threads in Java tower defence game

I'm making a tower defence game in Java! It's my first game development. I want to know how many threads Do I need to create in a game, to split logic.. I've made this one: Main App thread (adds ...
0
votes
1answer
115 views

Efficiency concerning thread granularity

Lately, I've been thinking of ways to use multithreading to improve the speed of different parts of a game engine. What confuses me is the appropriate granularity of threads, especially when dealing ...
1
vote
3answers
244 views

Multithreading for a mixed-genre game in Python?

So here's the situation. I'm making a game that mixes two genres; arcade shooter and puzzler. They don't intertwine TOO much; all the interaction that really goes on is that every time an enemy is ...
0
votes
3answers
229 views

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 ...
0
votes
1answer
506 views

Separate update and render

I'm programming a simple Snake in Java. I'm a complete newbie when it comes to Java and Game Developing, so please bear with me ;) Until now, I have been using a UI thread, as well as a ...
5
votes
1answer
334 views

Does using [STAThread] with XNA have any negative implications?

I'm working on a game in XNA, which has an inbuilt level editor. To facilitate this I want use the FileOpenDialog from Winforms. I followed the instructions as per this answer. This involves setting ...
2
votes
1answer
191 views

Does concurrency inherently introduce “randomness” into a game?

When a game is implemented with concurrency (as most games are), does this necessarily, by its very nature, introduce an element of randomness into the game that is outside of the players' control? ...
1
vote
1answer
363 views

GLES2.0 3D Android game performance and multi threading the update?

I have profiled my mixed Java\C++ Android game and I got the following result: As you can see, the pink think is a C++ functions that updates the game. It does things like updating the logic but it ...
2
votes
4answers
910 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 attention while programming in another ...
1
vote
5answers
1k views

multi-thread in mmorpg server

For MMORPG, there is a tick function to update every object's state in a map. The function was triggered by a timer in fixed interval. So each map's update can be dispatch to different thread. At ...
3
votes
2answers
533 views

Is it safe to run multiple XNA ContentManager instances on multiple threads?

My XNA project currently uses one ContentManager instance, and one dedicated background thread for loading all content. I wonder, would it be safe to have multiple ContentManager instances, each in ...
4
votes
2answers
1k views

How to create a thread in XNA for pathfinding?

I am trying to create a separate thread for my enemy's A* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this ...
1
vote
2answers
674 views

Multi-threaded JOGL Problem

I'm writing a simple OpenGL application in Java that implements the Monte Carlo method for estimating the value of PI. The method is pretty easy. Simply, you draw a circle inside a unit square and ...
0
votes
0answers
54 views

XNA Xbox, utilizing multiple cores [duplicate]

Possible Duplicate: XNA: How does threading work? It's my understanding that the Xbox has 3 cores that are available to use. I'm hoping to offload AI to another core, and possibly use ...
1
vote
2answers
120 views

Threading iPhone

Say I have a group of large meshes that I have to intersect rays against. Assume also, for whatever reason, I cannot further simplify/reduce poly check count by spatial subdivisioning. I can do this ...
1
vote
1answer
174 views

Thread.SetProcessorAffinity() equivalent for Windows?

I want to be able to use multiple cores in my XNA game, but it seems that Thread.SetProcessorAffinity() is only usable on xbox. That being said, is there any way to run a small chunk of my code on ...
2
votes
1answer
338 views

Synchronizing input, update and rendering threads

How do you synchronise the input-handling, state-updating and rendering threads? If a sprite position is modified due to input, the wrong position of the sprite might be drawn to the screen if the ...
5
votes
1answer
205 views

Should I amortize scripting cost via bytecode analysis or multithreading?

I'm working on a game sort of thing where users can write arbitrary code for individual agents, and I'm trying to decide the best way to divide up computation time. The simplest option would be to ...
2
votes
3answers
536 views

Should I dedicate a single thread to each player in a split-screen game?

I was thinking about making multiplayer version of a game I am making with SDL and OpenGL. It would be a split-screen game. Do you think it would be a good idea to have each part of the screen (game ...
2
votes
4answers
2k views

How to separate my rendering from game loop?

If I have a (complex) operation that takes a long time for it to finish, for instance, a couple of seconds, my frame rate drops far below the acceptable. How could I still implement it while it is not ...
2
votes
1answer
292 views

Parallelizing creation of geometry chunks in minecraft-like game

In my game I separate creation of chunks into two stages. The first is where I generate the heightmap using simplex noise and the 2nd is when I create the actual vertex buffers. I do it like this so ...
0
votes
1answer
165 views

Saving big maps

When the map is relatively small, it takes a few milliseconds to save it, so it's generally ok. But with other, much much bigger maps, it could take several seconds, which is both annoying and hangs ...
53
votes
5answers
11k views

How does Dwarf Fortress keep track of so many entities without losing performance?

In Dwarf Fortress you can have hundreds of Dwarves, animals, goblins, etc in game at any one time, each with their own complex AI and pathfinding routines. My question is how does this not produce ...
2
votes
3answers
331 views

Multithreaded game fails on SwapBuffers in render thread at exit

The render loop and windows message loop run on separate threads. The way the program exits is that after PostQuitMessage is called in WM_DESTROY the message loop thread signals the render loop thread ...
1
vote
1answer
475 views

Updating scene graph in multithreaded game

In a game with a render thread and a game logic thread the game logic thread needs to update the scene graph used by the render thread. I've read about ideas such as a queue of updates. Can someone ...
2
votes
2answers
424 views

Is using a dedicated thread just for sending gpu commands a good idea?

The most basic game loop is like this : while(1) { update(); draw(); swapbuffers(); } This is very simple but have a problem : some drawing commands can be blocking and cpu will wait ...
0
votes
2answers
513 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 ...
11
votes
4answers
2k views

Synchronization between game logic thread and rendering thread

How does one separate game logic and rendering? I know there seem to already be questions on here asking exactly that but the answers are not satisfactory to me. From what I understand so far the ...
-1
votes
1answer
712 views

Thread safe double buffering

I am trying to implement a draw map method that will draw the tiled image across the surface of the component. I'm having issue with this code. The double buffering does not seem to be working, ...
4
votes
4answers
1k views

A* algorithm very slow

I have an programming a RTS game (I use XNA with C#). The pathfinding is working fine, except that when it has a lot of node to search in, there is a lag period of one or two seconds, it happens ...
0
votes
3answers
164 views

How can I save state from script in a multithreaded engine?

We are building a multithreaded game engine and we've encountered some problems as described below. The engine have 3 threads in total: script, render, and audio. Each frame, we update these 3 ...
-3
votes
2answers
203 views

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 ...
2
votes
2answers
265 views

Serverside memory efficiency and threading for a turn based game

Im programming on a turn based war-game for some years now (along with the engine) and Im having quite a hard time at figuring out what the games server architecture should look like, since most game ...
0
votes
1answer
2k views

C# multi-player socket server (need clarification/suggestions)

I've been working on an 2D-RPG for a while and I recently decided to make it into an MMO (not really massive, but multi-player). Anyways, I'm attempting to write a game server in C#. Yes, I know I ...
5
votes
1answer
312 views

Loading content (meshes, textures, sounds) in the background

In my game, I am aiming for a continuous world, that is, a world where you can go anywhere without breaking the immersion through load times and "virtual seams". My world is broken up into regions, ...
0
votes
0answers
367 views

How do I properly use multithreading with Nvidia PhysX?

I'm having a multithreading problem with Nvidia PhysX. the SDK requires that you call Simulate() (starts computing new physics positions within a new thread) and FetchResults() (waits 'till the ...
2
votes
5answers
2k views

Xna Loading Screens

I'm making a 2D XNA game. I'd like to implement loading screens when stuff has to load for a while. Like when I login to an account, connect to the server, and generate worlds. I'm pretty sure it ...
11
votes
6answers
1k views

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

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