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

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
809 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
752 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
665 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
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
575 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
185 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, ...
16
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
734 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
742 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 ...
8
votes
2answers
1k views

Java code for client-server game on Android

I have developed a game on Android. Now I want to play it on wifi or 3G. I have game packets which I want to send form client (mobile) to server then to another client (mobile). I don't know how to ...
1
vote
1answer
745 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
570 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 ...
8
votes
1answer
3k views

How to use multi-thread OpenGL application to update VBO and use it at the same time?

I have simple application. It has two threads. Each thread has it's own rendering context, but they share one VBO (this is working, I tested it). Now what I want: One thread is rendering some data ...
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 ...
7
votes
2answers
2k views

Multi threaded game - updating, rendering, and how to split them

From the StackOverflow post (it was recommended I move this): So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of ...
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 ...
4
votes
4answers
998 views

Creating the concept of Time

So I've reached the point in my exploration of gaming where I'd like to impliment the concept of time into my little demo I've been building. What are some common methodologies for creating the ...
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 ...
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 ...
-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 ...
50
votes
6answers
11k views

Multi-threaded games best practices. One thread for 'logic', one for rendering, or more?

I'm aware there is immense slowing whenever data synchronization is required (let alone any mutex locks). I was thinking getting it to the extreme and doing threads for any subsystem conceivable. But ...
3
votes
4answers
1k views

How to properly multi thread an RPG

I am working on an RPG type game in Java and I would like to know a few things relating to threading, What is the best way to implement a "wait for this then do this" without hanging the whole ...
3
votes
3answers
454 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 ...
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
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
320 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 ...
31
votes
6answers
8k views

Multi-threaded game (engine) design resources?

What are the best resources on multi-threaded game or game engine design and development? As this is obviously where computers are headed, I intend to study this topic and I'd like to know what ...
5
votes
3answers
889 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 ...
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? ...
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, ...