-
MMF2 + Network + PB
Hi all! :)
I've purchased Purebasic too and i wanna make a little online game with its client made in MMF2Dev and the server coded in purebasic...
I have a lib called k-net for pb and pb also has its own network lib, my questions are: is it possible to connect a client made in MMF2 to this server regardless of the programming language used? What extension could i use, moo(sock, game), oinc?
Thanks in advance.
-
Re: MMF2 + Network + PB
MooSock is the only way because it has no protocol attached to it... But MooSock isn't perfect either, and you're going to have some trouble communicating with other protocols.
I'd say it's probably too hard. You should try pyLacewing for server side and lacewing extension
-
Re: MMF2 + Network + PB
If your Purebasic has an active X for the client you can use the active X object ;)
-
Re: MMF2 + Network + PB
yeah.. i think moosock is my only hope on this... :/
but ive seen some exemples and it seems i need to 'write' the protocol myself...
anyone who can give me some exemples at how to do this? do i need to know purebasic network format?
-
Re: MMF2 + Network + PB
Wow! Ive finally gotten some nice results... im able to send strings using moosock and receive them on my server..
but actually id like to send numbers, int, float, etc, as well, because maybe strings are too slow on transfers on a game that needs fast responses and stuff... is there another way to send data which lets me send numbers?
-
Re: MMF2 + Network + PB
None that I know of. That's why moo is no longer used.
-
Re: MMF2 + Network + PB
:/
i know moogame can send numbers, but i dont know if i can, and how to deal with 'subchannels' within purebasic's network lib, thats why i dont think it would work D:
-
Re: MMF2 + Network + PB
Your best option would be to try and implement the Lacewing protocol into Purebasic. Going to be tricky, but Lacewing is the best by a long way in terms of networking for MMF2 right now.
-
Re: MMF2 + Network + PB
If you consider implementing lacewing in purebasic, you should definitely give a look at pylacewing first.
-
Re: MMF2 + Network + PB
Any reason you need to use PureBasic for a server? With Lacewing you could use Python, MMF2 or C++.
-
Re: MMF2 + Network + PB
Just before comming back here i went into Aquadasoft site and yeah, Lacewing looks pretty good! It would fit very well for everything i wanna do...
I use pb coz i feel more comfortable with it than with C++ or python.. it has a lot easier sintax and stuff.. and EXEs are rly fast and small, almost like in C++
Maybe i could try to 'translate' its c++ or python header (it would be possible, right?) If i do so, ill post it here :)
thank you
-
Re: MMF2 + Network + PB
Corentin , why should i take a look at pylacewing? Is it easier to 'understand' ?
-
Re: MMF2 + Network + PB
It's really easy to understand, and it's really fast too. Python is an easy language, it will probably be far easier to learn python and use pylacewing than implementing lacewing protocol in purebasic
-
Re: MMF2 + Network + PB
haha :D i dont know why but python scares me a little... its kinda near c++ and pb is easier forever :/
actually i prefer c++ instead of python
maybe someday a give it a try for sure
anyways, its less coding to translate the c++ header file to pb and use lacewing.dll
-
Re: MMF2 + Network + PB
I made my server using PB and my client using MMF and Moosock extension, it works very well... the only problem is that when i send messages from the client the server receives them instantly.. but when the messages are sent from server to client, the client freezes for like 5 secs and them come back to normal (and get the message as well)
Anyone knows why is it freezing when moosock gets a message?
I just connect/send a string/receive a string... no other actions/conditions.. and its set to "select socket object on fired event" and not to "use bloking mode"
I can't make the client using lacewing, oinc, mooclick, moogame, etc, because they all have their own protocol so i can't just send/receive simple strings :/ (and making the server with those extensions is not an option for now)
oh, and i want the client to be made in MMF because of the obvious time saving :)
-
Re: MMF2 + Network + PB
Isn't there a way of doing this by using any Lua extension or .net Script extension to access some network function or something? :S
-
Re: MMF2 + Network + PB
Can't you just use a Lacewing server written in MMF2?
-
Re: MMF2 + Network + PB
Sorry for the insistence.. my server is quite big on code and it will be painful to remake it in MMF...
I thought i could use LuaSocket, but the XLua extension just crashes when i call it...
I'll be using Lacewing then; thanks
EDIT:( although i just figured out it works fine with Lua+ :) )