
02-23-2006, 10:42 PM
|
|
Ruler of the graalaxy
|
Join Date: Feb 2005
Location: Great Britain
Posts: 488
|
|
|
I hardly consider GS2 an OO language. It has some OO concepts yeah but it's not completley object-oriented.
While each NPC does act like a class you cant make relationships between them (either inheritance or association) you can 'inherit' the classes in the class list on the server (which are basically deferred classes). I can call functions on an NPC by using triggeraction but really I should be able to do npcname.functionname.
I can't do this: object = new Class(); (Please correct me if i'm wrong) which means I cant pass objects around. Sure there's the player object which can always be accessed but sometimes it can be useful. (Admittedly not often given the usually small nature of scripts in graal.) While GS2 has some OO concepts its OO model is quite limiting. Though of course it is just a small scripting langage and not a full programming language and doesn't really need a sophisticated object model.
Anyway, what you have there might be quite useful to non-programmers but some of the explanations might serve the opposite purpose you're using terms like code block without saying what a code block is also, i'd use GS2 only. Doesn't make sense to say "Here's some code but don't do it like this." it's like teaching java and saying "Heres an example GUI in AWT but you shouldn't use AWT you should use Swing or SWT."
oh well just my $0.03 (Damn inflation.) |
|
|
|