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

0
votes
1answer
100 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
212 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
205 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
376 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
293 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
190 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
323 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
694 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
456 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
508 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
117 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
166 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
283 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
200 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
490 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
281 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
164 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
9k 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
281 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
364 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
390 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
466 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
562 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
153 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
198 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
239 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
1k 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
282 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
312 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
952 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 ...
4
votes
1answer
607 views

Best way to separate display and game logic (threads)

What is the best way to separate render and game logic threads? I'd like to make logic-heavy game (ai, machine learning, and network) in which world updates 50-60 times per second. I want to ...
4
votes
2answers
596 views

Using Python what is the best way to perform heavy tasks in the background?

I'm generating large amounts of procedural map data on the fly, however my game engine doesn't rely on them to render the scene and I'd like to build it on in the background and pop it into the world ...
3
votes
4answers
1k views

Why does using multithreading during my load screen increase my load times? [closed]

OK, I added a loading screen to my game, and in order for the game able to update and show a loading screen and load stuff in the background I came to the concludsion that I needed to host the loading ...
4
votes
3answers
779 views

Multi Threading In Update Loop

Okay so I am working on a game engine and this was my previous game loop: Game::Run() { While(!m_GameDone) Client.Update(); LocalServer.Update(); } but what I want to do is: ...
9
votes
1answer
702 views

Why does V8 not run with SDL threads?

i was able to compile and link V8 against my game and code interpretation works fine. However I want to divide my code and the game loop should exist in one thread and the scripting engine should run ...
2
votes
1answer
630 views

What threading strategy does a game like Transport Tycoon use?

Transport Tycoon is a simulation game where you control a transport company, place railroad tracks and trains, airports, bus depots, boats etc. Now the game is about 15 years old and I remember ...
-2
votes
1answer
5k views

How do I start writing an MMO game server? [closed]

I am developing a multi-player on-line game. I just started coding the server but I have no idea how to do it. Do I have to use threads ? And if i do, do I need one thread for every client? Knowing ...
1
vote
1answer
7k views

Java 2D Tile Map and Moving Sprites with threads

I'm having difficulties understanding how to use threads and I'm not sure if my basic structure is right. This is my Board Class: package mortifera; import java.awt.Color; import java.awt.Graphics; ...
3
votes
3answers
560 views

State Changes in a Component Based Architecture [closed]

I'm currently working on a game and using the naive component based architecture thingie (Entities are a bag of components, entity.Update() calls Update on each updateable component), while the ...
2
votes
1answer
175 views

Audio Thread as daemon thread

I'm looking to set up two threads in my puzzle game, one for logic/graphics, and one for audio. Am I correct in thinking that the thread that handles the audio should be set as a daemon thread, ...
14
votes
4answers
4k views

How can I make message passing between threads in a multithreaded engine less cumbersome?

The C++ engine I'm working on currently is split up into several large threads- Generation (for creating my procedural content), Gameplay (for AI, scripts, simulation), Physics, and Rendering. The ...
8
votes
3answers
707 views

How should I structure my classes to allow for multithreaded simulation?

In my game, there are plots of land with buildings (houses, resource centers). Buildings like houses have tenants, rooms, add-ons, et cetera, and there are several values that have to be simulated ...
20
votes
3answers
1k views

Multi-platform multi-threading: What are the real challenges?

While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different ...