@flits: This could be done much easier. After you connected the clients with the host and did the loading stuff, every client creates his player using enet_ent_create(). With enet_ent_creator() you can check which client created the entity. So their is no need to store a id in the skill. In the function you can do the following:

if(enet_get_clientid() == enet_ent_creator(enet_ent_globpointer(my)))
{ /*you are allowed to control the player*/}

If you do the movement serverside, how do you transfer the control input from the client to the server? And how do you update the positions on the server?

@darkinferno: To start simple try it this way:
Store the control inputs in ONE!!! skill. Use one bit for every key.
send the skill if it has changed
the server makes the according movement and updates the positions and angels using enet_send_pos/ang().

After that is working you will have to solve 2 problems:
1) If you have a high ping, you will notice that the controls of your own player will get slow.
2) Updating the positions and angles the whole time will cause a lot of traffic. You will have to implement death reckoning or something to reduce the traffic.

Best would be to do a mix of clientside and serverside movement. So that the thing you will see clientside is something like a preview of what will happen. But the real collision detection and movement will be done by the server.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version