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

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
157 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 ...
5
votes
1answer
306 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, ...
2
votes
2answers
258 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 ...
4
votes
3answers
815 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: ...
0
votes
0answers
345 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 ...
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 ...
4
votes
1answer
659 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
741 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 ...
9
votes
1answer
764 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
668 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 ...
1
vote
1answer
8k 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
578 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
186 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, ...
19
votes
2answers
7k views

How many threads should an Android game use?

At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by GLSurfaceView. Renderer.onDrawFrame() should be doing a minimum of work to get the higest FPS. The physics, AI, ...
8
votes
3answers
1k views

Android threads trouble wrapping my head around design

I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I ...
8
votes
3answers
736 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 ...
1
vote
2answers
749 views

Cocos 2D putting things on the cocos thread or not?

We are using Cocos 2D for Android and are unsure if it's a good thing to execute our non-ui tasks on the Cocos thread as a way to get the animations in our game to pause. What is the recommended ...
1
vote
1answer
751 views

Tetris style game in java (for now) will I need to use threads?

I'm looking at developing a puzzle game, it might be like tetris or something similar, perhaps more like bejewelled in that the player will select objects with the mouse to manipulate them. I've ...
6
votes
3answers
576 views

When does 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 ...
12
votes
4answers
1k views

RTS Game AI Thread

I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics. I know how to program. I also have ...
2
votes
1answer
139 views

What causes my client's painting & input thread to stop? [closed]

I recently returned to face a problem I had with a game client of mine, i.e. the client's thread responsible for input & painting becomes unable to run after some while. I suspect that it has ...
11
votes
5answers
1k views

Sprites as Actors

I'm not experienced in Game Development questions, but as a programmer. In the language Scala, you can have scalable multi-tasking with Actors, very stable, as I hear. You can even have hundreds of ...
4
votes
4answers
2k views

One True Event Loop

Simple programs that collect data from only one system need only one (blocking) event loop. For example, Windows applications have the message loop, POSIX network programs usually have a ...
6
votes
2answers
464 views

How do you handle scripting in multithreaded environment

In my experience, two approaches are preferred when people want to handle scripting in multithreaded environment. Synchronize every accesses to scripting module with one coarse-grained lock. No ...
-1
votes
1answer
360 views

xna download website source code

I have to download the html code of a web site during the game. I am taking the poster url of a movie from the imdb web site by scrapping the html ( also other informations ). I have to do the ...
19
votes
6answers
1k views

Data structures for interpolation and threading?

I've been dealing with some frame-rate jittering issues with my game lately, and it seems that the best solution would be the one suggested by Glenn Fiedler (Gaffer on Games) in the classic Fix Your ...
3
votes
3answers
456 views

Get rid of the usual MUD cycles

I am working on a MUD engine and I want to do it a little differently then all the MUD games I played. I find a "cycle" system very boring. One of the idea I had is to make every clients socket ...
11
votes
1answer
2k views

Scene Graph in Separate Thread

I develop my own game engine for fun (but not profit). I have rendering in one thread and my scene graph updates (velocity, etc.) in another. When it's time to render, the render thread adds the ...
3
votes
1answer
408 views

What is the right process to get compatibility or at least a workaround for the ‘Threaded optimization’ feature of NVIDIA?

It's peculiar this issue is not well understood on NVIDIA forums and project forums. For example, the well known ioquake3 project based on id tech 3 requires to force 'Threaded optimization' off on ...
3
votes
2answers
322 views

Profiling code with threads and script interpreter

Basically, how I profile a game that have multithreading and script interpreter? (Lua in my case) I have no idea of where to look for that. Also it would be nice to be able to profile code that ...
8
votes
2answers
1k views

XNA: How does threading work?

I would like to implement threading in my XNA game but I'm not sure how things work when compiling for the XBOX 360. Could someone elaborate on this? For example, how many threads does XBOX support? ...
5
votes
3answers
898 views

Is it necessary to wait for rendering thread to terminate in surfaceDestroyed(…)

I just wrote a simple Android app that uses SurfaceHolder.Callback interface to communicate the state of the SurfaceView. In the Callback.surfaceDestroyed() method i just informed the rendering thread ...