carlescliment / php-mud-server
Mud server written in PHP
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Puppet
Requires (Dev)
- phpspec/phpspec: dev-master
This package is not auto-updated.
Last update: 2024-11-09 16:58:34 UTC
README
Brainstorm:
- When a new connection is received, it dispatches a NEW_PLAYER_EVENT
- A player is a class that contains a CommunicationBridge.
- The CommunicationBridge contains the socket itself, and is able to send messages to the player.
- When a message is received, it dispatches an INCOMING_PLAYER_MESSAGE_EVENT.
- The app converts the message into a command and pushes it into a command stack.
- There is a thread, it is the clock, and dispatches a NEW_TURN_EVENT every second.
- When a NEW_TURN_EVENT is received, the app will collect all the commands in the stack, makes whatever it needs to, and sends the proper messages to the player.