Coder Social home page Coder Social logo

mphx's Introduction

mphx is alpha and has rough edges, but they're being refined.

#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. But give it a try, it will only make the library better. Feel free to contribute or create issues, even if your changes seem small!

Wiki


mphx allows for creation of both servers and clients, which connect to each other, sending messages. For the client, it works both natively and in the browser, with websockets, without you having to change a thing.

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, Open FL or Luxe). If you want to, you can make a text based multiplayer game that runs in the terminal!

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

Join the chat at https://gitter.im/5Mixer/mphx


Supported Targets

Client

  • Native targets (C++)
  • Web (JS with websockets)
  • Neko
  • Flash (In progress - See issues.)
  • Mobile (Should work, however never tested)

Server

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

Alternatives.

mphx isn't the only library of it's kind in the haxe ecosystem. I'm pretty slow to make changes, sometimes I forget what I was doing, etc etc. If I've said I'll do something and it's still not in, just remind me, I probably forgot it. That said, these libraries do networking a bit different from me, in a way you might prefer.

  • HxNet. Hasn't been updated for a while, but was the base for this project.
  • HxBit. A very very new project by the creator of haxe that uses macros.
  • Extention-networking. Seems to function in a similar manner to mphx, however seems somewhat(?) tied to OpenFL.
  • ECS Networking. Seems to focus on networking with components/entities in mind.
  • Libraries such as heaps and kha have built in networking code.

Warnings

  • mphx is currently 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, however, due to the nature of versioning, haxe 3.3.0 will always be broken.
  • performance tests have not really been evaluated, and some issues with lag still exist. This will be part of the refining mphx is slowly working though.
  • be aware of code flow. If client.connect is called before error handlers (client.onConnectionError = function()) are setup, the error functions won't throw.

Features (planned or avaliable):

  • Documentation (Work in progress)
  • Cross platform, with no changes required.
  • Automatic or manual management of 'rooms'.
  • Event based multiplayer.
  • Highly abstracted server and client, without bloating or taking away control.
  • Easy creation of 'packets' or data objects.
  • Ability to share code between server and client.

-

mphx's People

Contributors

5mixer avatar yannsucc avatar anissen avatar breakfasttt avatar gama11 avatar bryant1410 avatar gitter-badger avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.