Saturday, October 8, 2011

Movement synchronization works

I got it! Multiple clients can log in, each one controls a map object with mouse clicks and the movements are shown on the other clients screens in real-time.

But before  I can start to program real gameplay I have to do some server infrastructure first. The character objects currently exist in limbo and are only connected to each other via the movement manager class. I want to have a MapInstance class which manages all objects on it. Every map instance should have its own MovementManager and MessageDispatcher for messages which only concern objects on the same map.

I also have to implement a stateful connection sequence (connected, requesting account, logged into account, requesting character, playing on map). To isolate what a character can and can't do in each state (example: it shouldn't be able to choose a character when it isn't logged in yet) I could connect it to a different, specialized MessageDispatcher in each state.

No comments:

Post a Comment