generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: How does phantom forces do network replication?

Previous Thread :: Next Thread 
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
24 May 2016 07:33 PM
I think I heard they do FireAllClients or something like that to replicate stuff. Anyone know?
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
24 May 2016 07:34 PM
well if you want to replicate something to every client thats generally what you do


Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
24 May 2016 07:36 PM
(From a different post of mine)
(Talking about my gun script)
"Whenever you fire the gun, it clones a Billboard gui, and inserts it into the Handle of the gun, and deletes it after 0.05 seconds. This worked fine before [with the typical client-server setup], because the server does it, and it replicates to everyone else automatically.

With FireAllClients, each client has to individually clone the gui. With 20+ players, this will probably cause a ton of lag if your computer has to clone possibly 100+ billboards at one time, instead of the server just replicating it to you.
(I know I could just do gui.visible = true and have a Billboard in the handle, but this is a much broader problem, because if I replicate anything it will have to work like this anyway and it won't be simple code)

How can I get around this?"

I think I'm doing this the wrong way.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
24 May 2016 09:43 PM
Bump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
25 May 2016 10:30 AM
Bump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
25 May 2016 01:25 PM
If I understand right, PF doesn't really have any server involvement with their guns. Like, you locally run everything (so there's no remote event delay for anything that the server would have to do), and then they send every other client in the game functions to run, that also simulate what your client just did, like a muzzle flash when you fire a gun.

I see 2 problems with this setup:
1. Would having every client do all of these functions to simulate replication from the server cause a lot of lag?
2. If everything about the gun is local, how would you manage ammo? Usually you put an IntValue named "Ammo" into the tool, and then the server handles it. The only way I can see to get around this is to make the Ammo a variable in the local script that runs the gun, so it's not as easy to edit as Tool.Ammo.Value = 10000 or something like that. Although, exploiters could still reach the ammo variable in a script, so I guess you'd also have to do something like;
while wait(10) do
if Ammo > MagazineSize then
fireserver:("KickMe")
end
end

Can anyone elaborate on what I brought up?
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
25 May 2016 03:45 PM
bump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
25 May 2016 07:30 PM
Bumpbumpbump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
26 May 2016 12:06 AM
One advantage I thought of for the client to client system, is that it frees up a lot of processing power for the server. With client-server, the server would usually register the muzzle flash for a gunshot, but instead of client does the same thing. It takes up power on the client, but it could really help out the server.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
26 May 2016 09:32 AM
Bump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
26 May 2016 10:45 AM
More bumps
Report Abuse
Eyerny is not online. Eyerny
Joined: 15 Jun 2013
Total Posts: 1554
26 May 2016 10:56 AM
This discussion suits more to be in the scripters forum.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image