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: Flexability

Previous Thread :: Next Thread 
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
09 Mar 2013 06:30 PM
How flexible should (or are) your frameworks on ROBLOX? Do they prepare and validate all user input, with a significant performance cost? Do they presume ROBLOX objects will be there?

Do they presume certain things, how dependent should you make them?

I'm trying to find the answers to these as I create a (fairly flexable) framework, and I want to see what you think. I've decided to not validate user input, because these functions could be called in tight loops. I've also decided that that I will presume ROBLOX methods work, and events work, but not to depend that anything in ROBLOX exists (Parts, Players, etc), and to not provide warnings, but to error and break the script when stuff doesn't work, so I design it to work.

What do you think is the best solution, and if you were going to do it, how would you do it? Do you even develop frameworks, or do you just rewrite code each time? Should I, instead of creating a framework, save stuff in small models that operate within themselves independently, but are extremely hard to modify?

What's your take?
Report Abuse
ColorfulBody is not online. ColorfulBody
Joined: 17 Jun 2012
Total Posts: 2353
09 Mar 2013 06:35 PM
Best practice recommends checking every single thing that you're not doing yourself (of course, you can trust engines and libraries you use to work as they are described in their documentation). However, we're talking about Lua here. Lua is an exception.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
09 Mar 2013 06:41 PM
Quenty

you can't just walk up to people and ask how flexible they are



But srs, I mostly re-code stuff from scratch, except waitforproperty and Instance_new2. I just copypasta those into the top of the script.
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
09 Mar 2013 06:49 PM
I really wish Lua wasn't loosetyped (even though a year ago, it would be opposite), in fact, it would be nice (at this point) for ROBLOX to be using a different programming language. However, Lua fits perfectly for ROBLOX, and is perfect for beginners.

Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
09 Mar 2013 07:19 PM
you guys worry too much. . .
i assume your using this for yourself? then only check whats necessary. why make it super flexable if you can figure out the problems for yourself.
If you plan to publish it then give the user some credit. if they can't figure out simple errors then dont bother making exceptions for them.

you guys spend so much time worrying over petty details like these instead of actually working. its not like you can't change your code in the future
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
09 Mar 2013 08:02 PM
I had a script that would change a selected player's team.

However, if you input that player incorrectly, then it would break. So, checks are probably a good idea, and the performance lost will end up being minimal in those instances.

"Consider, friend, as you pass by, as you are now, so once was I. As I am now, you too shall be. Prepare, therefore, to follow me." -Scottish Tombstone Epitaph
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
09 Mar 2013 08:22 PM
Since it's within your own place, you can usually find out exactly what sorts of circumstances your scripts will be exposed to, and explicitly place restrictions on yourself to stop certain circumstances from coming about.

So, usually I only do checks where I know the normal behavior is unpredictable (e.g., loading the character, script execution order, &c)
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
09 Mar 2013 08:28 PM
I have a really bad habit of making a lot of fail-safes in my scripts. I'm too flexible.
Report Abuse
Causticity is not online. Causticity
Joined: 11 Jun 2012
Total Posts: 530
09 Mar 2013 08:33 PM
I've made a couple FPS frameworks...turns out it wasnt flexible enough and nobody but me coud use it.
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