hi guyz.
Well, I'm trying to make a simple online game with mmf2, I followed the simple chat tutorial, did everything i could and it all wordked fine, I even made some kind of engine where you can move your "player" around a bit.
my problem is: data receiving is too slow! when I send a message it takes almost 3 or 4 seconds for it to get to the other players, i tried different moo servers, i even made my own server and it is still too laggy.
is there anyways to fix that or the mooclick extension is just not that good?
find an online game and ask the person who made it for an example.
i never had a problem with 3 to 4 seconds of lag. how big was the string you sent?
for an online game you only want to send small bits of information at a time and only when necessary. you don't want to contuinually send a players position. only send it when he has moved.
But I am sending small bits of information.
for example: when player presses the right arrow, set alterable value x of active to 2 and send alterable value x of active to subchannel5.
and then the other player loads that value only once, wich is the accelaration value, and stills takes 3 or 4 seconds for that information to reach the other player.
Well, I just found a way to make sending UDP data work.
normally, when I send data via guaranteed mode in moo game or mooclick, it takes 2 or 3 seconds for the information to reach everyone else.
here's the trick: when i send anything via non-guarateed or blast, the info data does not reach the other player, but when i send anything in guanranteed mode just after blasting a text, the data goes really fast, it takes less than 20 miliseconds for it to reach the other players.
so here's what i had to do to always send data via UDP somehow.
on event:
blast "anything" on any channel
send "realdata" on real channel
or in moogame
on event:
set mode to non-guaranteed
send "anything" on any channel
set mode to non-guaranteed
send "realdata" on real channel
strange isn't it? but it works ^^
well, some people did not believe, so I'm hosting the test file, don't try to read the instrunctions in the .mfa file, it's in portuguese ^^.
try to connect to sphax, or even diefox, I'll have my moo server opened for a few days. open two instances of the exe file and try sending text, dont press the button to do so, instead press enter to send the message.
if you open the .mfa file you will see that I have to blast a text, even if the message doesnt go it somehow "opens" the UDP port and then i send the guaranteed text.
i suggest using a timer to see how much it takes for a message to reach the other window.