SRL Archive - Discussions and Debates

Object oriented?


Kyle Undefined

2009-02-14 11:23:08

Hi, I decided to put this here since I know I would get a better response than in any of the junior threads. We all know Scar is linear programming, and kinda limits what we can do as far as scripting. I was wondering if anybody has thought about making an object oriented version of scar. It would require alot of work but I think it would be great. Here is something that it could look like: This is a VB example

Public Sub NPC_Click(ByVal sender As RS.Object) Handles NPC.Click
Dim X As Integer
Dim Y As Integer

X = MousePosition.X
Y = MousePosition.Y

' Blah more code

End Sub

You could be able to write much better scripts because depending on what the script did makes the script act in a whole other way. I think this is a good concept the only thing is, we would have to re-write everything to be compatible with something like that. These are just my thoughts for now. Rate/Hate/Comment. Thanks.

~Camo

MylesMadness

2009-02-14 11:34:41

Um, scar 4.0 will be object oriented….

The_Shermanator

2009-02-14 11:47:21

From: Mylesmadness
Um, scar 4.0 will be object oriented….


How so? What will be in SCAR 4.0?

Nava2

2009-02-14 11:57:48

When was this told?

noidea

2009-02-14 11:58:39

What does linear and object oriented mean?

Bobarkinator

2009-02-14 12:06:12

From: noidea
What does linear and object oriented mean?


Object-oriented is class based programming, you can make your own objects by making different classes. There is also inheritance, and encapsulation involved with oop

MylesMadness

2009-02-14 12:14:07

From: Nava2
When was this told?
Someone where freddy at mopar said 4.0 will be oop

A G E N T

2009-02-14 12:14:11

From: Nava2
When was this told?

From: Freddy1990
Yes, Phoenix will feature full support for user-defined classes and such


I think the Wizzup & WT-Fakawi Multi Miner has a pretty cool implementation of it - as I recall they sort of used types as objects and had functions in them.

However, short of just brevity and clarity in scripts, I don't see how OOP would be that important in SCAR.

Kyle Undefined

2009-02-15 01:41:05

From: noidea
What does linear and object oriented mean?


Linear is when the program executes line by line. Object oriented is depending on what events take place determines the methods used to execute. I honestly think that OOP is good because the script basically adapts to what is happening. It was just an idea, I can't wait to see how Scar 4.0 is.

~Camo

NiCbaZ

2009-02-15 01:46:58

Scar 4 will be like this i think, its using a totally different Script editor/compiler.

Kyle Undefined

2009-02-15 02:21:39

Nice. I can't wait to see this.

~Camo

Nava2

2009-02-15 09:30:13

AKA we can use wrappers etc? Java like?

Method

2009-02-15 10:04:35

From: Nava2
AKA we can use wrappers etc? Java like?


Presumably not as efficiently as Java does, but there probably will be some form of encapsulation.

R0b0t1

2009-02-15 15:42:22

Object orientation is usually needless bloat. The compilers/interpreters need to do lots of restructuring to simply get it to run.

Linear programming is in no way restricting, either. Name one instance where it is.

Dan Cardin

2009-02-15 18:24:49

we would have to re-write everything to be compatible with something like that.
we?

Object oriented is depending on what events take place determines the methods used to execute. I honestly think that OOP is good because the script basically adapts to what is happening.
o rly? you cant do that now?

honestly, i dont see many instances, in which the majority of people will find OOP to be terribly useful, unless they're making a game or something.

R0b0t1

2009-02-15 19:29:50

No. You're terribly wrong. What you *might* be thinking about is self-modifying code, however, the idea that you presented would be impossible to implement. Self modifying code is usually reserved for packing executables or creating fast algorithms on limited architecture.

mixster

2009-02-16 05:15:36

Scripting for Runescape is too linear to be benefited by OOP. Events? The only event would be randoms, in which case the whole main loop would have to be held anyway. If you wanted OOP in the style of having one object hold everything, you can still do that through types that hold function references to the various functions, though I don't see the need for that except when it holds varying function references. Only outside of the main area for Scar is where it would be useful, so utterly pointless.

On the other hand, think of the children!

Nose Smasher

2009-02-17 12:26:45

What would be the advantages of OOP for SCAR? and what are the disadvantages of Linear?

Correct me if I'm wrong, but it doesn't seem too practical to switch…

Dan Cardin

2009-02-17 17:19:40

From: nose_smasher
What would be the advantages of OOP for SCAR? and what are the disadvantages of Linear?

Correct me if I'm wrong, but it doesn't seem too practical to switch…

it doesn't seem too impractical to add it, but i doubt many people that are making rs scripts will use it or need it.