|
Platform Data Engine 0.0.1
A data-driven game engine for platformers
|
Public Member Functions | |
| Server () | |
| Constructor | |
| void | start () |
| Starts the server More... | |
| void | stop () |
| Stops the server (currently does nothing) More... | |
| void | process (GameWorld *world) |
| Process: sends data to the clients, this should be called on a fixed interval More... | |
| void | recieve (GameWorld *world) |
| Checks for new data from the clients More... | |
| void | broadcastObjectHealth (const std::string &objName, float health) |
| Broadcasts health updates, makes sure it's not being sent too frequently More... | |
| std::shared_ptr< Connection > | findConnection (sf::IpAddress ip, std::string id) |
| Finds a connection by ip and id More... | |
| void | addInputManager (std::shared_ptr< Connection > ip, std::shared_ptr< InputManager > input) |
Public Member Functions inherited from PlatformDataEngine::NetworkHandler | |
| const std::string & | getId () |
| void | setId (const std::string &name) |
| virtual void | start ()=0 |
| virtual void | stop ()=0 |
| virtual void | process (GameWorld *world)=0 |
| Process is responsible for sending packets, limited in rate More... | |
| virtual void | recieve (GameWorld *world)=0 |
| Recieve checks for new packets, not limited in rate More... | |
| std::shared_ptr< Connection > | getConnection () |
| Gets the current process connection More... | |
| void | setConnection (std::shared_ptr< Connection > conn) |
| Sets the current process connection More... | |
Additional Inherited Members | |
Protected Attributes inherited from PlatformDataEngine::NetworkHandler | |
| std::shared_ptr< Connection > | m_clientConnection |
| void Server::broadcastObjectHealth | ( | const std::string & | objName, |
| float | health | ||
| ) |
Broadcasts health updates, makes sure it's not being sent too frequently
| objName | the object id |
| health | the new health |
| std::shared_ptr< Connection > Server::findConnection | ( | sf::IpAddress | ip, |
| std::string | id | ||
| ) |
Finds a connection by ip and id
| ip | the ip of the connection |
| id | the id of the connection |
|
virtual |
Process: sends data to the clients, this should be called on a fixed interval
| world | The game world |
Implements PlatformDataEngine::NetworkHandler.
|
virtual |
Checks for new data from the clients
| world | The game world |
Implements PlatformDataEngine::NetworkHandler.
|
virtual |
Starts the server
Implements PlatformDataEngine::NetworkHandler.
|
virtual |
Stops the server (currently does nothing)
Implements PlatformDataEngine::NetworkHandler.