Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Release: Alice Online
Old
zenteo
Senior Member
 
Status: Offline
Posts: 110
Join Date: Dec 2006
Location: Earth
Arrow Release: Alice Online - 05-14-2010, 07: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, 137 views)
File Type: zip Server SourceCode.zip (105.0 KB, 57 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 08:02 PM.
  Send a message via MSN to zenteo  
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 05-14-2010, 08:50 PM

Sorry Zenteo, but I really am not sure how to run you multiplayer program. I opened up two copies of Alice and opened up "Alice Online" on both of them. When I started them, it said the server couldn't be found.


I'm a web developer/ designer now.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 05-14-2010, 08:57 PM

Ok, I figured it out, but now I can't figure out why the camera doesn't move when I command it to move.


I'm a web developer/ designer now.
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 05-14-2010, 09:49 PM

No ase. or that i got a mac. need rar if you could.


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default 05-14-2010, 10:47 PM

Ok, Zenteo we always knew that the capability for running it on one computer was their. The problem is that we need to figure out how to acess files from computers all over. I have developed an ftp server is too slow and the only other reasonable option would leave your comupter vulnerable to atack. I am still looking in to other ways.
   
Reply With Quote
Old
zenteo
Senior Member
 
Status: Offline
Posts: 110
Join Date: Dec 2006
Location: Earth
Default 05-15-2010, 06:16 AM

Quote:
Originally Posted by dubastot View Post
Ok, I figured it out, but now I can't figure out why the camera doesn't move when I command it to move.
First. Start the server:"Alice Online Server.exe" and then open up two copies of Alice. Load the "Alice Online" world in both of em and run the world.
Then you can use "W","A","D" for controlling it. If the client has freezed up, just shut the server down (Ye it's very glitchy).

Quote:
Originally Posted by Watsamax1 View Post
No ase. or that i got a mac. need rar if you could.
I don't recommend you using mac since the server is made on Windows. You could try using an emulator, or, if you want to, you could run the server on a Windows computer on the local-network, get it's ip and replace the "localhost" string in the "Setup World" method with it.

Quote:
Originally Posted by King Gamer(gorit) View Post
Ok, Zenteo we always knew that the capability for running it on one computer was their. The problem is that we need to figure out how to acess files from computers all over. I have developed an ftp server is too slow and the only other reasonable option would leave your comupter vulnerable to atack. I am still looking in to other ways.
It is using the socket techology which is regardless of which computer you are running the server on. It's the same technology as most of the clients/servers are using. Just run the server on a computer and open the same port as the server is running on, on the router. Then, go to "http://whatismyipaddress.com/" in order to get your IP and replace the "localhost" string in the "Setup World" method with your IP. If your IP-address is dynamic, I recommend you to use a DNS like "no-ip.com".
It is the same for all servers, you will have to open ports and all that stuff.

I would have shown you if I had a working router and a computer that I didn't have to turn off and that I could place in the basement.

Btw, reading/writing files on a ftp-server is not a solution at all. It's extremely slow and it would be very glitchy if two client are writing on the same file.


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.

I've uploaded a video on how to run it and to show it in action:
http://www.youtube.com/watch?v=QqelYXnTXd4


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-15-2010 at 08:03 AM.
  Send a message via MSN to zenteo  
Reply With Quote
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
Old
zenteo
Senior Member
 
Status: Offline
Posts: 110
Join Date: Dec 2006
Location: Earth
Default 05-15-2010, 10:45 AM

The only thing we need is someone who can offer their PC as a server and we're done. Forget ftp and files. This is streaming.


Here's the newest version, The Terrain Builder v2.1.1:
http://www.alice.org/community/showpost.php?p=20844&postcount=52
  Send a message via MSN to zenteo  
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 05-15-2010, 01:31 PM

What if we were to tell each other our IP adresses, would we be able to connect with one another?


I'm a web developer/ designer now.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 05-15-2010, 01:37 PM

Quote:
Originally Posted by dubastot View Post
What if we were to tell each other our IP adresses, would we be able to connect with one another?
We need 1 computer that all of our computers can connect to as a server. From that computer it will send out information to all of the others that are connected to it. Once we get that server we will be able to connect to it and pass information to and from the computer, and multiplayer will be a new possibility.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.