View Single Post
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 10-12-2012, 08:09 AM

Quote:
Originally Posted by GameKid View Post
Is it more advanced than sending strings over a server like I thought it would be?
OK, well here goes a lengthy description ...

The server application can only do so much, it can't guess how your game is played. For this you need to make a server script that will handle incoming and outgoing communications, to do this you need to know JavaScript.

I have simplified the process as much as possible; the server and client coding handles almost everything it can. I've made a simple API to use in server scripts. This does in fact essentially boil down to "sending strings over a server" (server messages, as I've called them), but in a much cleaner way. There are many advanced features that you don't have to use, but they are there.

I've also added object trackers. They track the position and orientation of an object in one user's world and reflect that onto another object in another connected user's world. So you can have moving players, like players in an FPS etc. You basically just set these up from one world (no server script required) and then from another world you can start using them, the internal code handles everything else.

Here is an example of a Tic-Tac-Toe game's server script.

Here is a much simpler example of server script for a world where you can move rabbits about (it uses object trackers).

Look at the video posted above to see the two server scripts in action.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote