Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Release: Alice Online (http://www.alice.org/community/showthread.php?t=4425)

zenteo 05-14-2010 06:57 PM

Release: Alice Online
 
2 Attachment(s)
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](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).[/I]

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

Tell me what you think. :D

~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.

[B]See it in Action on Youtube!!!:[/B] ^^
[URL="http://www.youtube.com/watch?v=QqelYXnTXd4"]http://www.youtube.com/watch?v=QqelYXnTXd4[/URL]

dubastot 05-14-2010 07: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.

dubastot 05-14-2010 07: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.

Watsamax1 05-14-2010 08:49 PM

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

King Gamer(gorit) 05-14-2010 09: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.

zenteo 05-15-2010 05:16 AM

[QUOTE=dubastot;21299]Ok, I figured it out, but now I can't figure out why the camera doesn't move when I command it to move.[/QUOTE]
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=Watsamax1;21301]No ase. or that i got a mac. need rar if you could.[/QUOTE]
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=King Gamer(gorit);21303]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.[/QUOTE]
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.

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

jediaction 05-15-2010 08:45 AM

[QUOTE=zenteo;21297]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](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).[/I]

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

Tell me what you think. :D

~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.

[B]See it in Action on Youtube!!!:[/B] ^^
[URL]http://www.youtube.com/watch?v=QqelYXnTXd4[/URL][/QUOTE]

This is just networking almost online, but thats where Zone and King Gamer are stuck

zenteo 05-15-2010 09: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.

dubastot 05-15-2010 12:31 PM

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

Dameria 05-15-2010 12:37 PM

[QUOTE=dubastot;21337]What if we were to tell each other our IP adresses, would we be able to connect with one another?[/QUOTE]

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.


All times are GMT -5. The time now is 12:35 AM.

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