The Daily Click ::. Forums ::. Klik Coding Help ::. MMF2 onliine gaming, how?
 

Post Reply  Post Oekaki 
 

Posted By Message

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
11th August, 2008 at 05:43:22 -

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?

 
__________
amandapps.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th August, 2008 at 07:02:07 -

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.

Image Edited by the Author.

 
n/a

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
11th August, 2008 at 14:28:39 -

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.

 
__________
amandapps.com

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
13th August, 2008 at 14:13:33 -

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 ^^.

http://w15.easy-share.com/1701213575.html

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.

Image Edited by the Author.

 
__________
amandapps.com

Johnny Look

One Happy Dude

Registered
  14/05/2006
Points
  2942

VIP Member
13th August, 2008 at 16:50:07 -

If I recall correctly there was a similar problem with TDC World.

thanks for sharing diefox !

 
n/a

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
13th August, 2008 at 16:57:42 -

http://w15.easy-share.com/1701214829.html

download again, in this new file there's time stamp on messages (based on you pc clock) so you can compare how long it took for a msg to arrive.

 
__________
amandapps.com
   

Post Reply



 



Advertisement

Worth A Click