Jump to content

[1.11.2] Maintaining a state machine between clients on integrated server


aetherean

Recommended Posts

Hi,

 

I'd like to implement a very simple state machine for two clients connected to an integrated server. Keypresses on one client should update some boolean values that would affect the capabilities of the other client until that client responds with some keypresses of their own, and the state transitions based on these booleans would ideally be implemented by some independent state machine. However, I'm not understanding how/where to construct the state machine that would maintain these boolean values without the each client just constructing their own and never seeing updates from the other player. (Rather, it's not clear to me where in the initialization routine integrated-server-only code runs -- not considering using a dedicated server at the moment.) What would be the easiest way to go about implementing this?

 

Thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.