View Single Post
Release: Alice Online
Old
zenteo
Senior Member
 
Status: Offline
Posts: 110
Join Date: Dec 2006
Location: Earth
Arrow Release: Alice Online - 05-14-2010, 06:57 PM

I spent 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
Attached Files
File Type: zip Alice Online.zip (1.37 MB, 147 views)
File Type: zip Server SourceCode.zip (105.0 KB, 58 views)


Here's the newest version, The Terrain Builder v2.1.1:
http://www.alice.org/community/showpost.php?p=20844&postcount=52

Last edited by zenteo; 05-16-2010 at 07:02 PM.
  Send a message via MSN to zenteo  
Reply With Quote