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
1answer
62 views

Can you use a standard multi-thread if only reading unity objects?

First of all I know about coroutines and how to use them (they're awesome). A friend of mine was telling me about the way the he implemented his saving system in a game he was working on, after ...
1
vote
1answer
47 views

computationally Intensive routine, ThreadPool or new Thread?

I had to write a computationally expensive routine that runs in 20-30ms. This routine cannot run in the main thread since it would kill the frame rate. The routine runs on demand, when some data ...
5
votes
1answer
140 views

How to not freeze the main thread in Unity?

I have a level generation algorithm that is computationally heavy. As such, calling it always results in the game screen freezing. How can I place the function on a second thread while the game still ...
2
votes
0answers
53 views

Putting each animation on a thread

I'm trying to make my game as friendly to multi-core as possible. as such, i'm putting each animation on a new thread. I was hoping someone could check out my proof of concept code in java; an ...
4
votes
2answers
45 views

Threading/Streaming files while rendering the scene

I am writing a game engine and am trying to wrap my head around data streaming while rendering. What I mean by this is being able to load resources (however slow it may be) while rendering and not ...
2
votes
2answers
236 views

RTS combat system

I am developing a small-scale TB/RT Strategy hybrid, not unlike the Total War series. It's in the classic medieval setting, with only melee infantry combat currently implemented for testing. Units are ...
1
vote
2answers
78 views

Async loading in libGDX to set the screen

I would like to bring up a loading screen, for this would make the load async. How can I do this? I looked on the libGDX website but I do not understand very well, maybe because of my poor English. ...
4
votes
1answer
183 views

Unity3D multi-threaded data importer?

Goal I would like to be able to separate all my data file readers from the main thread and balance the load over multiple frames. The idea being that while the data is being read/parsed/filtered I ...
3
votes
1answer
124 views

How can I exploit multithreading in collision resolution?

I'm trying to speed up my collision resolution by using multiple threads. I'v read through Box2D's source code and while it was challenging and educating, it didn't really point me to how I could use ...
2
votes
2answers
91 views

If IDXGISwapChain::Present blocks, does that mean I'm GPU bound?

I updated my DirectX11 renderer to render on multiple threads using deferred contexts. Before my change, the Present method took a negligible amount of time (according to VTune analysis). After my ...
1
vote
1answer
133 views

Resource streaming with job threading system

I am currently researching resource streaming for my current game engine. To add a bit of context, I am doing a contiguous world for a Baulder's Gate style CRPG. So while the camera is usually looking ...
2
votes
1answer
79 views

UDP server and two clients

So - my whole knowledge comes from google and stackoverflow. I'm trying to create an UDP server (with two slots per new instance of the game) and clients. My problem is here that I totally don't know ...
23
votes
4answers
6k views

Is it normal for a game to use 100% CPU?

I just implemented multi-threaded input handling in my game engine where the code that polls the OS to gather input from it and time stamps them is in a separate thread and each frame in the main ...
1
vote
0answers
69 views

What LuaJit threading archietecture should I use?

I am in the process of designing my own Game Engine for use in a real time CRPG - think Baulder's Gate. I know most of my specifications right now, and I am currently in a planning phase. I chose Lua ...
4
votes
1answer
113 views

Is locking required to implement a seperate rendering thread?

I kept reading a lot about this, but still not sure about a proper way to implement an independent render thread (variable timestep) running parallel to a physics thread (smaller, fixed timestep). ...
0
votes
1answer
61 views

Delay between bullets java - new Thread

Let's say that I have a cannon on the bottom of the screen that shoots balls to the click direction. I also have some collisions algorithms and here comes the problem. I am trying to implement an ...
6
votes
1answer
575 views

Multithreaded Game Loop

I'm trying to implement a multithreaded game loop. I already did that but had to use a few locks for that, which ruined the performance. After researching a bit I came up with this idea: Instead of ...
2
votes
2answers
144 views

Instantiation of a GameObject not working for a threading reason

I receive the following error "INTERNAL_CALL_Internal_InstantiateSingle can only be called from the main thread." "Constructors and field initializers will be executed from the loading ...
0
votes
0answers
74 views

OpenGL, Multithreaded loading/streaming of data

I've thought about how i could implement loading of data in a second thread for two reasons, first, so i can show a nice loading-screen with progressbar and second, for openworld streaming. I came up ...
1
vote
4answers
99 views

OpenGL calls from a different thread?

I understand OpenGL is not thread-safe, but at the same time, Google seems to be giving me mixed responses. I have a LibGDX game that functions normally, UI/rendering/logic on the same thread, ...
1
vote
1answer
45 views

Multithreading in Gamedevelopment, specifically Networking

Let me quick explain my actual setup: I use 2 Threads, one for networking and one for the main-loop (input, update, render). I have two synchronized queues, one for mainthread->networking and one for ...
0
votes
0answers
192 views

AttachThreadInput and PeekMessage Threading

I have a problem with AttachThreadInput and PeekMessage from User32.dll while multithreading. PeekMessage is not returning true in any case. I am designing a Windows Form that uses OpenGL rendering ...
-2
votes
2answers
248 views

Multithreaded or Thread pooled server for real time multiplayer games? [closed]

So if the Thread pool handles 10 players out of 100 per second, this could make a delay that will be no good for real-time games, so as I see it that MultiThreaded will be better, thus it will handle ...
0
votes
0answers
69 views

Texture Editing with Multhi-Threading

So I have this giant Texture2D(4096 * 4096, don't ask why) and all its data stored in an array of Colors. When I hit left MouseButton I create a blue 64 by 64 square at the cursors position using the ...
0
votes
1answer
147 views

Task vs Thread with execution queue [closed]

My game server will have to respond to requests very often, so I consider threading a good option. But should I use Task class from .NET or have several threads that would execute requests which I ...
0
votes
1answer
97 views

XNA Starting a parallel Thread during a draw loop is slower than doing the same task in the main thread in update loop

I'm using XNA and all of my drawing is done in the main thread. I am CPU-bound and I thought I could gain performance by moving some non-update logic (like animation update) from the update loop into ...
0
votes
1answer
418 views

Unity - Proper use of threads with procedural generation

I have been working on a simple chunk based terrain generation system, with voxel octrees. The overall method works pretty well, but testing this system with large amounts of chunks completely freezes ...
2
votes
4answers
412 views

Is it a good idea to make most actions in a game driven by simple tiny threads (in Java)? [duplicate]

I'm thinking of for example making the jump action of a character, that takes ~1s, a distinct runnable, so then other threads can read its state, with additional control over the action itself by the ...
2
votes
1answer
338 views

What are the implications of using multiple OpenGL Contexts on a single thread?

I'm trying to integrate two third-party OpenGL rendering pipelines into the same application, namely Cinder's OpenGL API for 3D drawing and backbuffer rendering, and Google Skia's API for 2D drawing. ...
0
votes
0answers
292 views

Android: Asynctask causes ANR (very) intermittently

I'm doing some work on an AsyncTask (creating game objects, loading resources etc) while displaying a static splashscreen. The problem is that every now and then, the AsyncTask doesn't run and the ...
1
vote
1answer
135 views

Synchronization with game tick

I'm working on a multiplayer game and it's currently set up like this. It accepts packets from the client on the fly and does whatever processing it needs to. There is also a main game tick which is ...
1
vote
3answers
90 views

c - Starting an user defined function after the current one ends

The game I am creating displays a menu before starting, the user may select to start the game, or do some stuff. When the user selects an option, I need to call another function which actually does ...
0
votes
1answer
244 views

DX11 Reusing Command Lists

My team is working on an engine implementation and we are trying to add multithreaded scene traversal for updating and rendering our components... The question has come up as to whether or not we can ...
0
votes
0answers
281 views

Android game programming seperate game logic thread from drawing thread

Ok so I want to know what is a proper way to create a multi threaded game. What I have tried is implement a wait and notify between the game logic thread and the drawing thread, but I believe this is ...
-2
votes
1answer
7k views

Games able to use 4+ core CPUs properly [closed]

Are there any games that can really benefit from use of quad core CPU instead of two-core one like Intel Core i3 4340 vs Intel Core i5 4590 Basically they are quite similar in terms of ...
5
votes
2answers
3k views

Update and render in separate threads

I'm creating a simple 2D game engine and I want to update and render the sprites in different threads, to learn how it is done. I need to synchronise the update thread and the render one. ...
0
votes
1answer
419 views

Nullpointerexception when loading resources in openGL ES 2.0 Android project

Overview My splash screen starts by display a 'loading' dialogue and then kicks off an asyncTask (The loading dialogue is derived from the standard Android View class) Within the doInBackground ...
1
vote
1answer
237 views

Multithreading issues - Frame skips [closed]

So I am trying to multithread a Voxel engine in C# made with Sharpdx and I am having a few issues: This is the class I have : #region using System.Collections.Concurrent; using ...
3
votes
1answer
132 views

Is there a common way to execute a task at a certain pace, without relying on the task priority feature of the OS?

There is no cross platform way to set process priorities, and I don't want to use threads since there are no standard method of setting priority to certain threads, apart from the fact that threads ...
0
votes
1answer
178 views

Separate parts of a game engine [closed]

I'm pretty new in developing videogames. By now I only used SDL with C/C++ to create games. I'm currently learning OpenGL and I realized that to be fluid and easy to maintain the code must be ...
6
votes
2answers
770 views

How to use OpenGL functions from multiples thread?

I'm writing a small game using OpenGL. I'm implementing basic networking in this game and I'm facing a problem. I have a thread in my client socket class that check for available data, when there ...
0
votes
1answer
61 views

How to handle runtime exceptions that occur on a loading process delegated to newly spawned thread

I am looking to multi-thread the resource allocation routines (i.e world loading) in my game so that they can occur in the background whilst rendering a loading screen etc... The problem is, I used to ...
2
votes
1answer
233 views

Get the game state using Multithreading in Java Monkey Engine 3

I’ve been trying out Java Monkey’s multi threading recently via the wiki’s tutorial. Since I just wanted to test a prototype clinet, I made a program which creates some cubes using the ‘Cubes’ library ...
1
vote
3answers
883 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 ...
3
votes
4answers
1k 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? ...
5
votes
1answer
643 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
435 views

Android and OpenGL, single thread vs double thread [closed]

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 ...
1
vote
1answer
292 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 ...
1
vote
2answers
784 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 ...
2
votes
1answer
337 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 ...