Multithreading allows multiple threads to exist within the context of a single process sharing same resources but are able to execute independently.
0
votes
2answers
136 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 ...
12
votes
4answers
2k 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
38 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 ...
2
votes
1answer
160 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 ...
1
vote
1answer
269 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
110 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
74 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) ...
1
vote
1answer
109 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 ...
3
votes
0answers
64 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 ...
2
votes
2answers
120 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
341 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 ...
4
votes
3answers
217 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 ...
4
votes
2answers
183 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
197 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 ...
2
votes
2answers
218 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
82 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 ...
0
votes
1answer
119 views
SpriteBatch.end() Issue because of a thread
While playing, I use a thread to Load() and Unload() Texture2D.
I have multiple ContentManager to only Unload() Texture2D I want to unload.
But sometimes, I have this issue on the SpriteBatch.End() : ...
0
votes
1answer
90 views
Can threads be used to run resource consuming methods without -ever- freezing UI?
Until recently I was sure that running expensive operations in threads can prevent UI freezing, but now I'm not.
Is it not guaranteed that a threaded operation will not hog the main thread's ...
1
vote
0answers
110 views
Expensive operations and threading in XNA games
There's this post, it's highest voted answer got me curious about the many ways of threading games.
My game has input update, game logic update, user interface update and expensive operations ...
47
votes
5answers
6k views
How does Dwarf Fortress keep track of so many entities without losing performance?
In Dwarf Fortress you can have hundreds of Dwarves, animals, goblins, etc in game at any one time, each with their own complex AI and pathfinding routines. My question is how does this not produce ...
4
votes
4answers
901 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 ...
1
vote
2answers
157 views
Multiple pipelined game loops
I am considering using the following game engine design pattern, but I am unsure if it's a good idea or not:
Each major task (drawing, physics, logic, networking, disk I/O) will have its own ...
1
vote
3answers
168 views
Multithreading for a mixed-genre game in Python?
So here's the situation. I'm making a game that mixes two genres; arcade shooter and puzzler. They don't intertwine TOO much; all the interaction that really goes on is that every time an enemy is ...
2
votes
1answer
371 views
Code structure in Android 2D game
Well I've finnaly decided to start Android game dev, and my first project will be simple 2d canvas based game.
I have some experience in game developing with C# and XNA, and I'm a bit confused now.
...
4
votes
1answer
215 views
How do I use threads together with DirectX11?
I have only found the documents on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476884(v=vs.85).aspx Although it doesn't say anything about creating them, it mentions that device is ...
4
votes
1answer
254 views
Splitting logic into threads in Java tower defence game
I'm making a tower defence game in Java!
It's my first game development.
I want to know how many threads Do I need to create in a game, to split logic..
I've made this one:
Main App thread (adds ...
0
votes
1answer
67 views
Efficiency concerning thread granularity
Lately, I've been thinking of ways to use multithreading to improve the speed of different parts of a game engine. What confuses me is the appropriate granularity of threads, especially when dealing ...
5
votes
1answer
188 views
Should I amortize scripting cost via bytecode analysis or multithreading?
I'm working on a game sort of thing where users can write arbitrary code for individual agents, and I'm trying to decide the best way to divide up computation time.
The simplest option would be to ...
0
votes
3answers
153 views
Threads slowing down application and not working properly
I'm making a software renderer which does per-polygon rasterization using a floating point digital differential analyzer algorithm. My idea was to create two threads for rasterization and have them ...
0
votes
1answer
194 views
Separate update and render
I'm programming a simple Snake in Java. I'm a complete newbie when it comes to Java and Game Developing, so please bear with me ;)
Until now, I have been using a UI thread, as well as a ...
4
votes
2answers
592 views
How to create a thread in XNA for pathfinding?
I am trying to create a separate thread for my enemy's A* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this ...
5
votes
1answer
181 views
Does using [STAThread] with XNA have any negative implications?
I'm working on a game in XNA, which has an inbuilt level editor. To facilitate this I want use the FileOpenDialog from Winforms. I followed the instructions as per this answer. This involves setting ...
2
votes
1answer
174 views
Does concurrency inherently introduce “randomness” into a game?
When a game is implemented with concurrency (as most games are), does this necessarily, by its very nature, introduce an element of randomness into the game that is outside of the players' control?
...
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 ...
2
votes
4answers
367 views
Do games use threads?
I 'understand' that the concept of how a game runs i.e
while (game_loop = true)
{
//handle events
// input/output/sound etc
}
But it has come to my attention while programming in another ...
1
vote
5answers
690 views
multi-thread in mmorpg server
For MMORPG, there is a tick function to update every object's state in a map. The function was triggered by a timer in fixed interval. So each map's update can be dispatch to different thread. At ...
7
votes
2answers
1k 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 ...
2
votes
4answers
1k views
How to separate my rendering from game loop?
If I have a (complex) operation that takes a long time for it to finish, for instance, a couple of seconds, my frame rate drops far below the acceptable. How could I still implement it while it is not ...
3
votes
2answers
305 views
Is it safe to run multiple XNA ContentManager instances on multiple threads?
My XNA project currently uses one ContentManager instance, and one dedicated background thread for loading all content.
I wonder, would it be safe to have multiple ContentManager instances, each in ...
1
vote
2answers
247 views
Multi-threaded JOGL Problem
I'm writing a simple OpenGL application in Java that implements the Monte Carlo method for estimating the value of PI. The method is pretty easy. Simply, you draw a circle inside a unit square and ...
0
votes
0answers
181 views
Game engine development in C++ [closed]
I am arriving at completion on a multithreaded concurrency framework designed for high-performance computing. Though I am not a gamer, it has occurred to me that this stand-alone software core could ...
2
votes
3answers
209 views
Multithreaded game fails on SwapBuffers in render thread at exit
The render loop and windows message loop run on separate threads. The way the program exits is that after PostQuitMessage is called in WM_DESTROY the message loop thread signals the render loop thread ...
1
vote
2answers
113 views
Threading iPhone
Say I have a group of large meshes that I have to intersect rays against. Assume also, for whatever reason, I cannot further simplify/reduce poly check count by spatial subdivisioning. I can do this ...
0
votes
0answers
54 views
XNA Xbox, utilizing multiple cores [duplicate]
Possible Duplicate:
XNA: How does threading work?
It's my understanding that the Xbox has 3 cores that are available to use. I'm hoping to offload AI to another core, and possibly use ...
1
vote
1answer
139 views
Thread.SetProcessorAffinity() equivalent for Windows?
I want to be able to use multiple cores in my XNA game, but it seems that Thread.SetProcessorAffinity() is only usable on xbox. That being said, is there any way to run a small chunk of my code on ...
2
votes
5answers
1k views
Xna Loading Screens
I'm making a 2D XNA game. I'd like to implement loading screens when stuff has to load for a while. Like when I login to an account, connect to the server, and generate worlds. I'm pretty sure it ...
2
votes
3answers
375 views
Should I dedicate a single thread to each player in a split-screen game?
I was thinking about making multiplayer version of a game I am making with SDL and OpenGL. It would be a split-screen game.
Do you think it would be a good idea to have each part of the screen (game ...
2
votes
1answer
244 views
Parallelizing creation of geometry chunks in minecraft-like game
In my game I separate creation of chunks into two stages. The first is where I generate the heightmap using simplex noise and the 2nd is when I create the actual vertex buffers. I do it like this so ...
0
votes
1answer
147 views
Saving big maps
When the map is relatively small, it takes a few milliseconds to save it, so it's generally ok. But with other, much much bigger maps, it could take several seconds, which is both annoying and hangs ...
0
votes
0answers
76 views
BlockingCollection having issues with byte arrays
I am having an issue where an object with a byte[20] is being passed into a BlockingCollection on one thread and another thread returning the object with a byte[0] using BlockingCollection.Take(). I ...