Faucet Networking
#181
Posted 31 July 2012 - 09:11 PM
The only complaint that I find really valid is the return codes and even those are just -1 for errors. You can use socklasterror() to get the last WSA errror and those are well documented HERE
I will be open-sourcing the the network socket server soon (Im just adding a few last features and Ill be done...) In the meantime, you can get the Linux and Android port of 39dll HERE (I did the heavy lifting and ported it. It works as best as I can tell. Please let me know)
#182
Posted 01 August 2012 - 03:14 AM
If I choose host I get this error - which makes sense because there's no connection yet:
If I choose join I can enter the local ip and "connect" (it's not actually connecting to anything). Paddle does not move to match mouse x location.
I think the issue is something to do with the opponentSocket and how it is being set in this part of the End Step code, but I'm really not sure:
Any help would be appreciated. Thanks!
#183
Posted 01 August 2012 - 06:22 AM
I'd be interested to see how much GML you need to reliably send bytes over a TCP connection. One of my main problems with 39dll is how complicated it is to do that, as I described here. Also, please link to your own thread so that your extension/dll can be discussed there instead of in this one.After a quick overview, I notice that this is a simple wrapper for the boost::asio libs. Also, I read your complaints about 39dll. These are mostly due to the limitations of GM and GML. I have written a proper wrapper for 39dll in c# (with a Linux and MACOS port included run on Mono).
The only complaint that I find really valid is the return codes and even those are just -1 for errors. You can use socklasterror() to get the last WSA errror and those are well documented HERE
I will be open-sourcing the the network socket server soon (Im just adding a few last features and Ill be done...) In the meantime, you can get the Linux and Android port of 39dll HERE (I did the heavy lifting and ported it. It works as best as I can tell. Please let me know)
#184
Posted 01 August 2012 - 06:33 AM
Sorry, I don't have GM Studio myself. It would be interesting to know what causes the errors you describe, but from the error message I think it might be related to using LeftPaddle.y (i.e. using the object id to access a variable of the only instance). I don't know why that would suddenly be a problem in Studio, but it is my best guess.Does anyone have a copy of the pong example that works with Studio?
Please let me know when you find out what the problem is (and also, please tell me about the "menu issue") so everyone can benefit from the fix.
#185
Posted 01 August 2012 - 09:23 AM
Please let me know when you find out what the problem is (and also, please tell me about the "menu issue") so everyone can benefit from the fix.
Ah, sorry. The "menu issue" is simply that show_message_ext is obsolete in Studio so you basically have to create the host and connect buttons in another way. Thanks for the tips on the other issue. I'm going to keep hammering at it - I only wish I was more familiar with GMS and networking in general. =) I'll update you if I figure anything out about the other issue.
#186
Posted 02 August 2012 - 03:41 AM
I'd be interested to see how much GML you need to reliably send bytes over a TCP connection. One of my main problems with 39dll is how complicated it is to do that, as I described here. Also, please link to your own thread so that your extension/dll can be discussed there instead of in this one.
After a quick overview, I notice that this is a simple wrapper for the boost::asio libs. Also, I read your complaints about 39dll. These are mostly due to the limitations of GM and GML. I have written a proper wrapper for 39dll in c# (with a Linux and MACOS port included run on Mono).
The only complaint that I find really valid is the return codes and even those are just -1 for errors. You can use socklasterror() to get the last WSA errror and those are well documented HERE
I will be open-sourcing the the network socket server soon (Im just adding a few last features and Ill be done...) In the meantime, you can get the Linux and Android port of 39dll HERE (I did the heavy lifting and ported it. It works as best as I can tell. Please let me know)
I never said that sending multiple bytes with GML was easy, but GM was never truly designed for multiplayer. And under the covers, Boos::Asio uses winsock/GNU sockets. Networking code at this level is never pretty. Sure you can abstract it somewhat, but you still have to handle a lot of boilerplate...
#187
Posted 04 August 2012 - 01:28 PM
#188
Posted 04 August 2012 - 01:55 PM
I do not have GM Studio (of any variety), so unfortunately I can't really tell you. MonkD ran into trouble with the examples in Studio a few days ago (not sure which Studio), but it's not clear yet whether that is due to problems in the examples or because the extension does not work properly.Faucet works with Studio-html or Studio-win?
#189
Posted 04 August 2012 - 06:15 PM
Easy, The extension made with Extension Maker won't work on Studios, Since they changed something and now the extension needs to be created in studios with its Extension creator.I do not have GM Studio (of any variety), so unfortunately I can't really tell you. MonkD ran into trouble with the examples in Studio a few days ago (not sure which Studio), but it's not clear yet whether that is due to problems in the examples or because the extension does not work properly.
Faucet works with Studio-html or Studio-win?
PS: At least that's what i think, another option is that Studios broke your dll (in other words can't read/execute it), in other words it won't work on studios unless you change part of your code.
PS 2: I know this because to Luke it already happen with some dll's Like WinAPI 2 and I tried to import a extension i made with extension maker.
#190
Posted 07 August 2012 - 04:38 AM
#191
Posted 07 August 2012 - 05:34 AM
Debels: How does one go about creating the extension? Do we need the original source files or is this something that can be done with only the old extension? Sorry, I'm not even sure where to start figuring out if this is the solution. =)
I think you need the source code, not really sure, but you can start playing with it in GM:Studios to see if you can make it work.
#192
Posted 16 August 2012 - 08:44 AM
However, function at the library limits the ability of the buffer should not be a reason.
In my opinion, this library do not have the extensibility of the buffer.
At the least, you should support the MD5 or SHA hash.
#193
Posted 16 August 2012 - 11:09 AM
I had looked into ways of passing data buffers from one extension to another, so md5/zip/other functionality could be separate extensions, but all that came of that was much talk and discussion. That idea might be picked up again, but until then I agree that at least some extra functions could be added. Of course I can't include everything that anyone might need, but a few things like digest functions would probably be useful. I can't promise you when I'll get around to adding them, though.Obviously, this is the network library.
However, function at the library limits the ability of the buffer should not be a reason.
In my opinion, this library do not have the extensibility of the buffer.
At the least, you should support the MD5 or SHA hash.
#194
Posted 01 September 2012 - 12:17 AM
But, HTTP DLL does not produce an error.
Different buffer structure?
Ps. Can I get dll files or lib files?
Edited by wnsrn3436, 01 September 2012 - 01:17 AM.
#195
Posted 01 September 2012 - 08:47 AM
The problem is expected (see the help file). The file functions were just a quick addition to cover the most common case of reading/writing a small file as a whole, so what you are trying to do is unfortunately not supported yet.Read large files from append_file_to_buffer () function, the error appears. (500MB+)
But, HTTP DLL does not produce an error.
Different buffer structure?
Ps. Can I get dll files or lib files?
I might finally get some time to work on this again, so if it's important for your game I would be able to look into a solution.
As for a .dll or lib, I can compile that, but unfortunately I didn't put all the functions into a header file yet...
#196
Posted 06 September 2012 - 11:57 PM
PS: I have not done extensive testing.
Edit: I remade the extension in extension maker with all of the external names added and it appears to work in Studio as well, and if I get medo's permission I will put it up for download
Edited by legobear154, 07 September 2012 - 12:14 AM.
#197
Posted 07 September 2012 - 08:45 AM
Hi Legobear, Thank you for figuring out the problem! You don't really need to ask my permission for putting up your version, it's an open source project (even though I'm the only contributor so far) - just read the license. However, if the fix is that simple I'll just add it to my version right now.To anyone having troubles with Faucet Networking in GM Studio. I think I have a solution, I got the pong example working on localhost with GM Studio Free. Add an external name to all of the functions. The external names, as far as I know, are the same as the names of the functions themselves. I did that and It has solved all my problems. I am not able to export the modified extension because of me using the free version of GM Studio, but maybe someone will be able to. I hope this helps anyone that is having issues!
PS: I have not done extensive testing.
Edit: I remade the extension in extension maker with all of the external names added and it appears to work in Studio as well, and if I get medo's permission I will put it up for download
Edit: Make that "later today", I'm updating my C++ development toolchain. Might as well use the latest Boost and mingw while I'm putting out a new version
Edit2: Urgh, it really feels like Yoyo are trying to make it as unpleasant for me as possible to provide free added value for THEIR product. I can't run my unit tests on GM Studio Free because it is limited to 10 scripts, and my test program uses 20. I'll have to rely on you guys to test this...
Edited by Medo42, 07 September 2012 - 10:00 AM.
#198
Posted 07 September 2012 - 10:32 AM
#199
Posted 07 September 2012 - 01:04 PM
Edit: Going back to 4.6.2 for now, rebuilding boost with that (which will take about an hour again... sigh)
Edited by Medo42, 07 September 2012 - 01:24 PM.
#200
Posted 07 September 2012 - 03:14 PM
Faucet Networking v1.4.2 (test)
Also because wnsrn3436 asked about it, here is the DLL, although I don't think it's very useful on its own without some GM scripts or C header files, and I didn't write those yet...
Anyway, this is functionally the same as v1.4.1 (no code changes), but I added the external function names to the .gex description as legobaer suggested, which hopefully makes it work in GM Studio - please test (see below). This is also now compiled against the latest version of Boost, which seems to have made the result a bit smaller and might improve some unknowable things below the covers. And finally, I UPX-compressed the .dll this time for even more space savings, so that the final .gex file is now 268kb instead of 402kb
Please take a look at it and see if everything works for you, for example by opening the unittests.gmk example (contained in the download) in your version of Game Maker (Studio) and running it, and posting here whether it works or not. If everything works, you will just see a popup saying "All tests completed". This does not test every aspect of the library, but it's at least some indication that things generally work. I have already tested it successfully with GM8.0 and GM8.1, so if someone can test it with Studio that would be very helpful.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









