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: Do you OOP?

Previous Thread :: Next Thread 
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
03 Dec 2014 08:40 PM
Why / Why not?
Report Abuse
BowtieMod is not online. BowtieMod
Joined: 01 Apr 2013
Total Posts: 804
03 Dec 2014 08:42 PM
Yeeeeee

Because copy/pasting thousands of lines does not appeal to me
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
03 Dec 2014 09:16 PM
Sometimes. Not really on ROBLOX though unless I find some non-existent data type that I need or want to make a large group of instances that are repeated in several places simpler to manage. As you can imagine, neither one of those come up that often, the second more than the first.
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
03 Dec 2014 10:13 PM
Yes, i do OOP quite a lot.
This is because i spend a lot of time making simulations of things, such as particle emitters and water simulations, and i like to store each object in an easy to index and easy to use table in an OOP format to easily use.

When i'm trying to keep things in a sandboxed environment, i also use OOP a lot of the time.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
04 Dec 2014 01:54 AM
I OOP all the time dude.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Dec 2014 02:31 AM
!thgiew esol I woh s'tI
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
04 Dec 2014 05:31 AM
Normally yes, though I do like Haskell's type system, like this is a binary tree:
data BinaryTree a = EmptyTree | Node a (BinaryTree a) (BinaryTree a) deriving (Show, Read, Eq)
Report Abuse
SethDusek5 is not online. SethDusek5
Joined: 26 Mar 2011
Total Posts: 2580
04 Dec 2014 05:42 AM
i hate the oop in php

-> to access properties and functions is just time consuming
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
04 Dec 2014 06:11 AM
Too much syntactic sugar gives you diabetus.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
04 Dec 2014 06:30 AM
yum, syntactic diabetes.
Report Abuse
eXoguti093 is not online. eXoguti093
Joined: 17 Oct 2008
Total Posts: 1786
04 Dec 2014 08:37 AM
@Osyris so in the explanation and example you gave, you're basically simulating Vector3 in normal Lua? Could code like that be applied in Roblox Lua to create your own methods?
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
04 Dec 2014 08:43 AM
never saw that, but i think you can do it with metatables. as long as there's a way to discern vector3s from other userdata.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
04 Dec 2014 09:16 AM
Depends on the code. If it needs to be scalable, then yes. If I need to organize a big functionality of code, then yes. If it is a single task that needs to be done, then no.

I also use ModuleScripts mostly now when doing OOP.
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
04 Dec 2014 04:23 PM
@eXoguti093

Yes, but I'm missing a lot of the more mathmatical methods associated with Vector3.

Obviously, it wouldn't make sense to make your own Vector3 datatype for ROBLOX, but you could definitely make other datatypes!

Or you could make more class-y things like for instance a "Zombie" class and create things like Zombie:walk(position), Zombie:kill(player), Zombie:wander(duration), etc etc.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
04 Dec 2014 04:26 PM
Like everything in here.
preview.c9.io/lunate/skyewashere/RPG/Interface/

Classes are horrible unless you're using them only in the script they were made in, or you have a good method of exposing them / get;set
Report Abuse
eXoguti093 is not online. eXoguti093
Joined: 17 Oct 2008
Total Posts: 1786
04 Dec 2014 04:35 PM
I think this stuff is just above my current level, I know what I'll be spending time figuring out and learning now
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