Standard Coding Library Needed?

Posted By: i_program_games

Standard Coding Library Needed? - 10/25/07 16:06

I am wondering if anyone would be interested in a "standard" library. The library would be open source and maintained by the 3d Game Studio Community with the purpose of using the most widely accepted and quickest routines. How many times will we write functions to map keys? Initialize controls? Or how about a QuickSearch function? In my opinion this differs from the templates in that the templates are designed for 1 click solutions and not necessarily for code reuse. If there is enough interest I'll host the site (which I already have) and start a forum. Code like Mystic could also be added with permission of the author and improved if needed by the community.
Posted By: TWO

Re: Standard Coding Library Needed? - 10/25/07 16:32

I'll release exactly such a project to the community soon.
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 16:46

I'd like to host all proposed library code in once place as many contributions seem to become lost and unknown as time goes by. We'd always have links to the latest library as well as version control etc. How does this sound.

P.S. I don't care if it's posted in multiple places but I'd like to know if it exists that there is always one place I may find it for sure.
Posted By: ventilator

Re: Standard Coding Library Needed? - 10/25/07 16:46

i was just thinking about something like this yesterday. a lite-c standard library really would be great!

what i miss in lite-c are ready to use data structures like vectors or maps in the c++ standard library.
Posted By: TWO

Re: Standard Coding Library Needed? - 10/25/07 17:02

Hehe, ventilator that was the reason for me to start such a lib. Currently there are LinkedLists, Nodetrees, PriorityQueues, Queues and Stacks, all well documented in Acknex-Docu like way

More ideas?
Posted By: ventilator

Re: Standard Coding Library Needed? - 10/25/07 17:30

can you give some usage examples for nodetrees?

what i would find very valuable is some kind of an associative array (for example like a c++ map or a python dictionary).
Posted By: Thracian

Re: Standard Coding Library Needed? - 10/25/07 17:46

I would highly appreciate such a library, but i wish that there would be "simple code" for modelleres as well
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 17:51

There are many such data structures known as "trees". Wikipedia explains different ones here . However, I don't know where they are referenced in the documentation. Anyway, they can be created with a one dimensional array.
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 17:52

Quote:

I would highly appreciate such a library, but i wish that there would be "simple code" for modelleres as well




Please give an example of what you would find useful.
Posted By: TWO

Re: Standard Coding Library Needed? - 10/25/07 18:03

Nodetree code from the testing unit:

Code:

// Nodetree test
AG_Nodetree* Nodetree = AG_NodetreeCreate();

AG_Nodetree* NodetreeChild1 = AG_NodetreeAddChild( Nodetree );
AG_Nodetree* NodetreeChild2 = AG_NodetreeAddChild( Nodetree );
AG_Nodetree* NodetreeChild3 = AG_NodetreeAddChild( Nodetree );

AG_NodetreeSetItem( NodetreeChild1, "Nodetree: 1" );
AG_NodetreeSetItem( NodetreeChild2, "Nodetree: 2" );
AG_NodetreeSetItem( NodetreeChild3, "Nodetree: 3" );

AG_NodetreeRemoveChild( NodetreeChild1 );
AG_NodetreeRemoveChild( NodetreeChild2 );

AG_Nodetree* NodetreeTemp = AG_NodetreeGetNext( Nodetree, NULL );
Value = AG_NodetreeGetItem( NodetreeTemp );
printf( "%s", Value );

AG_NodetreeRemove( Nodetree );



Please note that the notetree structure is one of the more advanced structs resulting in more code.
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 18:06

Sweet Now I think I know what you were saying. Apparently you have been working on data structures such as this for a library you are putting together correct?
Posted By: Thracian

Re: Standard Coding Library Needed? - 10/25/07 18:08

Quote:

Quote:

I would highly appreciate such a library, but i wish that there would be "simple code" for modelleres as well




Please give an example of what you would find useful.



I would find useful:
- Codes that fit to the Templates or improve them, like Basic Movement (like the Kingdom Hearts Code) or higher stuff like inventory, fighting scripts, etc.
I think thereīs a lot of that kind on the Web or in the AUMs, so ready to use versions qould be great
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 18:25

Whatever we build should be usable by any script and could be used in conjunction with the template scripts. I believe the aim of the code should be "modular" where scripts are as self contained as much as possible. Any standard code added to the library would simply need to be defined well with help from members of the GStudio community such as yourself. In other words, yes. We can add that kind of code provided we know exactly what is needed that has not already been provided for in the templates.
Posted By: TWO

Re: Standard Coding Library Needed? - 10/25/07 18:26

Hmm, this is not the content I'm aiming for. The primary target for this lib is to support programmers with stuff they need every day. Genre specific things like inventars won't be in soon.

Edit: As you can see, I won't just release the lib but maintain it to keep the code quality as high as possible. I'm going to explain later what this means for authors who want to write stuff.
Posted By: mpdeveloper_B

Re: Standard Coding Library Needed? - 10/25/07 18:29

i tried to get such a thing started a while back in the scripting forum, but no one contributed
Posted By: broozar

Re: Standard Coding Library Needed? - 10/25/07 18:31

let's call it... "templates"? uh... didn't we try something comparable with the 3dgs wiki years ago? why does noone want to continue and maintain the old projects instead of creating new, unknown ones?
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 18:33

Quote:

i tried to get such a thing started a while back in the scripting forum, but no one contributed


Well let's change that. I already have a website where we can all collaborate the effort and there is plenty of code already contributed out there we can add to the library. I believe a few people need to be dedicated to each "piece" of the library. For example, TWO can maintain the data structures part. What do you think about that TWO?
Posted By: TWO

Re: Standard Coding Library Needed? - 10/25/07 18:44

No

My lib is not a collection of scripts but a STL like lib. If there's somebody interested in your collection I can write some code for your collection as well, that's no problem. But I'll release and maintain my code anyway because I use it every day.
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 18:48

Quote:

let's call it... "templates"? uh... didn't we try something comparable with the 3dgs wiki years ago? why does noone want to continue and maintain the old projects instead of creating new, unknown ones?




I don't want to reinvent the wheel but I believe that the template code is targeted at the non programmer for the most part with the priority being ease of use by anyone as opposed to modularity. I'm not sure how they are structured now but when I was using the normal template (not template6) I found there was much code being pulled in that I simply didn't need. Worse yet, when I tried to copy only what I needed I was led to many other files. I want the option to work WITH the templates not to REMAKE the templates.
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 19:05

Quote:

My lib is not a collection of scripts but a STL like lib.




I am not proposing finding all freely released scripts and simply calling them a library. I AM however, proposing that as a starting point. For example, I can look at MystyMood and code it in a library fashion (with the authors permission of course). Then it could become a standard weather library. Each library module would have to maintained by a person or persons. That person or persons would work with the general community in regards to enhancing the library. My #1 reason for loving this engine is the community, support, and contributions.
Posted By: mpdeveloper_B

Re: Standard Coding Library Needed? - 10/25/07 19:10

k, it's not a bad idea, if you wish i'll allow you to add any of my "contributions" to it, soon i'll be making a mod system, and if you want here's a couple of codes that can be added:

http://www.coniserver.net/ubbthreads/sho...be6033780759653
http://www.coniserver.net/ubbthreads/sho...be6033780759653
http://www.coniserver.net/ubbthreads/sho...be6033780759653
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 19:30

Sweet, Manslayer101. I'll be adding your code. Tonight I will begin to create the facilities for maintaining the code including the use of WinCVS and PHProjekt. Once its up along with the forum I'll be taking requests for code maintainers and such.
Posted By: Slin

Re: Standard Coding Library Needed? - 10/25/07 20:53

If you have the time to create something like that, why don`t you just help to improve existing stuff.
Here are 3 pages with a similar goal you have (collect resources):
http://www.gstools.de/
http://www.coniserver.net/wiki/index.php/Main_Page
http://au.conitec.net/

Oh and if I understood it right, the new templates are going to be exactly what you are for.

There are much more pages trying to do something like that, they all didn`t succeeded because of the big amount of work and the other already bigger libraries.

Oh here is another collection: http://www.realspawn-productions.com/wdl/wdlindex
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 21:34

These resources are great and I am going to use them for this library project. I also want to clarify what exactly I am trying to accomplish. Most of the time I see scripts they are hard coded and not robust. I'm looking for a robust solution. As opposed to 50 scripts that each do fire I want 1 function that can do 50 fires. It's all in the design of the functions. I am a programmer by profession and see where many of these scripts out there can be coded in a more flexible manner. ROBUST is the word I'm looking for. I'm not trying to reinvent the wheel.
Posted By: Slin

Re: Standard Coding Library Needed? - 10/25/07 21:39

Then, why don`t you just use the 3DGS wiki for that?
The wiki will last while your page will may be gone in some years.
Did you know Grimbers 3DGS tutorial site?
Posted By: i_program_games

Re: Standard Coding Library Needed? - 10/25/07 21:45

I am an open minded individual. If the wiki is the most logical place then I'll use it. What thread would you suggest. And no, what's the link to Grimbers.
Posted By: Felixsg

Re: Standard Coding Library Needed? - 10/25/07 21:57

for me a code repository (I think is that word) is a great idea like the open sources programings tools for linux have a ton of code for not need to break your head thinkink how make one thing is other have the solution
Posted By: Slin

Re: Standard Coding Library Needed? - 10/25/07 21:59

Grimbers site was meant as an example of an amazing collection of user tutorials, which doesn`t exist anymore...

If you haven`t got it yet, create a concept on how you want to structure it. If you have done that it would be great if you could present it here and then after some dicussions or not may redesign this: http://www.coniserver.net/wiki/index.php/Scripts

Or may first create a new site in this one which could later replace the already existing.

That is for c-script and lite-c script.

I like the shaderpage already a lot it is only missing some effects. I think about doing that when I`m home in germany in about two weeks.

This is just what I think would be best...
Posted By: DEX

Re: Standard Coding Library Needed? - 10/26/07 16:58

I have a great expirience with Macromedia Director which have Behaviors very simmilar to actions. There we have user Behavior (actions) library and that is fantastic help to developers. With very few adjustments you can make game even if you arent programmer.
So I think that such library for 3dgs will be a huuuge help to all guys who dont want to mes up a lot with code.
Also there are lots of Behavior sites for director where everyone can upload behavior with all descriptions. I see no reason why we dont have it here. Lets make it!! I will contribute part of code from my DEXON game.
Cheers
Posted By: Thracian

Re: Standard Coding Library Needed? - 10/26/07 18:32

Thatīs very nice to hear
Posted By: TWO

Re: Standard Coding Library Needed? - 11/26/07 18:44

I'll misuse this dead thread to post previews of my work on the "AwakeLib" project here.


Posted By: i_program_games

Re: Standard Coding Library Needed? - 12/20/07 21:47

Just letting everyone know this is not a dead subject and is will be established within the next month. Here is how it will work:

1. Code library will consist of dll's, cscript and lite-c.
2. Code will be under version control and managed.
3. Those who join in the development will be able to add/edit the code base with the goal being robust, optimized, reusable code.


Why's this different from the templates?

Templates are great for fast development in that they are designed to be altered to ones specific needs. However, for every new project the template must once again be altered. With a library the idea is to alter the behavior of the code through variables as opposed to changing the code itself.


Why support Cscript, lite-c and dlls?

Cscript is the most limited of the languages we will make libraries from. It simply does not have as much flexability as lite-c or a dll. However, I understand many are still using Cscript and will make sure libraries exist for both Cscript and lite-c.


Won't this just be another collection of code?

No. The goal of this project is to provide "robust, optimized, reusable" code. This means that the goal is have only one set of code for a specific need. For example: One set of movement code for all movement needs, one set of camera code for all camera needs etc. Though I understand it may be "impossible" to suite everyones needs if we provide enough flexibility and functions one should have little trouble creating exactly what they need with the library.


Will code from other sources be added?

I recognize there is much talent in the GS community and would be a fool to not take advantage of this fact. If the code on these other sources is provided with the permission to use as one sees fit then some of the code from these other sources will be "adapted" into the library.
© 2024 lite-C Forums