|
| 25 Feb 2012 06:46 AM |
Each player, and the server, would have functions like:
(Player/Server):SendPacket("Hurr message",{1,"hai",true,Vector3.new(0,0,0)}[,Enum.PacketType.Reliable/Unreliable])
Where the first parameter is the type and second is a table with primitive data and roblox types (which roblox has special code for to send them properly) The optional parameter tells roblox wheter the packet must reach its destination or not. Kind of like selecting between UDP and TCP. This would be useful for learning how to do networking and st00f.
And:
(P/S):GetPacket("Hurr message") (P/S):GetPacketCount("Hurr message")
These can only be called from the client which the player or server is on. GetPacket returns the table for the oldest packet of that type not read yet and removes it. GetPacketCount returns how many packets of the type are there waiting to be read.
You can send data to any player or server. It either transmits them directly, or sends to server and from there to the target, depending on which way is faster/available.
Pros: -More robust systems for making gui games where you can see other players (as with instances it sends data to every player and instances probably have some overhead too) -Teaches how to do proper networking stoof -Fun -Moar fun
k? |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 25 Feb 2012 10:27 AM |
| Use BindableFunction/BindableEvent or a StringValue that gets populated with a JSONified version of the table. That's all I can think of right now. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 12:27 PM |
@local thats unoptimized for what i want, and the data still goes to each player which makes the max data sent like 10th of what it would be if it just reached the target. |
|
|
| Report Abuse |
|
|
LPGhatguy
|
  |
 |
| Joined: 27 Jun 2008 |
| Total Posts: 4725 |
|
|
| 25 Feb 2012 01:20 PM |
>Use BindableFunction/BindableEvent or a StringValue that gets populated with a JSONified version of the table. That's all I can think of right now.
BindableFunctions don't replicate, as shown here: http://www.roblox.com/Forum/ShowPost.aspx?PostID=63240800 |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 02:43 PM |
"as shown here"
As SAID here, not as SHOWN here. It annoys me so much when people make that mistake, seriously. It's not like you can put pictures on the forum or anything. |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 25 Feb 2012 02:45 PM |
| It's as WRITTEN here, derp. :o |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 02:55 PM |
@myrkos
No. It's as TYPED there. |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 25 Feb 2012 02:57 PM |
@julien
No. It's as DISPLAYED FROM DECODED UTF-8 CHARACTERS TRANSMITTED FROM THE ROBLOX SERVER there. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 03:20 PM |
@myrkos
No. It's as DISPLAYED FROM UTF-8 CHARACTERS DECODED BY YOUR USER AGENT TRANSMITTED FROM ONE OF THE ROBLOX SERVERS TO YOUR COMPUTER there. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 03:27 PM |
no im pretty sure as shown here is acceptable
How is siggy formed? |
|
|
| Report Abuse |
|
|
LPGhatguy
|
  |
 |
| Joined: 27 Jun 2008 |
| Total Posts: 4725 |
|
|
| 26 Feb 2012 02:09 AM |
>As SAID here, not as SHOWN here. It annoys me so much when people make that mistake, seriously. It's not like you can put pictures on the forum or anything.
The text on the page is indeed *shown*, is it not? |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 03:52 AM |
i prefer "it dun raplicate cuz wiki [link here]"
|
|
|
| Report Abuse |
|
|
owen0202
|
  |
| Joined: 27 Feb 2008 |
| Total Posts: 6912 |
|
|
| 26 Feb 2012 04:37 PM |
Shown here is perfectly acceptable.
Technically, it is shown. It is displayed on a monitor.
Get over yourself. |
|
|
| Report Abuse |
|
|