Osyris
|
  |
| Joined: 27 Oct 2007 |
| Total Posts: 4321 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
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 |
|
|
|
| 04 Dec 2014 05:42 AM |
i hate the oop in php
-> to access properties and functions is just time consuming |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2014 06:11 AM |
| Too much syntactic sugar gives you diabetus. |
|
|
| Report Abuse |
|
|
RA2lover
|
  |
| Joined: 09 Nov 2008 |
| Total Posts: 1254 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|