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 » Scripters
Home Search
 

Re: Efficiency

Previous Thread :: Next Thread 
aboy5643a is not online. aboy5643a
Joined: 20 Nov 2010
Total Posts: 2785
14 Sep 2011 08:08 PM
Is there an efficient (or easy...) way to share a complex GUI. This is kinda crucial in my recreation of Ace of Spades. Only less Minecwaft and more Terrawia :P The GUI is fairly complex though, and can't be cloned/removed once a frame (the speed I'm aiming for.)

"I like dooly-bops" -- ArceusInator
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
14 Sep 2011 08:45 PM
Fail F5. You need at least 50 views per second to make it good. :3
Report Abuse
TheCapacitor is not online. TheCapacitor
Joined: 19 Jan 2011
Total Posts: 7045
14 Sep 2011 08:45 PM
My F5 bot is only like 8 F5's per sec :c

I gotta learn C++...
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
14 Sep 2011 08:46 PM
PM for the sauce
Report Abuse
mew9O3 is not online. mew9O3
Joined: 10 Jun 2011
Total Posts: 179
14 Sep 2011 08:52 PM
ok ;3
Report Abuse
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
14 Sep 2011 10:51 PM
Make a utility class which does it, here's my technique for shared stuff:

function Make_GuiTarget_For(player)
...
end

function Make_GuiTarget_Group()
function addTarget(target)
function remTarget(target)
function addGuiFactory(factory)
function remGuiFactory(factory)
end

function MakeGui_SomeGui_Model()
function setSomeState
event onSomeStatChange
end

function MakeGui_SomeGui_View(model)
local myGui = Instance.new(...)
model.onSomeStatChange.connecxt(function() ...edit myGui end)
end

usage:

_G.GlobalGroup = Make_GuiTarget_Group()
game.Players.ChildAdded:connect(function(p)
GlobalGroup.addTarget(Make_GuiTarget_For(p))
end)
local SomeGuiModel = MakeGui_SomeGui_Model()
GlobalGroup.addFactory(function()
return Make_SomeGui_View(SomeGuiModel)
end)
SomeGuiMode.setSomeStat( value )

That's just a general pseudo-code of how I do it. If nyou want to make a more complex system with some shared and some unshared stuff you pretty much have to do things like that, or else it'll get out of hand. It looks like overkill but once you have it set up then it's worth it for the cleaner code.
Report Abuse
mew9O3 is not online. mew9O3
Joined: 10 Jun 2011
Total Posts: 179
14 Sep 2011 10:55 PM
"model.onSomeStatChange.connecxt(function()"
model.onSomeStatChange.connect(function()*

"If nyou"
If you*

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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