Jump to content


Photo

39 dll help request


  • Please log in to reply
31 replies to this topic

#21 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 03 September 2012 - 08:21 PM

NOT sending multiple messages per step would cause lag, and NOT receiving and processing multiple messages per step would cause you megalag.

Plus, you'd just clog up your socket's receivebuffer.

Can you explain in more detail please?
  • 0

#22 SapperEngineer

SapperEngineer

    GMC Member

  • GMC Member
  • 110 posts
  • Version:Mac

Posted 03 September 2012 - 08:22 PM

I think Medo42, the creator of Faucet Networking explains it best (The example is not 39dll, but it's the same idea):

http://stackoverflow...essage-overload
  • 0

#23 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 03 September 2012 - 08:35 PM

I think Medo42, the creator of Faucet Networking explains it best (The example is not 39dll, but it's the same idea):

http://stackoverflow.com/questions/10609261/python-server-and-game-client-message-overload


Hmm from what I've read from the article, switching to UDP improves the ping but makes the congestion worse. But that can be fixed by reducing the rate of packets sent. I have a way of doing this dynamically, but I don't think I should share it with him until he gets the basics down pat, it might be too much work for him. Maybe I'll try the multiple message receiving like you said, it might end up making it super fast! (With 2 players cross country with a host with a 2 MB DSL connection it only has 16 ms ping currently, which is pretty nice.)

From what I read though, you should call recievemessage() multiple times each step even if the server only sends one message per step, to get rid of any lagged or congested messages.

Edited by PoniesForPeace, 03 September 2012 - 08:37 PM.

  • 0

#24 darknessspliter

darknessspliter

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 03 September 2012 - 10:14 PM

I think Medo42, the creator of Faucet Networking explains it best (The example is not 39dll, but it's the same idea):

http://stackoverflow.com/questions/10609261/python-server-and-game-client-message-overload

SapperEngineer,can you tell me how should start making a game step by step only from gmk file,containing only the scripts/function from the dll?
After
dllinit(0, true, false);

listen = tcplisten(12000,20, 1);
if (listen < 0) game_end();
I don't know what to continue with ):

EDIT:I saw some tutorial at http://gmc.yoyogames...showtopic=90437 (39dllV25.zip)

Edited by darknessspliter, 03 September 2012 - 10:22 PM.

  • 0

#25 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 03 September 2012 - 10:20 PM


I think Medo42, the creator of Faucet Networking explains it best (The example is not 39dll, but it's the same idea):

http://stackoverflow.com/questions/10609261/python-server-and-game-client-message-overload

SapperEngineer,can you tell me how should start making a game step by step only from gmk file,containing only the scripts/function from the dll?
After
dllinit(0, true, false);

listen = tcplisten(12000,20, 1);
if (listen < 0) game_end();
I don't know what to continue with ):


Well, what got me going was the example 4 simple chat, I think that is the easiest tutorial to get you started with TCP.
  • 0

#26 darknessspliter

darknessspliter

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 03 September 2012 - 10:56 PM

Oook.The tutorial from 39dllV25.zip helped me a little to understand how are things working.However it's an example only for 2 players.I need to learn how those evil ds_list functions are working and in which event should I put those things to make every player get his own id on login.Would someone explain me a little bit more in detail please :) ?

Edited by darknessspliter, 03 September 2012 - 11:01 PM.

  • 0

#27 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 04 September 2012 - 03:02 AM

Oook.The tutorial from 39dllV25.zip helped me a little to understand how are things working.However it's an example only for 2 players.I need to learn how those evil ds_list functions are working and in which event should I put those things to make every player get his own id on login.Would someone explain me a little bit more in detail please :) ?

Hmm, I have been coding a lot today so it might be best if I wait until tomorrow, so I don't fudge anything up. But I have had multiple clients and you don't need a ds_list() unless you want to.
  • 0

#28 SapperEngineer

SapperEngineer

    GMC Member

  • GMC Member
  • 110 posts
  • Version:Mac

Posted 04 September 2012 - 03:42 AM

A ds_list is a must (pretty much) for having multiple clients.

I'll post a sample tomorrow -- I already have one halfway done.
  • 0

#29 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 04 September 2012 - 01:39 PM

A ds_list is a must (pretty much) for having multiple clients.

I'll post a sample tomorrow -- I already have one halfway done.

I use arrays, from my understanding ds_lists are faster for adding values to the list and sorting...
Arrays are faster for just changing values already declared in the array, no?
  • 0

#30 darknessspliter

darknessspliter

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 06 September 2012 - 02:01 PM


A ds_list is a must (pretty much) for having multiple clients.

I'll post a sample tomorrow -- I already have one halfway done.

I use arrays, from my understanding ds_lists are faster for adding values to the list and sorting...
Arrays are faster for just changing values already declared in the array, no?

Hey!How exacly are you using the arrays.And which side creates the player id's (server or client)?
  • 0

#31 SapperEngineer

SapperEngineer

    GMC Member

  • GMC Member
  • 110 posts
  • Version:Mac

Posted 06 September 2012 - 07:55 PM

The server monitors the player id's.
  • 0

#32 darknessspliter

darknessspliter

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 06 September 2012 - 11:00 PM

The server monitors the player id's.

Can you tell me how exacly to make the server check if a new player is connected?And of course how to make the id raise when a new player joins.I will try to make somehow the server check if there is a free id when server is full (id=max_players),but for now I don't have other questions.Thanks for help again :)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users