Idea: AGS function archive

Started by stuh505, Wed 05/05/2004 04:11:05

Previous topic - Next topic

stuh505

There are a lot of cool ideas and features for AGS that don't REQUIRE additions to AGS itself.  wouldn't it be nice if there was a searchable library of pre-written functions for AGS that could be accessed from this website?  Users could upload their functions along with PRE/POST information and it would be added to a searchable database.  This would increase the overral quality of games created with AGS by allowing designers to waste less time re-writing code that has already been written before.

I think this would be even better if AGS supported a way to include libraries that contained lots of functions that could be written by AGS users, so all you had to do was download "m_cutscenev2.inc" put it in the AGS include directory and then type "#include "m_cutscenev2.inc" in the script header.


Gilbert

If there're useful functions, they'll be moved to the technical archive forum.

But a thread with user-written functions can be cool (though I think it's been done already, only was it didn't get much publicity and I'm too lazy to dig it up.)

stuh505

Not the same thing.  The entire purpose is to speed things up...if someone has to browse a forum looking for something not knowing if they will find it or not, and then when they do find it it might have little or no specifications included in the post...and then the functions would be mixed in together with other material...in other words a jumbled mess that doesn't end up saving any time.  When there is a nice clean database, it also encourages users to go out and write good modular code that can be reused by other people because it is a way to give back to the community and you know you'll get appreciated for it.   Plus, user's can vote on code, and you can see how many other people have downloaded it etc, to give you an idea of what's good.  And as new functions are added, it can have a little news thing that lets you know what's new.

I know this would work because I've used this before on other game development engines.  For example: Last summer I was working on a game and one of my projects was to develop animal AI.  Instead of just using it in my game, I ended up spending 100+ hours writing a set of libraries and functions to build a realistic biodome full of plants and animals that were born, lived, died, hunted for food, used different hunting tactics, grew hungry, angry, etc, with good style and documentation so that the NEXT person who wanted to add all this into the background of their game simply had to download it.  Why did I do this?  Because I knew there was a good database and I could watch the # of downloads ticker go up and see for myself that this was helping other people and that made me feel good.

How does anything great get accomplished in this world?  Everyone adds a little bit.  It took a lot of work to develop computers and software to the level they are at now.  This same philosophy can be applied within AGS with community members building on other's work to create a level of detail impossible otherwise.

Ginny

#3
I like this idea a lot! It seems like writing my own functions is the most fun though, but complicated functions in a database would be great. Also, I'd be glad to add all I cn to it, and it would encourage people to write functionsmore generally, thus making them more flexible for other people and for their own other games.
:)

stuh505: Wow, a complete Animal AI system? That's incredible! What was the development system you made it for? I'd be very interested to see it. You've inspired me to try doing something like this in AGS. Not neccessairilly animals, could be a city/town/something simple first, but animals are the ones that intrigue me most. *cracks open her nature encyclopedia CD". :D
In fact, I've been messing with AI ideas for a long time, in combination with non-linearity. I like the whole aspect of building a world as a base for everything, with rules etc, which would become a complicated task, but would then allow for just about anything to happen there. :)
Try Not to Breathe - coming sooner or later!

We may have years, we may have hours, but sooner or later, we push up flowers. - Membrillo, Grim Fandango coroner

stuh505

Ginny,

I made it for Bioware's Aurora Engine for Neverwinter Nights.  It's sort of like AGS in that you get pretty much complete control over everything with scripting but it's in a 3d environment.  Yeah, I got pretty carried away with this project...I actually did a lot of animal research, to get realistic constants for how long animals could go without food, how much food different types of animals consume on average, and what ratio of an animals bodyweight was edible.  Plants would reproduce asexually and then herbivores would look for food that was in visual line of sight, or communicate to other members of the same species, and also remember food locations.  Carnivores would hunt other animals and some would also eat freshly killed animals that they found.  When the meat was eaten off a dead animal it would be replaced by bones which would eventually decay.  I tried to program realistictally and modularly the reactions between animals...for instance, if a carnivore was threatened by another carnivore of smaller size it would fight back...but if it was attacked by a carnivore of larger size, it might flee.  Stuff like that.  I also programmed in for animals to reproduce with miniature versions of themselves (babies) after certain durations, and these babies would evenutally turn into adult sized versions.  Animals could also move across between screen areas.  This allowed for animal populations to actually gradually move around from location to location.  Eventually I realized that my little creation was a bit too indepth, because it was extremely difficult for a game designer to design a STABLE ecosystem...so I ended up removing a lot of the features, such as dynamic population sizes, and making it so that whenever an animal is eaten a new one would be born -- this would make it so that the population ratios would be as originally designed by the game creator.

Ginny

 :o
This is the first time I've used this new smiley, as I'm not too fond of the new style for them, but this simply requires it!
Is there an actual executable download to test this out, or is it a plugin? I would love to take a look at it, even if I have to download the Aurora engine for it... Is it still available onlone?
This is inspiring me to try and make a world as a basis for a game. I was thinking of doing something simple, like a swamp area with mainly plants and mosquitos and other bugs, for a simpler start. ;)
Try Not to Breathe - coming sooner or later!

We may have years, we may have hours, but sooner or later, we push up flowers. - Membrillo, Grim Fandango coroner

stuh505

#6
well the script can be found here:

http://nwvault.ign.com/Files/scripts/data/1061870846093.shtml

I know you can download the beta of the aurora toolset from bioware, perhaps even the full version, but it would be pointless because unlike AGS it doesn't compile into a standalone executable, it must be run from Neverwinter Nights so you would have to buy it :(Ã, 

it's a pretty good RPG thoughÃ,  :P

EDIT - ok, the above file will be useless to you if you don't have NWN because you won't be able to access the code.Ã,  So here is the actual code, which might help you to look over.Ã,  I have very good style so it should be easy to read.Ã,  I think some of the features I have mentioned have been removed from this version to speed things up.

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_ai_inc.rtf (function definition include file, 18 pages)

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_damage.rtf (script runs when an animal takes damage, 1 page)

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_death.rtf (script runs when an animal dies, 1 page)

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_heartb.rtf (script runs continuously on each animal (aka heartbeat), 1 page)

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_spwn_c.rtf (script runs on an animal when it "spawns" setting it to be carnivore, 1 page)

http://ardan-nights.org/members/downloads/nwn/scripts/an_animal_spwn_h.rtf (script runs on an animal when it "spawns" setting it to be herbivore, 1 page)

Pumaman

Adding something like this is definitely a good idea. There are some similar websites, like Dorcan's tutorials, the GAC site and so forth, which have example scripts; but having them all in one place would be good.

This has been suggested before - the trouble is finding somebody to do it. I'd like to, but unfortunately I have too much on my plate as it is, and realistically I don't have the time to write and maintain another database.

As for loadable modules - it's on my to-do list to allow multiple global scripts, so you could effectively load script modules in the same way as plugins. Can't promise when it will happen though.

Scorpiorus

#8
Maybe it's time to raise the idea stated in this almost one year old thread? http://www.adventuregamestudio.co.uk/yabb/index.php?topic=7054.0
What do you guys think? :)

Quote from: Pumaman on Fri 07/05/2004 21:01:37As for loadable modules - it's on my to-do list to allow multiple global scripts, so you could effectively load script modules in the same way as plugins. Can't promise when it will happen though.
Would be totally great!

SMF spam blocked by CleanTalk