Help with multiplayer in eclipse

edited April 2015 in How To...

Should I make an extra project for the server and import the stuff from the main-game,
or should the server be part of the main-game?
Or is there a better way to do it?



  • You posted in "Questions about Code" category, but there isn't any code.
    Beside, your question is vague and ambiguous.
    What Eclipse does here?
    What server are you talking about?

  • Im programming it in eclipse with the processing.core and the .net library.
    It's suposed to be a multiplayer, so I need some sort of client-server setup.
    The client is in the game-programm, but where is the server suposed to be?
    At the moment it's an extra programm that sends every input to every client,
    where the commands are executed and new commands generated and
    send to the server. But I learned that the server needs to mirror the games on
    the client-sides.

    (I have no idea where to put this question.)

  • Answer ✓

    Moved to the How To category where such generic question fits...

    Indeed, you need a sketch acting as server, coordinating the various clients.
    Alternatively, you can make a server independent of Processing, running on a real-world HTTP server, for example, but it is more ambitious...

  • So I will make an extra server-programm that imports
    the needed game-classes to mirror the game. But what processes
    should happen in the client or the server? like:
    damage calculation

    any tips or ideas?

  • The server doesn't need most of the game logic, in general, it is more responsible to ensure players remain on the map, update the positions of each player on the map, keep track of score and progresses, etc.

  • which side should update the auto-attack?
    The server could update every entity,
    or every client updates his entities.

  • If all players are on the same map, all entities are shared I suppose, so I think the server should manage them, or at least keep track of their movements. You don't want an entity to go left on one client, and right on another...

  • I mean, every client is controlled by a player,
    every player controlles some entities,
    every entitie is on every client.

  • edited April 2015

    How do I get the IP-adress needed for constructing the client: client = new Client(app, "", 5204);?

  • Answer ✓

    ipconfig on Windows, ifconfig otherwise, AFAIK.

Sign In or Register to comment.