Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game state objects should be accessible from other threads (e.g. rendering and control i/o) #14

Open
t3kt opened this issue Dec 5, 2014 · 4 comments

Comments

@t3kt
Copy link
Contributor

t3kt commented Dec 5, 2014

No description provided.

@JimAnkrom
Copy link
Member

@t3kt is this not complete? Seems to me it probably is...?

@t3kt
Copy link
Contributor Author

t3kt commented Dec 26, 2014

this is definitely not done yet. the only multi threaded part is the
control input. I'll try making a message queue so that nothing has to
directly interact with the game objects

On Fri, Dec 26, 2014, 10:28 AM JimAnkrom [email protected] wrote:

@t3kt https://github.com/t3kt is this not complete? Seems to me it
probably is...?


Reply to this email directly or view it on GitHub
#14 (comment).

@t3kt t3kt self-assigned this Dec 26, 2014
@JimAnkrom
Copy link
Member

Ok, cool. Make sure I know how to update player state appropriately (tho I
may be on my own threads fron socket requests).
On Dec 26, 2014 11:24 AM, "tekt" [email protected] wrote:

this is definitely not done yet. the only multi threaded part is the
control input. I'll try making a message queue so that nothing has to
directly interact with the game objects

On Fri, Dec 26, 2014, 10:28 AM JimAnkrom [email protected]
wrote:

@t3kt https://github.com/t3kt is this not complete? Seems to me it
probably is...?


Reply to this email directly or view it on GitHub
#14 (comment).


Reply to this email directly or view it on GitHub
#14 (comment).

@t3kt
Copy link
Contributor Author

t3kt commented Dec 26, 2014

I added a basic message queue class (see core/MessageQueue.h). There's a version of it that wraps around an ofEvent, where you can push messages onto the queue, and then have something in another thread call .sendEvents(), which will pull any event messages out of the queue and trigger them using the standard event mechanism.
See d457be5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants