IF U USE THIS ARCHITECTURE PLEASE GIVE CREDITS TO ME CAUSE I WAS THE ONE TO DISCOVER THAT
The only thing u need other then Scratch is a VPN emulator i will prefer HAMACHI as its fast and furious
Well this belongs more to advanced topic but as MESH isnt officially in the current version of scratch so i post it to misc.
Well if you have ever connected more then 3 scratches in a mesh with same variables then u will soon find out that the sensor value for <ANY_VARIABLE> holds the most recently changed Data and this is a loophole cause we can simple give every user a Unique Id and make a script like
||if (ServerDataReciver=Unique ID)
|||X pos = x;
|||Y pos = y;
|||Action = action;
||||||||||||||||
In server and peers we can do
FOREVER-- UNTILL GAME = true
|repeat(no of peers times)/well i guess more then 1 scripts dividing all users will be faster
||change ServerDataReciver by 1;
||replace(ServerDataReciver) of List Xs by X pos;
||replace(ServerDataReciver) of List Ys by Y pos;
||replace(ServerDataReciver) of List Actions by Action;
|||||||||
Thus each and everthing will contain a data of all users connected with server it can also contain Data of User as his score and other information . well i am uploading a scratch project today called chatterbox v0.01 which allows u to make As many room servers u want but u need to register your Hamachi server over here so that people can join your mesh btw its just a basic explainatory architecture so i would love if you guyz remix
And as soon as i get the Server for DG WORLD MMORPG it will be launched along with a lot of cool new features .
chatbox(too basic version - read notes) http://scratch.mit.edu/projects/fanofcena/982060
Hope this proves to be handy for you guys
Your Experimental Minded Friend
Fanofcena
Last edited by fanofcena (2010-04-12 07:59:04)
Offline
I thought of this . . . but the whole thing wouldn't work 'cause the moment you get more than ~4 people the game would lag like crazy.
Offline
Transfer rate would slow down the more clients there are.
Offline
well i tested the chatbox with 41 scratches and the lag was like 41 on xat but that was local connection its secondary version is on now
see ya with the original chatbox tomroow || I redid it to too basic from ma cousins house
and rhy thats why i said about that
btw
jst try this " use more no of data cachers with more no. of users"
Use the Atomic block with the Sensor jst use it u will get the answer
well u will get BYOB getting and transferring variables a lot faster then Scratch a huge lot when the script is atomic
Finally i am a somewhat dedicated to C++ guy now for me on C++ this thing works seemless
i dunno about scratch i jst want to test
Last edited by fanofcena (2010-04-12 07:54:08)
Offline
Dosent lag with BYOB i jst tested on LAN the algorithm do not even shows a sign of lagging with 8 Byobs ! 4 byobs ran on a single CPU btw!!
Now here is how to reduce lag
MAIN SERVER (1)
Contitnetal Servers (4) || I dunt think we need seperate of North and SOuth america
Regional Servers (1 for each region) and thats done
only main server needs to be a bit GOOD CPU rest can be average CPUs and Main server can contain information like if u login it will relay u to the nearest one
for decresed lag
and Ma RooM idea if som1 remembers it only gets variables from the pplz of the same room for a client scratch so it rmovs lag a bit
Offline
lonwol wrote:
Hmmm it would work but it would lag alot.
If this does work.... Scratch High
Offline
LOL it works pal atleast on the C++ coding this works so i guess it must work for Scratch as well cuz it is a fully functional language which lags some basic funtionallity
Offline
if som1 wanna test the Chatbox i am online at hamachi
id
darkfanofcena
password
darkfanofcena
Last edited by fanofcena (2010-04-13 08:14:56)
Offline