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

1
vote
3answers
112 views

How do I write a game server with single-threaded networking?

I want to write a game server with one thread for clients message handling and use something like epoll to accept network messages. All I/O and database access will be processed in a thread pool and ...
1
vote
1answer
92 views

Swing for game development - regarding threads

For those of you who use Swing to develop their real-time Java games. (Meanign a game that constantly updates game state and redraws the screen using a constant loop). As I see it, there are three ...
0
votes
1answer
188 views

Communication between Box2D and libGDX Stage (Scene2D) running in separate threads

I'm making a physics based 2D game using libGDX and Box2D. I want to move the execution of the simulation out of render thread. I use immutable messages and the BlockingQueue to pass the information ...
1
vote
2answers
81 views

Application of classes with critical non-static fields in LWJGL

I'm going to be as specific about this question as I can. Ultimately, how is it that I apply a class that uses non-static fields in LWJGL? More specifically, I know that OpenGL is quite nearly more a ...
2
votes
4answers
250 views

Should I use one thread per game object?

I developing a simple real-time strategy game in a small team with no experience, and we're considering using one thread per game object (tank, soldier, etc). Is this a good idea or is it overkill? ...
3
votes
1answer
89 views

Pro's/Con's of separating game logic and render threads

Originally, I have thought that it is good practice to separate my game logic (updating) from my rendering thread. In this threading model, the rendering thread has no limitation on frame rate and ...
1
vote
0answers
81 views

Android and OpenGL, single thread vs double thread

I'm trying to optimize my Android OpenGL ES 2.0 application, and I find myself being CPU bound. After googling, I've found this, which suggest to use a thread for updating objects, and a thread for ...
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 ...
1
vote
1answer
131 views

Decoupling rendering pipeline (for UI responsiveness): Multithreading and multiple contexts?

Warning! Wall of text (see <TL;DR> paragraphs below for short version) I have been noticing something in quite many games (most recently in cutting-edge RTS games such as Uber Entertainment's ...
1
vote
1answer
148 views

Why game loop should be running on a separate thread?

I am struggling to fully understand the responsiveness argument suggesting to run the game loop on a separate thread other than main thread. When OS sends a user event (touch, mouse move, etc.) it ...
-1
votes
2answers
133 views

Do I need threads in Hangman game? [closed]

I wish to implement a simple multiplayer Hangman game with the rule slightly bended. Rule: All the players have to guess the alphabets in the word at the same time. Whoever player guesses a correct ...
1
vote
1answer
99 views

How can I read texel data on a separate thread in D3D11?

In D3D10, I load a staging texture onto my GPU memory, then map it in order to access its texel data on the CPU. This is done on a separate thread, not the thread I render with. I just call the device ...
0
votes
1answer
178 views

Websocket server thread per connection

I'm creating an html5 multiplayer game and am looking at how to create a websocket server. I've been looking at various libraries and one thing I noticed is that each one will create a new thread for ...
5
votes
3answers
417 views

DirectX9 thread lock problem with “present” and background loading new textures

Given: Selfmade 3D engine based on DirectX9 written in C++ Task: While render loop runs load additional textures in a background thread Current Implementation: - Create device with ...
4
votes
2answers
284 views

Purpose of Displaying Loading Screen

Is it necessary for a game developer (on Android, game consoles, online, or desktop) to display the loading screen to cover unfinished rendered game environments and prevent users from thinking that ...
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 ...
0
votes
2answers
103 views

How can I access LWJGL's Keyboard from a thread other than the graphics thread?

I'm loving LWJGL, but have been running into a number of odd problems with it. Most of it seems to deal with the fact that OpenGL is a state-machine and was only ever meant to be accessed from a ...
0
votes
0answers
15 views

XNA problem: models processed with different content projects reference the same effect file

I want to add multiple content projects to my XNA Game solution in order to compile them with multiple cores in parallel. The compilation time is a problem for us already and in the future things will ...
9
votes
2answers
325 views

Efficiently separating Read/Compute/Write steps for concurrent processing of entities in Entity/Component systems

Setup I have an entity-component architecture where Entities can have a set of attributes (which are pure data with no behavior) and there exist systems that run the entity logic which act on that ...
6
votes
2answers
316 views

Scalability of multi-threading in game server

What is a reasonable number of threads for a simple 2D mmo in Java? Is it reasonable to have two threads per connection, one for the input stream and one for the output stream? The reason I ask is ...
1
vote
2answers
88 views

StringBuffer behavior in LWJGL

Okay, I've been programming in Java for about ten years, but am entirely new to LWJGL. I have a specific problem whilst attempting to create a text console. I have built a class meant to abstract ...
22
votes
7answers
1k views

Multithreading 2D gravity calculations

I'm building a space exploration game and I've currently started working on gravity ( In C# with XNA). The gravity still needs tweaking, but before I can do that, I need to address some performance ...
0
votes
0answers
56 views

How should I implement multiple threads in a game? [duplicate]

So I recently started learning Java, and having a interest in playing games as well as developing them, naturally I want to create game in Java. I have experience with games in C# and C++ but all of ...
5
votes
4answers
552 views

Creating a voxel world with 3D arrays using threads

I am making a voxel game (a bit like Minecraft) in C++(11), and I've come across an issue with creating a world efficiently. In my program, I have a World class, which holds a 3D array of Region ...
9
votes
2answers
457 views

UDP non blocking or a seperate thread for receiving

I am creating a multiplayer game (for under 64 player). I already decided to have a seperate thread for the network loop, but I was wondering if it would be better to create an extra thread for ...
1
vote
0answers
69 views

Multi Threading - How to split the tasks [duplicate]

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

Multi-Threaded Pipelined Game Engine Data Synchronization Questions

Let's say I'm setting up a worker pool based game engine with pipelining. Let's say I have 4 stages in my pipeline as such: Stage 1: Physics Stage 2: AI/Input Stage 3: Game Logic Stage 4: Rendering ...
2
votes
1answer
501 views

Using an Entity System Architecture with Task Based Parallelism

Background I have been working on creating a multithreaded game engine in my spare time and I currently trying to decide the best way to work an entity sytem into what I have already created. So far, ...
3
votes
1answer
339 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 ...
3
votes
3answers
269 views

do games use multiple threads to play music?

Do games use multiple threads to play music and other operations besides things like server connections and sockets? And is that why when the game freezes (for any reason) the music can sometimes ...
30
votes
6answers
7k 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 ...
1
vote
1answer
149 views

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

WinAPI SwapBuffers and Threads

I'm trying to use a different Thread for the whole WinAPI-Message-Loop stuff, so the window always keeps being responsive. Of course I'm using the main thread as the "window thread", because I need a ...
1
vote
1answer
220 views

How should I invoke a physics engine?

I'm new to writing games. I'm planning to write a 2D battle game which may require an physics engine. Suppose I've written one, but how can I combine it with the main routine of my game? Should I ...
-1
votes
1answer
110 views

Multithreading in lwjgl getting rid of sleep.

I'm trying to use multithreading in my game. However, I can't seem to get rid of the sleep. If I don't it's a blank screen, as there is no time for the computer to actually render the triangleMob as ...
2
votes
1answer
97 views

What's a good way to distribute delayable tasks between frames to avoid lost frames?

I'm having a problem with finding a good way to keep the framerate high and at the same time keep running methods of game world update. I figured I could just put those methods in a thread so they are ...
-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 ...
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 ...
1
vote
0answers
193 views

Separating rendering and logic thread in GLFW? [closed]

I want to separate my rendering thread (the main thread) and my logic thread in my GLFW game. I'm new to the concept of threading inside games. How would this be done? GLFW isn't thread safe so it ...
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
1answer
262 views

Displaying animations during loading screens

Games like Karateka (which uses UDK) seem to be able to asynchronously load GL assets as well as display animation. The splash is incredibly short, then presumably their glView shows up. I can think ...
2
votes
1answer
185 views

MVC with looping view

For our school project we'd like to develop a game using the MVC pattern. We're all moderate new java programmers and absolutely new in game development. With our current view (containing only menu) ...
2
votes
1answer
515 views

Separate renderng thread in Android (OpenGL ES 2.0)

I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0 With canvas I know that surfaceView gives you the ability to start a new thread to ...
2
votes
2answers
474 views

How can I control the frame update rate of a thread?

I'm building a small game for a college project. It's quite a simple game. There are a number of dots on the screen and the player has to select them in a specific order. It's kind of a "join the ...
7
votes
1answer
474 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 ...
5
votes
3answers
264 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 ...
6
votes
2answers
1k 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 ...
2
votes
1answer
285 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 ...
3
votes
2answers
436 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
124 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 ...