http://www.seamless3d.com/download
Seamless3d can now run as either server or as client when used for chat.
With a little help from PHP, who runs as the server or as the client is determined automatically.
To login it's the same as before:
Click
from the toolbar (make sure the button has a spider web on it or it wont work)Enter your nickname and click the go button.
You can see who is running the server by typing in the command:
server?
into the chat window and pressing enter.
You will notice that a smls file in the worldUrl field has been replaced with a php file.
The php file returns a saved IP address for the acting server when Seamless3d requests to join a world.
The script will save a new IP address whenever Seamless3d requests to act as the server (which happens when Seamless3d fails to log in with the IP address it was given).
The PHP script is currently very simple:
- Code: Select all
<?php
$filename="server.txt";
if($_GET["session"]!="join"){
if($handle = fopen($filename, "w")){
$str = $_SERVER['REMOTE_ADDR'];
fwrite($handle, $str);
fclose($handle);
}
}
if($handle = fopen($filename, "r")){
$str = fread($handle, filesize($filename));
fclose($handle);
echo $str;
}
?>
It must be allowed to write files within the folder its in.
This PHP script will not prevent 2 people from becoming servers if they request to be servers at the same time but I am sure something simple can be done to stop this.
Seamless3d creates the world url for the smls file by simply replacing the php extension with a .smls extension
This means you must have the world smls and php filenames match and they must both be in the same folder.
I have made it so that you no longer have to click on the chat window to type but you will need to click on either the chat window or the 3d window to use the arrow keys because both windows use the arrow keys differently. No crashes should occur if you get it wrong however.
You can change the avatar url field with any of these tested urls:
http://www.seamless3d.com/wrl/test_mu/n ... ch_av.smls
http://www.seamless3d.com/wrl/test_mu/m ... ezier.smls
http://www.seamless3d.com/wrl/test_mu/f ... tudio.smls
http://www.seamless3d.com/wrl/test_mu/m ... tudio.smls
http://www.seamless3d.com/wrl/test_mu/n ... he_av.smls
http://www.seamless3d.com/wrl/test_mu/r ... he_av.smls
Many Thanks to Gil the B for testing this version out before I uploaded and thanks to all who gave feedback for the previous version.
I am now suspecting the only reason why people were unable to log in sometimes when I had the server running with the correct IP address was due to whether I had the server running on my computer or on Ep's (which both share the same IP address).
In addition to working on the chat:
I have made it so that any window that is outside the range of being visible is now automatically brought within view.
This will make it no longer necessary to edit a smls file using a text editor if you receive a smls file from someone who has a bigger screen than you
I fixed a timing bug that would show up on some scripted animations.


