Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Monsieur OUXX on Fri 22/12/2006 21:16:33

Title: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Monsieur OUXX on Fri 22/12/2006 21:16:33
Module : AGSH
Latest version : 0.908
Latest Phase : Phase 1
AGS version : 2.72

What is this module for?
Abstract of the presentation page (http://ottl.free.fr/ouxx/agsh/):

QuoteAGSH is a (set of) modules for the Point'n'click games engine « AGS » (http://www.adventuregamestudio.co.uk/ ).

The nature of AGSH is plural  :

   * Lowest layer : META-LANGUAGE, adding some new features to the native script language of AGS
   * Middle layer : FRAMEWORK offering complex data structures, event handling, etc.
   * Upper layer : MODULES (converted from famous AGS modules) designed to be integrated in an elegant and homogenous way to any game.

If it's not clear for you what the module does, read the highlights of every version new features.
Versions:
0.901 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29523.msg379295#msg379295)
0.908 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29523.msg406970#msg406970)


How to use it? Read the manual (http://ottl.free.fr/ouxx/agsh/manual.htm)
Download it :
- Click the download link on the  presentation page (http://ottl.free.fr/ouxx/agsh/).
- If it's broken : download here (http://ottl.free.fr/ouxx/agsh/AGSH_0.908.rar)
It comes as a RAR file containing a game which modules contain AGSH



2010/06/24
The module is currently being hugely refactored. I'll update the thread when it's done.
Title: Re: MODULE : AGSH (AGS Hack) --> Object Oriented Programing in AGS? =)
Post by: monkey0506 on Fri 22/12/2006 22:19:49
Feel free to rename this module to AGShack. That's right...A-G-Shack. Love shack. AGLoveshack. :P

How the hell are you gonna go and do that anyway?...I demand to see this module. Now. So hurry up. 8)
Title: Re: MODULE : AGSH (AGS Hack) --> Object Oriented Programing in AGS? =)
Post by: Gregjazz on Sat 23/12/2006 01:41:54
You geniuses, you. :)

So many good modules coming out lately...
Title: Re: Coming soon: AGShack module: Object-oriented programming
Post by: Monsieur OUXX on Tue 09/01/2007 12:14:25
AGSH VERSION 0.901



New features

- Everything (this is the first version  ;))



New features highlight
In it's current state, here is what you can do with it. These things are not allowed by AGS native script : ( AGSH pseudo code, written the AGS way)

struct MyStructA {
    int aMember = 12; //(1.) members initialization with default value;
    static int aStaticMember = 23; //(2.) static members with (3.) default value;
}

struct MyStructB extends MyStructA { //(4.) inheritance is allowed by AGS but will be enhanced
    MyStructA innerStruct = null; //(5.) this member has a custom-class type
    MyStructA innerStruct2 = new MyStructA (); //idem, plus (6.) initialization value
}


void MyFunction(MyStructB objectParameter) //(7.) an object as parameter (allows in/out parameters)
   ...
}






FAQ :
- There are only few features; this module is much less interesting than expected
The project is divided into several phases. Version 0.901 is the first one reaching Phase 1 goals: classes definition and inheritance of members. Phase 2 will add definition of methods within the classes and phase 3 will add a garbage collector. Other phases will follow, adding the framework.

- what can I do with such an unfinished module?
Try to define some classes and to extend them from built-in class "Object". Test the system.

WARNING : AGSH is implemented only until module "AGSH_TypingSystem"; all following modules MUST NOT be used, except for initializing the system ( i.e. calling AGSH.Initialize() and AGSH_Core.Initialize() )
Title: Re: MODULE : AGSH v0.901 - Object-oriented programming
Post by: Monsieur OUXX on Tue 26/06/2007 20:32:26
AGSH VERSION 0.908



New features

- base classes "Int2", "String2", "Vector2"
- comparators
- search by comparison within vectors



New features highlight

Now, when you create a class, one line of code is enough to define a comparator for this class.
When a class has a comparator; it allows to search instances of this class in vectors without having to iterate by yourself through the elements of this vector. Just call the AGSH_Vector.FindObject method and you're done.



FAQ :
none

WARNING : AGSH is implemented only until module "AGSH_Core"; all following modules MUST NOT be used, except for initializing the system ( i.e. calling AGSH.Initialize() and AGSH_Core.Initialize() )
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Construed on Sun 13/02/2011 01:54:21
link please!
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: monkey0506 on Sun 13/02/2011 02:17:39
If you would read the first post you would find that there is not a current version of the module available because the author is revising it.

May I ask though what were you intending to do with this module?
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Construed on Sun 13/02/2011 02:50:51
I just wanted to try diffrent programming methods.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: monkey0506 on Sun 13/02/2011 03:53:01
This would not prevent you from having to learn AGS scripting. It was just designed to simulate a second language within the AGS script. So essentially you'd have to learn two languages to take advantage of the methods this module offered. I don't think that it would be very helpful to a scripting beginner.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Construed on Sun 13/02/2011 05:03:04
Ah, i see.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Dualnames on Sun 13/02/2011 06:10:45
I do have the link for that. If you want it let me know.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Monsieur OUXX on Mon 14/02/2011 11:54:21
I discourage the use of it as it is now. (that's why everything is striken through -- I've been refactoring it so much it has nothing to do with what it was when I first posted)

That early version is a pile of crap, and I don't even remember if it works (I think someone reported that the version I released was missing some macros, that I had removed by mistake when stripping the module down to the bare minimum)

If you really feel like using it, let me know : I'll reload it, see if it works, and give you some guidelines.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Construed on Wed 16/02/2011 06:34:47
Ah, I see.
My wife is getting into oop.
I'd be glad to get a copy of your past work, if your new version doesnt pertain to oop.

Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: monkey0506 on Thu 17/02/2011 17:17:43
I think you're still not understanding what this module does, but it's up to you if you want to try and make sense of it I guess.

AGS is already partially object-oriented. That's why you can do things like cEgo.AddInventory and cNPC.ChangeRoom. Not every function and property in AGS is object-oriented, but that is still not what this module does.

You can create custom structures of which you can create individual instances, as well as arrays of instances. Every instance of your structure is, by definition, object-oriented. You can have normal variables, pointers to built-in AGS types, and functions in custom structures. You also have access specifiers such as protected and writeprotected which apply to both functions and properties, and the static access specifier which applies to functions.

What this module does do is it attempts to simulate other features of common OOP languages. Particularly AGS does not allow pointers to custom structs, or instances of custom structs within other custom struct types. Also you cannot use custom struct types as parameters to functions.

This module does not allow you to do any of this natively.

What it does is it provides methods by which you can simulate this type of behavior. Doing this in native AGS code is not a user friendly way of scripting, more-so for a user who constantly has to ask questions about AGS scripting.

Using this module does not abstain you from having to learn AGS scripting; it actually requires a much, much better understanding of it than you have, as indicated by the threads you have started.

But if you insist that you want to use it, don't say you weren't warned.
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: Monsieur OUXX on Fri 18/02/2011 09:25:15
the OOP never got to be fully implemented. In its most advanced version, AGSH was offering dymanic allocation/disallocation of structures, using some sort of POINTERS system.

That's the main diffrenciator with its "challengers": Pointers.

I don't think you're interested in pointers.
Maybe you should have a look at the "Luags" plugin instead?


Quote from: monkey_05_06 on Thu 17/02/2011 17:17:43
Doing this in native AGS code is not a user friendly way of scripting
HEY! Eventually it was going to be  :=
Title: Re: MODULE : AGSH v0.908 - Object-oriented programming
Post by: monkey0506 on Fri 18/02/2011 23:41:41
I was just trying to drive the point home that this module was never intended to, and in none of its incarnations ever did, preclude knowledge of the AGS scripting language.

The impression that I have gotten from GrimReap's inquiry is that he was trying to find a way to by-pass learning the AGS scripting language, which short of using AGS 2.72-, is not presently possible if you're planning on using AGS.

I always somewhat enjoyed seeing what you were attempting to accomplish with this, but at the same time, I recognized the limitations that the current engine imposed on you, and thereby what the module usage actually entailed. Hopefully in the near future the engine will be open-sourced so we can deal with these types of things more efficiently. :)