soliadam.blogg.se

Rpg maker map x vs screenx
Rpg maker map x vs screenx










rpg maker map x vs screenx
  1. Rpg maker map x vs screenx update#
  2. Rpg maker map x vs screenx code#

that divided outgoing messages from 25 to 2 or 3 messages when moving and 0! standing still. In the client I was sending 25 messages/ second to the server: I was sending data no mather if it was moving or if it was idle, but I thought that instead sending messages all the time I could only send data when a change was detected, for example: the client is idle, so the first time, it will send "/idle", but if it keeps standing still it wont keep sending "/idle", server will save the command until a new one arrives, so after a while I start to move forward, I send a "/acce" to the server first time, but again if I keep on moving forward it wont send again "/acce".When a clients exits the game it sends a "/quit" to the server, server will clean the players data and then it will send a "/kill" command to the clients so they will clean the exiting client.Īfter I made the server I saw two simple ways to improve performance: first one in the client second one in the server:

Rpg maker map x vs screenx update#

We will start moving around, when we move we will be sending "/acce", "/dece", "/righ" and "/left" to the server that will update our position in the map, if we don't move a "/idle" message will be sent, when the server updates our position it will mark if the client has changed state so it will send the command "/upda" with our updated x and y to the clients in a range (500px), so server wont send updates to clients that can't see our moves, that will limit too network traffic. So we have our server running, in our client we create a player and then connect to the server, then the client will wait until our server sends "/SUID" with the UID for our client, the UID wont change until we logoff, after receiving the UID our client will send our nick and image, that is how our "enemies" will see us, then we are ready to explore. /ping > Send a /ping request to calculate client latency./upda > Send non-player updates (X,Y,Nicknames.).

rpg maker map x vs screenx

  • /SUID > Send Unique identifier to the player.
  • I resume here all the commands I used for the demo: The disadvantages? performance and scalability, "/acce" uses 5 bytes to send "forward", too much for a simple commands in the other side for every new command you have to modify both client and server, that can be overwhelming! What are the advantages when using this method? basically it simplifies debugging, it's easier to understand an incoming packet when you can actually see the command and not a binary-format hex value, basically it is good for didactic purposes. Probably now you are wondering about how does it works, suppose we want our client to send to the server we are moving forward, then we will just send a command telling the server we have pressed "forward", suppose we decide the text command is going to be "/acce", when the server receives a string "/acce" from our client it will understand the client is moving forward so it will move the client forward in the map and return the new updated position to the client The server will send "/ping" to the clients every x seconds ,when the clients receive "/ping" it will return "/pong" to measure delay in the communication between server/clients.

    Rpg maker map x vs screenx code#

    Most of the people (should) use serialization to send data, for example an item could be packed in an object / serialize it and send over the net, in the destination it would be deserialized and here we have our object/item again, but I have used another way to transfer messages that is hard to code but easier to understand: Plain-text messages. In the server we could haveĬomands to send the map, the clients data like player / npc position,etc. What we need is to create a way to communicate between server andĬlients will send commands to the server forĮxample: move forward, turn right, atack!.

    rpg maker map x vs screenx rpg maker map x vs screenx

    Mmorpg, and just in the top of the network we have the messaging system.












    Rpg maker map x vs screenx