View Single Post
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 05-15-2010, 09:45 AM

Quote:
Originally Posted by zenteo View Post
I spended some of these days, working on a muliplayer version of Alice and I succeeded.

The client-version is 99% pure Alice code and 1% python. The python code is only for the connecting/disconnecting and setting/getting position and rotation. The message handling and everything else is in Alice code. In order to do this, I had to make the messages in text instead of byte codes. Since the message handling is in Alice code and that the messages is in text, will make it run a bit slowly. The more players there are on the map, the slower it runs. The server-side code may cause much of the lag because I have never done serious server-client coding before and therefore I don't know the secific technics or strategies for a healty server/client.

This multiplayer example supports up till 4 players(slow) and synchronizing of position, rotation and movement-state.

The movement-state will tell the client that a player is moving and therefore it will try to simulate the movement between each of the position-updates.

How to use:
Start the server and then start to instances of Alice.
Load the client-world in both of the instances and play them.
Set the windows up so that you can see both of the windows simultaneously.
Then try to walk around with W,A and D (I didn't include S because of too much extra coding. Then I would have to add a state_walking_backward and state_walking_forward state).

And if the Alice-player-window is freezing up, then just kill the server and restart it/Alice.

Tell me what you think.

~Zenteo

Edit: Ahh sorry folks, it seems like that I have compiled the server for framework 4.0 instead of framework 2.0 ... I's fixed now, just redownload it.

See it in Action on Youtube!!!: ^^
http://www.youtube.com/watch?v=QqelYXnTXd4
This is just networking almost online, but thats where Zone and King Gamer are stuck


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by jediaction; 06-25-2012 at 04:03 PM.
   
Reply With Quote