We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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
(I have no idea where to put this question.)
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:
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.
How do I get the IP-adress needed for constructing the client:
client = new Client(app, "127.0.0.1", 5204);?
client = new Client(app, "127.0.0.1", 5204);
ipconfig on Windows, ifconfig otherwise, AFAIK.