Need Ideia(sugestion) to GameServer RPG Game

Discussion in 'Chit Chat' started by Douglas Farias, Jan 27, 2015.

  1. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi all i m working at a game server for one game in b4a;
    this game server is runing at b4j with this

    ok for now its ok, i can connect devices, send infos, can log the server time at my devices fast etc.

    i m using the AcceleratedSurface lib, the game is based on tiles.

    X = 0 TO 200 <horizontal>
    Y = 0 TO 200 <vertical>

    ok, when my character move, i can log the position for example my character is under the
    x = 5 and Y = 2.

    ok, i know i need send this info to server, but now is my question....
    How can i make to send my position to gameserver, if i go have more users online?
    if another user move his character how all anothers users go know this?

    i need a ideia for this *-* if u have send me pls.

    basical its just a logic, if i have one user i know what make, but i dont know what make when have 10 20 players online.
    how to distribute the position of each character to all devices ?

    PS: with a minimal data use (internet use)

    Sem título.png
  2. WAZUMBi

    WAZUMBi Well-Known Member Licensed User

    Store all the active players data in a database which will include their world coordinates on the grid.

    Use a timer to get all active users data and return it to the game.
    In your game you will use this data to place the online characters coordinates in the game.
  3. Douglas Farias

    Douglas Farias Expert Licensed User

    1° What best time to send Server info to all Users 1s?
    2° If a user log out and i have stored the info on gameserver db what to make in this case?
    3° If have 50 + players on, it is not a bug data to send all time?
  4. sorex

    sorex Expert Licensed User

    1. it depends on how powerfull your server and data connection is and how the engine is written
    2. if he logs out just remove the user and coordinates
    3. see 1.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice