Note: This library is not being updated anymore. I recommend looking for newer, more updated libraries instead.
Networking can be hard and time-consuming, especially for beginners. ZNet is a lightweight, cross-platform, networking framework for making multiplayer games a lot easier to create!
The main focus when developing ZNet was to make an easy to use entity system. With this system you can easily create NPCs, enemies, etc... without writing a lot of extra code.
Here's an example of how you would go about creating a simple enemy: znet_entity_create("enemy_type", "enemy_id", "x", 0, "y", 0, "hp", 100). You simply specify the entity type and the entity id, followed by a set of defined keys.
With ZNet you can easily get the state of a client/server, making error handling a lot simpler!
ZNet works on every platform, except for HTML5.
ZNet also handles a lot of things such as:
* Checking if the client is still connected to the server. * Better way of checking if the server if full. * Version checking. * Using both a client and a server in the same room. * Getting the ping of a client. * And more!
Fixed a bug with the platformer example.