Closed YellowAfterlife closed 5 years ago
Much thanks! Has this been tested and verified as working (and/or at least compiling and not crashing) on Mac, Windows, and Linux?
Only tested on Windows, but based on prior experience it is incredibly unlikely for something to not work on other systems if there's no platform-specific code (so long as the correct API version is used).
The following the can be used to easily validate that networking API is linked correctly (sending a packet to self):
var id = Steam.getSteamID();
var buf = Bytes.ofString("hello");
trace("Send: " + Steam.networking.sendPacket(id, buf, buf.length, RELIABLE));
Lib.current.addEventListener(Event.ENTER_FRAME, function(_) {
while (Steam.networking.receivePacket()) {
var src = Steam.networking.getPacketSender();
var str = Steam.networking.getPacketData().toString();
trace(src + ": " + str);
}
});
Cool, I'll review this and merge it in soon. Thanks for this contribution!
(I should really get some continuous integration set up for this library. )
I'm early_melon the guy testing the implementation of the network, matchmaking API made by YellowAfterlife. Everything works fine with it, I have one issue when monitoring performance with hxscout, SteamWrap makes the game crash at launch. I don't know if it's from this forked version or the main branch of steamwrap though.
Better late than never?
Thanks a lot ! Is the issue with the crash when using hxscout being fixed too ?
This covers the commonly used functions, much in parallels with my native extension for GameMaker.
Also added a few helper functions, although C++ side for non-prime functions still could look better.
Is being tested by early_melon and seems to be working accordingly.