|
| 23 Aug 2015 07:25 PM |
Decided to make this after seeing how atrocious the PF code is :)
==================== DO NOT use a RemoteFunction to add objects to the player's playergui Two things wrong here. One is using a RemoteFunction when it's unnecessary. The second is telling the server to create something that only the player will see. ==================== function getgun.OnServerInvoke(p,gun) local model=servstore.GunModels[gun]:Clone() local module=servstore.GunModules[gun]:Clone() module.Parent=p.PlayerGui model.Parent=p.PlayerGui return model,module end
==================== DO NOT send a bunch of useless data as RemoteEvent arguments Try and get most of the data on the client ==================== network:send(player,"updatepersonalhealth",health0,network.toplayertick(player,healtick0),healrate,maxhealth,alive,actor)
==================== DO NOT use renderstepped in a serverscript ====================
==================== DO NOT make animations unnecessarily inefficient ==================== -- WTF local mainweldc0=rootpart.CFrame:inverse()*workspace.CurrentCamera.CoordinateFrame*mainoffset*pronecf(pronespring.p*(1-aim))*aimcf(aim)*animdata[main].weld.C0*cf(0,0,1)*cframe.fromaxisangle(swingspring.v)*cf(0,0,-1)*gunbob(0.7-0.3*aimspring.p,1-0.8*aimspring.p)*gunsway(aim)*cframe.interpolate(sprintcf(sprintp),data.equipoffset,equipspring.p)*cf(0,0,0.5)*cframe.fromaxisangle(spreadspring.p)*cf(0,0,-0.5)*cf(transkickspring.p)*cframe.fromaxisangle(rotkickspring.p)
-- WTF!!one! local w=v3(r*sin(d/4-1)/256+r*(sin(d/64)-r*v.z/4)/512,r*cos(d/128)/128-r*cos(d/8)/256,r*sin(d/8)/128+r*v.x/1024)*s/20*6.28318
==================== DO NOT put all your code in one script ====================
you would think after spending years creating multiple FPSes, this one's code would be decent |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 23 Aug 2015 07:31 PM |
| @OP, idiot, can you even code? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:33 PM |
I expected hate :)
@cnt, how? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:34 PM |
| I even gave newbies solutions to some of those |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:36 PM |
| Are you saying the math is bad? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:37 PM |
| I'm saying it's unnecessary |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:38 PM |
| Depending on what he's doing. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 07:41 PM |
Nope Probably because it's from his first fps and quantity > quality for him idk |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Aug 2015 07:53 PM |
*Wonders if writing Lua...
...or just tr0l3l3l3l3!NG* |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2015 02:06 AM |
| I'm stupid because I know what I'm talking about? o.e |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 21 Sep 2015 04:45 PM |
Your opinions don't depict whether or not the code is clean, it wasn't meant to be read by other people, stop pretending it's bad just because you don't like the way it was written. Thanks, if less people like you existed, people wouldn't be such sticks about syntax preference.
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 04:47 PM |
| This is a guide, not a rant about the cleanliness of the code :) |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 04:47 PM |
Wow, much hate. Most of this is right. Using RemoteEvents for that crap is bad.
-LackingTickerOfTime |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 04:49 PM |
>BothAngles helps people >gets nothing but hate XD |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 21 Sep 2015 04:52 PM |
I didn't say it wasn't, and I wasn't hating. I'm saying he's an idiot for saying PF is atrocious just because he doesn't like how it was written. If you want to write a guide, leave the insolent satire out of it.
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 05:03 PM |
how about
no i dont like the creator |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 21 Sep 2015 05:05 PM |
not seeing eye to eye with you on the math part
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 05:07 PM |
| A lot of it is unnecessary which means more lag |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 21 Sep 2015 05:08 PM |
but it looks nice
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 05:10 PM |
| robo I only made this thread because of the FE stuff (creating local stuff on the server, and sending a lot of data over the network) |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 21 Sep 2015 05:16 PM |
Also, your first argument is invalid. He's copying the modules into PlayerGui for STORAGE, not so the client can see. PF's system is basically having the gun engine require() a module, which holds data for a specific gun (animations, stats, etc).
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 05:23 PM |
The ModuleScripts should be in ReplicatedStorage. That's why the gun selection is laggy af
I feel my op is rude now but I don't regret making it |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2015 05:47 PM |
| There's an animation when you select a gun, it doesn't just pop into your inventory like vanilla ROBLOX. Also, there's this feeling I have that AxisAngle has much more of an understanding than you. |
|
|
| Report Abuse |
|
|