Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About HyrTheWinter

  • Rank

Personal Information

  • Interests
  1. HyrTheWinter

    TCP, login and database on a realtime world

    Yes I was saying this in the case where I have only one server/one TCP connection which handles everything for a given player, but you are completely right. Thanks for your time!
  2. HyrTheWinter

    TCP, login and database on a realtime world

    Many thanks for your huge answer! It helps me a lot. You found exactly what I wanted to know about TCP. However, if TCP is a reliable way to identify a player, what is the point of having a token? I just have to keep in memory server-side that the X tcp connection corresponds to the Y player and that's it, no? Interesting, I didn't see it that way but you are right, it seems much more simpler and logic to see the world as a state which pushes notifications to clients where something in their scope changes.
  3. Hi there! I've recently started to be very interested by multiplayers and the architecture of real-time worlds. To start with, I have started a little tactical rpg (2d iso). Using TCP for everything (and to start small), no need 50ms movements. Besides, I am starting to see how I could implement the "login/password" stuff. I have read some things about it, but I'm not still unsure on how to implement it, I've got some questions and please correct me if I'm wrong! :) The client establishes a TCP connection with the server (login server or world server) The client sends login+password to the same server, using a secure way. The server checks the database, loads the user and returns an encrypted token (I could do something similar to a JSON Web Token I guess) Does the server keep in memory (in a dictionnary or something similar) all the user data associated to the socket id? The client gets the token, launch the gui stuff, the player pushes his left arrow key, the client sends a message with an arrow key pressed As TCP in a tunnel between two entities, does the client need to send the token in each message? Or is the TCP socket id enough (is it secure to use it?) to retrieve the correct user? The servers checks the dictionnary to get the player previous position, and returns the new one based on the arrow key pressed. When the server persists the player data in database? After X seconds if it's dirty? Or every request? The client updates the player object with the new position If I'm not wrong, the server keeps the current state of the world in memory and persists it every X seconds to the database to avoid billions of requests? I'm having hard times to see the boundaries between the login/token stuff and the one-one TCP connection, and how the two work together in a "mmorpg" world. Many thanks, for the answers and your time! HyrTheWinter
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!