Skip to content
/ mphx Public

A little library to let you make multiplayer games easily with Haxe. No longer maintained and better options are available.

License

Notifications You must be signed in to change notification settings

5Mixer/mphx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mphx is in alpha and has rough edges. It has not been updated or developed in some time - you might like to evaluate other haxe networking libraries that are under active maintenece.

#mphx

mphx is a new library made with Haxe to allow for easy creation of multiplayer games. It was based off HxNet, whose code is authored by Matt Tuttle. The code is of a very different structure now. mphx is still 'alpha' and things might break.

Wiki


mphx allows for creation of both servers and clients, which connect to each other, sending messages. For the client, it works both natively with TCP sockets and in the browser via websockets.

There are examples in the examples folder, for different libraries. (Basic has no external libraries.)

This library is not be dependent on any graphical library (eg. Haxeflixel, OpenFL etc).

Please raise issues if you find issues, however also check other issues to see if they can help. Thanks!


Supported Targets

Client

  • Native targets (C++)
  • Web (JS with websockets)
  • Neko
  • Flash (Not maintained, but likely functional. Policy File hosting inbuilt.)
  • Mobile (May work, never tested)

Server

  • Native targets (C++)
  • Neko
  • Node JS

Alternatives.

mphx is one of a few Haxe network libraries. That said, these libraries do networking a bit different from me, in a way you might prefer.

  • HxBit. By the creator of haxe. Uses macros for field syncronisation. Likely more suitable for large projects than mphx.
  • HxNet. Hasn't been updated for awhile. Was the base for mphx.
  • Extention-networking. OpenFL specific networking. Hasn't been updated for awhile.
  • OSIS. ECS library with optional network syncronisation.
  • heaps has built in networking code, if you're already using Heaps.

Warnings

  • mphx is not compatible with haxe version 3.3.0 as a core part of networking code is broken in haxe 3.3.0. Versions before/after should be corrected.
  • Performance is lower priority than usability. Ultimately, if you want superfast networking, you should look into UDP and solutions closer to the metal.
  • If client.connect is called before error handlers (client.onConnectionError = function()) are setup, the error functions won't throw.

Features:

  • Documentation and examples. (Work in progress)
  • Cross platform, with no changes required.
  • Automatic or manual management of 'rooms'.
  • Event based multiplayer.
  • Abstracted server and client.
  • Ability to share code between server and client.
  • No macro magic, easy to understand.

Pong: -

About

A little library to let you make multiplayer games easily with Haxe. No longer maintained and better options are available.

Topics

Resources

License

Stars

Watchers

Forks