Multithreading allows multiple threads to exist within the context of a single process sharing same resources but are able to execute independently.
1
vote
2answers
53 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 ...
0
votes
1answer
28 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 ...
1
vote
0answers
39 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 ...
1
vote
0answers
29 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
87 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
46 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
478 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
82 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
43 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
73 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
40 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
107 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
121 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
63 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
109 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
63 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
239 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
409 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
209 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
225 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
110 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
87 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
183 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
239 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
6k 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
365 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
222 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
122 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
165 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 ...
5
votes
2answers
492 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
221 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
684 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
977 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
525 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
381 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
266 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
689 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
317 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
159 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
423 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
2answers
2k 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 ...
0
votes
1answer
839 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 ...
3
votes
2answers
399 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 ...
0
votes
3answers
429 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 ...
1
vote
2answers
202 views
Application of classes with critical non-static fields in LWJGL [closed]
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 ...
6
votes
2answers
767 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 ...
23
votes
7answers
2k 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 ...
1
vote
2answers
134 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 ...