HaxeNet

Posted on March 30, 2014

HaxeFlixel is in many aspects a better game engine than the original Flixel. There’s no doubt about it. Its best aspect, in my opinion, is the Haxe language itself. It compiles to a bunch of targets, has many advanced language features, and has external c/c++ support. Yeah.

The one thing it doesn’t have is straight-forward sockets. I’m sorry, but the socket documentation left me confused. That’s why I decided to just write a wrapper around ENet. ENet is all that a game needs in terms of communication, and now it’s coming to Haxe land!

https://github.com/Ohmnivore/HaxeNet

 

Here are some links that explain how to get started with external C/C++ in Haxe. It often took me a couple of readings before noticing the important parts, they’re a bit heavy and still leave you guessing if you haven’t done any C/C++ before, like me. Just read them reeeaaaaal carefully.

https://nekovm.org/doc/ffi

http://old.haxe.org/doc/cpp/ffi

http://old.haxe.org/doc/advanced/haxewithexteralc

https://stackoverflow.com/questions/10417589/neko-dlls-in-haxe-c-target

http://www.joshuagranick.com/blog/2012/03/20/how-to-create-an-nme-extension