Paid Code Request: OpenFL socket expertise

First off, I hope I’m not violating any regulations by offering this:

I run a website for children that hosts educational games. I am wanting to create a new game that allows 2 remote players to play against each other. I need a way for both players to see each other’s score in real-time (I’m assuming through a socket.)

I’m offering $100 for some simple (if possible) code that will allow 2 random players to play in real time. I’ll write the game, you’ll write the connection code (server and client side). The only variables that will need to be transmitted are the scores of each player. It should also be noted that dozens of games could be running at once so we may need several connections.

Respond if interested or if you require more details.

Thank you!

2 Likes

Ahoi,
maybe you can use my peote-net tcp framework for this:


There is a simple starter sample: https://github.com/maitag/peote-net/blob/master/testing/simple-test/Source/PeoteTest.hx#L47 where you can write and test server+client code into 1 application (in your case 2 instances of the game-clients that sends the score to each other). Later with a perl-proxyserver on the webhost the net-clients can be connected in the same way like tested locally.
All works stable but the whole prj. (especially the perl-server in the middle) is only in beta-phase because i need more time to harden that stuff against flooding. So no auth or sessionhandling ist build in there (thats on my todo for rest of the year ;).
You can also use the peote-socket lib that the other is based on, but in this case you need to write your own little game-sessionhandling thing that runs on serverside (also much of work to do it in a secure way).
:sun_with_face:

1 Like

I’m very interested in this project, I’m right at home for this as I have already tackled full haxe backend and front end across native and html targets in openfl so I feel I can serve your network need quite well. I have a few questions however is this npm openfl or haxelib? Do you already have a backend that will need to be integrated into your website? And are the scores saved after players disconnect from the server or are they not persistent? Cheers! :grinning:

1 Like

Thanks for your reply. I’ll answer your questions as best I can.

  1. I believe it’s OpenFL, but I believe when I go to compile it access haxelib (I use Flashdevlop IDE).
  2. Even though I do not have a backend ready. I have dozens of links to games I can send you as examples, and get the basic functionality of the new game up and going in a day or two.
  3. Score will not have to be saved once the game is complete.

I only know how to make the games and put them online (RoomRecess.com is my site). I need a way for players to start a game (or automatically join a game that has been started). I need for each of the 2 player’s scores to be seen by the other player (probably stored and incriminated on my server). And finally I need for the socket (or connection) to disconnect upon completion or if one player ends the game early. This is very new territory for me. I’m not looking for anything too complicated, but it definitely exceeds my knowledge.

Thanks Maitag. Unfortunately I have no background in this sort of coding and what you have looks far beyond what I could implement on my own. Thank you for sharing!

I had created this tutorial that was never accepted to the website, though its a work in progress, for instance I dont think I should be sending ascii characters but rather arrays of bits that can be mapped to an instruction. I dont think many people use networking on OpenFL though since it doesnt even have UDP sockets.

1 Like

@meowman9000 tutorial is fantastic and I’d highly recommend it, however it’s only for sys platforms. Game in question needing online functionality would have to be through web sockets. Also @bking20 where should I post the code?

1 Like

I will message you here in a moment.

There’s likely a way to convert to using openfl.net.Socket, which uses sys.net.Socket or web sockets depending on the platform :slight_smile:

1 Like