TUST or "The community library"

Posted By: MasterQ32

TUST or "The community library" - 04/06/13 12:00

Hey Guys!

Two weeks ago i thought about some of my projects, discussed with some forum users about the "dying" forum. My conclusion:
We need some community project. But following my experience i knew that a game would fail and ends as another dead, unfinished project.
But what is doable for a lot of people is a collection of scripts, templates, models and so on. An expansion of the default gamestudio package.
The result is:
TUST
A script collection for gamestudio, providing a lot of new stuff or a little bit older stuff, but put together with a unified API.

What is it about?
It is about helping newbies to get an easier access to advanced stuff like lists, pathfinding, ... and it is about providing projects, snippets, templates for a quick start and better development of your own projects.

What is included in TUST?
  • Nodebased Pathfinding
  • Generic Linked Lists
  • Easy INI Access
  • Easy XML Access
  • Simplex Noise
  • DynamicModels (Generate models at runtime with a few simple commands)
  • ...
A complete list of planned features could be find here: TODO

Who can participate?
Everyone who wants to add stuff is welcome, just PM me. You need basic knowledge about Git and a GitHub account.

Where can i get it?
Just download the current package at
https://github.com/MasterQ32/TUST
or download the daily updated package here:
TUST
TUST Source only + Plugins


Where can i find the documentation?
Check out the git repository OR just take a look at the online documentation:
http://docs.mq32.de/TUST/
An offline documentation is available as well:
TUST Offline Documentation

How does it look?
Well, not everything in this library has visual impacts, but just take a look:






If you got any questions, suggestions, anything you want to tell us?
Just answer this thread!

Happy coding!
Felix Queißner
Posted By: lemming

Re: TUST or "The community library" - 04/06/13 12:36

Awesome project!

I'll pm you today or tomorrow. wink

Btw, what does TUST mean?
Posted By: Aku_Aku

Re: TUST or "The community library" - 04/06/13 12:42

In my opinion, even this idea is a good one, a script collection will not be enough to revive the community, if it is dying...
Needs more and more tutorials, that are more deeper and detailed than the others done before.
There are two good initiatives, the AUM's Unanswered questions chapter and the Awesomium 3D GameStudio Tutorium (i hope i qouted the proper name).
These things have to be develop more forward and maybe other ideas would be also useful.
Not only the newcomers but lot of older forum members are not well informed, how should things to do with this engine (for example me).
Unfortunately, the documentation is unprecise, deficient, and doesn't point out many many relationships and dependencies between the functions, objects, and so on.
Or, if it does this, the examples are so simple, and the are so scant comments, the reader can not use that (if there is example).
Posted By: fogman

Re: TUST or "The community library" - 04/06/13 16:52

pls, pls, pls...
Add a meaningful prefix to all files and functions, maybe "tust".
A bunch of procedural bmap functions would be nice. I got no time at all for the next 3 months, but maybe you can get inspired by "bmap.c" in
http://www.indiegamedeveloper.org/downloads/256kS.zip

The functions are not pretty, not stable, stupid like hell, quick & dirty, but they are a starting point.
Posted By: MasterQ32

Re: TUST or "The community library" - 04/06/13 17:23

@lemming:
If i remember right, in this forum there was always TUSC, a "mystic" program which made every game project to a "5 minute task". TUST is "The ultimate script template", so an approach toward TUSC.

@Aku_Aku:
You're right, it won't bring the newbiews back. But It's something. And could it be you meant Acknex Unlimited instead of Awesomium (A WebKit2 Framework)=

@fogman:
every API needs it's prefix, some examples: dmdl_create_mesh, list_clone, ...
Posted By: sivan

Re: TUST or "The community library" - 04/06/13 17:44

great idea and contribution, especially because the wiki is outdated and off.

imo it is not really for newbies, rather for a bit more experienced users, or serious hobbyists, exactly what I missed so far! AUMs are mostly okay for beginners, except some of the contributions...

a totally new deferred rendering shader pack is a brave plan laugh

I'm very happy to see the RTS template (atm I can't imagine a template for it, but I've never made or used templates), it is a hard thing laugh - I'm a great fan of this difficult genre. maybe I could help it by a simple grid/tile based pathfinder that can work for a limited agent quantity, which indeed requires an integrated map decomposition, movement, behaviour and AI system, but it can be kept simple. I think I can extract a simple but working package from my in development complex system as a refreshment.

a tiny terrain, vegetation, texture, and sky pack would be also not a huge work for me...
Posted By: MPQ

Re: TUST or "The community library" - 04/06/13 23:05

nice idea, indeed!

can anybody tell me the reason y the wiki is off? It may be a better idea to improve the wiki rather than startin a completely new project
Posted By: PadMalcom

Re: TUST or "The community library" - 04/07/13 10:26

@fogman: The idea of procedurally generated content (BMAPs, models, sounds, music, ...) has been in my head for years. When I finished the inventory system for TUST I'll start to implement some libraries.
Posted By: Tempelbauer

Re: TUST or "The community library" - 04/07/13 11:56

nice idea!

some annotations:
1.) i don´t like the name. ok it´s an insider, but for a powerful libary i prefer powerful names like "ACKrage" or something ironic like "jcl" (the "jocular coding libary", or recursively acronymed: the "jcl coding libary")

2.) till now the project looks like opensource crap (sources you can freely download from a repository and don´t work or are buggy like hell). dont get me wrong, i like opensource, but there´re 2 things which almost all opensource-projects do wrong: presentation and usability (getting started). just a github site is functional, yes, but not very attractive. in future i wish to see a simple page with screenshots of effects using the libary, some information about it, and a downloadbutton that links to the repo (not now, it´s too early). at least a neat logo would be cool. and usability-needs:
* a howto-video getting the libary included with applying a sample effect (or run a sample). it´s easier for beginners
* an grafical overview over the whole libary dividing the modules into categories (not only the doxygen page). i would advise to create a mindmap (with xmind) to do so. Its easy to manage and we have all modules visually at a glance
* runnable samples

3.) use the branch-concept to tag stable versions. it should be not only a common libary, but a useable common libary.

4.) add a license (MIT, Public Domain or something else) explicitly for clarity
Posted By: Rei_Ayanami

Re: TUST or "The community library" - 04/07/13 13:16

Though I do not really use Acknex at all anymore, I would highly recommend using a standard prefix in front of each function, even if they got their own prefixes.
Posted By: fogman

Re: TUST or "The community library" - 04/07/13 15:34

+1 (that´s what meant in the first place)
Posted By: WretchedSid

Re: TUST or "The community library" - 04/07/13 17:13

Originally Posted By: Tempelbauer

3.) use the branch-concept to tag stable versions. it should be not only a common libary, but a useable common libary.

Git has support for tags directly, which should be used instead. Branches are better for extra features (eg the inventory system should happen in a secondary branch and be merged back into master once its done).

I would also like to see people to use their own forks and submit pull requests instead of giving them direct commit access, obviously that would also imply some kind of peer review by the project maintainer.
Posted By: MasterQ32

Re: TUST or "The community library" - 04/07/13 17:38

I think we are just a bunch of git newbies, so maybe you could write some kind of short tutorial here. Would be awesome!
Posted By: HeelX

Re: TUST or "The community library" - 04/07/13 18:04

Originally Posted By: fogman
pls, pls, pls...
Add a meaningful prefix to all files and functions, maybe "tust"
Originally Posted By: Rei_Ayanami
I would highly recommend using a standard prefix in front of each function, even if they got their own prefixes.
It is funny: in the moment someone wants to build something code related, everyone gets uneasy about coding- and naming conventions.

My advice for you would be to take it easy and work in short, but intensive sprints. Everyone gets a task to write this and that in the next 2-4 weeks and then you invest one week into refactoring and making it pretty and stable. Then you release it.
Posted By: WretchedSid

Re: TUST or "The community library" - 04/07/13 23:51

Originally Posted By: MasterQ32
I think we are just a bunch of git newbies, so maybe you could write some kind of short tutorial here. Would be awesome!

There have been lots of great git tutorials that cover it much better than I could ever do. Give this one a shot, it covers the philosophy of git exceptionally well: http://www.jayway.com/2013/03/03/git-is-a-purely-functional-data-structure/
Posted By: PadMalcom

Re: TUST or "The community library" - 04/08/13 06:01

OT: I wonder if the decentralized structure is the only big "advantage" of git. If yes, I don't like it laugh The idea of branching, merging and RCs is not new and for SVN management there exist better tools.

I uploaded a simple inventory and a logging library. Movement code is next!
Posted By: WretchedSid

Re: TUST or "The community library" - 04/08/13 13:04

Originally Posted By: PadMalcom
OT: I wonder if the decentralized structure is the only big "advantage" of git.

No, but it's one of the key features that make it much more flexible than SVN. And you don't have to put advantage in quotes, it is a tremendous advantage over SVN wink
Posted By: PadMalcom

Re: TUST or "The community library" - 04/09/13 06:02

Quotes, that's my way of teasing people wink Maybe I'm already too old to willingly switch to new technologies... laugh
Posted By: WretchedSid

Re: TUST or "The community library" - 04/09/13 12:33

Damn old people! tongue
Posted By: themuzikman

Re: TUST or "The community library" - 04/09/13 15:13

Hey, wasn't there a project called TUSC many years ago back in the A5/6 days??? I think it was The Ultimate Script Creator, or something if I'm not mistaken. This obviously just reminded me of that haha
Posted By: Hummel

Re: TUST or "The community library" - 04/09/13 15:18

What a coincidence! tongue
Posted By: mk_1

Re: TUST or "The community library" - 04/10/13 08:28

Originally Posted By: Hummel
What a coincidence! tongue

I smell sarcasm.
Posted By: themuzikman

Re: TUST or "The community library" - 04/10/13 09:29

I do, too. I think some of us don't want to admit how old we are getting now! Hahaha...

I might have a low post-count, but I was in the 1000's at least back in the day. I forgot my user/pass so here I am.
Posted By: Helghast

Re: TUST or "The community library" - 04/15/13 07:58

RPG Toolkit code

You can add that if you want, released it some time ago for free laugh

regards,
Posted By: MasterQ32

Re: TUST or "The community library" - 04/15/13 08:26

okay, sounds good!
I've read about different licence models now and i think the zlib/libpng licence (http://opensource.org/licenses/zlib-license.php) would fit our needs.
@Team Members: Would it be okay for you to use this licence?
Posted By: PadMalcom

Re: TUST or "The community library" - 04/15/13 08:32

@MasterQ32: For me it is okay.
Posted By: 3run

Re: TUST or "The community library" - 04/15/13 11:17

MasterQ32@ it's ok for me either.
Posted By: 3dgs_snake

Re: TUST or "The community library" - 04/15/13 13:21

MasterQ32@ OK for me too.
Posted By: lemming

Re: TUST or "The community library" - 04/15/13 14:37

As I suggested it to you, of course for me, too.
Posted By: txesmi

Re: TUST or "The community library" - 04/16/13 06:57

ok
Posted By: MasterQ32

Re: TUST or "The community library" - 04/16/13 21:31

@Helghast:
I've added the RPG Toolkit to TUST. Is it okay for you to fill in your full name into the licence or do you want another licence just for your toolkit?
Posted By: WretchedSid

Re: TUST or "The community library" - 04/16/13 22:08

Could questions like these please be answered before merging in other projects? I wouldn't want to use a library which just merges in things left and right without caring for any license.
Also, who is going to maintain these projects? Who makes sure that they fit into the TUST ecoxsystem.

Right now it looks like you just want to merge as much as possible, quantity over quality. Why do you put it in a repo then? A FTP where projects could go to die would be much more effective and beginner friendly

Edit: That last sentence was a reference to sourceforge.
Posted By: 3run

Re: TUST or "The community library" - 04/16/13 22:24

Originally Posted By: JustSid
Could questions like these please be answered before merging in other projects?
Why do YOU care about it anyway? We merged any of your projects without asking a permission?
Originally Posted By: JustSid
Who makes sure that they fit into the TUST ecoxsystem.
WE make sure. The whole team behind the TUST.
Originally Posted By: JustSid
A FTP where projects could go to die would be much more effective and beginner friendly
Hm.. could you please go and try to troll someone else Sid? Instead of talking bullshit, you could create something useful.

And this goes to everyone, who likes to talk more that to do anything! If you willing to talk shit, better shut the fuck up.
Posted By: Rei_Ayanami

Re: TUST or "The community library" - 04/17/13 11:28

Wow wow wow, calm down 3run.

He is a moderator in this forum and just tries to be helpful. His comment is actually a real problem for your project, since missing licenses can lead to big problems for the users later on.
Also, his arguments are not without foundation. In its current state it is probably not the most useful thing for beginners.
All in all, he is NOT trolling you. He simply tries to help you - constructive criticism.
Posted By: alibaba

Re: TUST or "The community library" - 04/17/13 11:35

... with a bit of sarcasm laugh
Posted By: 3run

Re: TUST or "The community library" - 04/17/13 12:09

Originally Posted By: Rei_Ayanami
His comment is actually a real problem for your project, since missing licenses can lead to big problems for the users later on.
I'm totally agree with your statement, but! It could be said in more polite and right way!
Not by showing his negative attitude towards the project, and by this bullshit:
Originally Posted By: JustSid
A FTP where projects could go to die would be much more effective and beginner friendly
And yes, he is a moderator, and I wonder how could he allow himself, to talk like that to community members (community projects)?! I've found this very disrespectful towards other peoples, which spent their time! And towards the project itself! Plus I don't like to see, someone poking his nose into other people's business, let MasterQ32 and Helghast discuss this them selfs without a third person (moderator), who actually dissolves his language! As the project wasn't yet published or so, I don't see a reason for anyone to attack MasterQ32 or TUST this way!

Originally Posted By: alibaba
... with a bit of sarcasm laugh
I won't call that sarcasm.. It's a kind of a behavior which should be stopped from the beginning!


Edit: do we need a moderator to moderate other moderators now or what??
Posted By: PadMalcom

Re: TUST or "The community library" - 04/17/13 12:39

So the RPG toolkit was merged? What about my dialog lib? Now we have 2 dialog systems in TUST which is very dirty. When development continues like that I'll create an own branch. This collect-all-code-we-can-get behaviour is annoying!!! I feel the same as Sid except that I already put hours of my time in TUST.
Posted By: 3run

Re: TUST or "The community library" - 04/17/13 12:46

Originally Posted By: PadMalcom
So the RPG toolkit was merged?
It's in git, but I don't really see a reason for it to be there.
Originally Posted By: PadMalcom
This collect-all-code-we-can-get behavior is annoying!!!
Could you please tell me another example of merging all-in-all in TUST?? Why after merging single RPG Template (merging of which should be discussed with the whole TUST team, not like MasterQ32 did himself, acting like a boss), you talk (as I see not only you) like all of the stuff we have it TUST was included from a third side? It's doesn't contain any code snippets which were made before TUST, but those which are created by team members from scratch and they use almost same, user friendly API!
Posted By: WretchedSid

Re: TUST or "The community library" - 04/17/13 13:54

Originally Posted By: 3run
Originally Posted By: JustSid
Could questions like these please be answered before merging in other projects?
Why do YOU care about it anyway? We merged any of your projects without asking a permission?

I haven't released any stuff with an ambiguous license, so go ahead and merge whatever you want. I care about this because YOU want to make something useful for the community, which is great, and I fucking want to recommend this to others. But I can't, because licences are a real problem and copyright is something that actually exists, how do you expect me to recommend someone something that can get them sued?

Originally Posted By: 3run
Hm.. could you please go and try to troll someone else Sid? Instead of talking bullshit, you could create something useful.

You are right. I shouldn't have tried to point out potential issues with your perfect library dear glorious 3run. I sincerely apologize, I always forget my place in this world.
Posted By: 3run

Re: TUST or "The community library" - 04/17/13 14:18

Originally Posted By: JustSid
and I fucking want to recommend this to others. But I can't
This is just a matter of how much you want it to.
Originally Posted By: JustSid
You are right.
Thank you.
Originally Posted By: JustSid
I shouldn't have tried to point out potential issues
Ohh, don't say that, this makes me feel guilty...
Originally Posted By: JustSid
with your perfect library
It's not that perfect, as you might think, but thank you for at least some kind words.
Originally Posted By: JustSid
dear glorious 3run.
Yes, my dear?
Originally Posted By: JustSid
I sincerely apologize, I always forget my place in this world.
Oh, how nice of you.. Sincerely I have to say, that it's ok. you know, we all need to go throw this some times.


Greets
Posted By: mk_1

Re: TUST or "The community library" - 04/17/13 14:42

Kid's these days. I think, TUST is a nice idea, but you should really have some kind of project manager and maybe regularly skype meetings to ensure everybody's content with how the project develops.

I suggest to move this thread to User Contributions.
Posted By: 3run

Re: TUST or "The community library" - 04/17/13 15:00

mk_1@ We discuss farther development of the TUST in Skype everyday with all team members on, so we always stay connected.

Edit: btw, rpg toolkit made by Helghats was deleted from TUST, as at the end, we want to provide a base which will allow to create our own rpg template.
Posted By: PadMalcom

Re: TUST or "The community library" - 04/17/13 15:15

Quote:
Kid's these days. I think, TUST is a nice idea, but you should really have some kind of project manager and maybe regularly skype meetings to ensure everybody's content with how the project develops.


Totally agree! The second most important aspect is to release a working release candidate instead of coding and coding.
Posted By: HeelX

Re: TUST or "The community library" - 04/17/13 16:52

Are you working also on small samples? That would be great!
Posted By: lostclimate

Re: TUST or "The community library" - 04/17/13 17:03

Originally Posted By: 3run
Originally Posted By: JustSid
A FTP where projects could go to die would be much more effective and beginner friendly
And yes, he is a moderator, and I wonder how could he allow himself, to talk like that to community members (community projects)?! I've found this very disrespectful towards other peoples, which spent their time! And towards the project itself! Plus I don't like to see, someone poking his nose into other people's business, let MasterQ32 and Helghast discuss this them selfs without a third person (moderator), who actually dissolves his language! As the project wasn't yet published or so, I don't see a reason for anyone to attack MasterQ32 or TUST this way!



I dont think this was meant as insulting. I think it was meant to say that a ftp server with abandoned projects to snag pieces from here or there as beginners would be a better idea. I'm not sure I agree but it wasn't trolling the way I read it. And in honesty, if we did have a server like that it would also be a good place for newbies to see what NOT to do if you want your project iced.
Posted By: PadMalcom

Re: TUST or "The community library" - 04/17/13 17:15

@HeelX: Yes, every module contains a demo script that shows how to use it.
Posted By: Helghast

Re: TUST or "The community library" - 04/18/13 13:27

Originally Posted By: 3run

Edit: btw, rpg toolkit made by Helghats was deleted from TUST, as at the end, we want to provide a base which will allow to create our own rpg template.


That's okay, I didnt need any license/credit btw, it's released as-is, and is completely free to use in whichever way shape or form.

Maybe PadMalcolm can use it as a base to quickly create other code for the RPG side, I really dont mind laugh

Wether you use it or not is up to you, only thing is, I wont be updating the code anymore, but maybe bits of it are useful to others laugh

regards,
Posted By: PadMalcom

Re: TUST or "The community library" - 05/09/13 17:34

Hey guys, there were no updates for 2 weeks now, anybody still working with me? laugh
Posted By: Tempelbauer

Re: TUST or "The community library" - 05/10/13 10:40

the project seems to be dead... grin
Posted By: PadMalcom

Re: TUST or "The community library" - 05/10/13 11:15

Nope, as long as I'm working on it, it is not. But it won't be done as quick as a thought! I guess I speak for the entire team: If anybody wants to join us (s)he is welcome!

Next things we need is:

- Solid character & camera script for 1st and 3rd person movement
- Set of simple effects (Fire, rain, explosions, electricity, ...)

The complete todo list is here:

https://github.com/MasterQ32/TUST/blob/master/TODO.txt
Posted By: PadMalcom

Re: TUST or "The community library" - 05/10/13 11:15

I wrote a small article on TUST, also showing the finished menu:

http://www.jofre.de/?p=908
Posted By: 3run

Re: TUST or "The community library" - 05/10/13 11:25

Originally Posted By: Tempelbauer
the project seems to be dead... grin
If we don't write here anything, it doesn't mean that it's dead. We discuss everything via Skype.
Originally Posted By: PadMalcom
- Solid character & camera script for 1st and 3rd person movement
If you did not remove yourself from the discussion in Skype, you could know that I've already done the CCT character movement.
It needs to be adapted to the TUST API, otherways it's already done! Felix was about starting making the camera code as well!

I wasn't able to work on the project for a quit long time, cause I'm having some troubles in my real life, and thats why I'm not at city (where I have the TUST project with my CCT template). I'll be able to get back to TUST in next week or so, but there is no need to say that project is dead or so! If we don't write here anything, it doesn't mean that it's dead, as I've said above.

And you Pad, should be up to the discussion again! So you could be up to date with all that happens inside of the TUST! Instead of making plans on your own! But yes, as I see, you are the only one lately making some updates.


Greets
Posted By: Tempelbauer

Re: TUST or "The community library" - 05/10/13 11:45

of course i know that. the comment was meant ironically (maybe not clear enough)
Posted By: lemming

Re: TUST or "The community library" - 05/10/13 14:21

I think it would be helpful if you post logs of your Skype-Sessions. This way everyone can follow the development.
Posted By: PadMalcom

Re: TUST or "The community library" - 05/10/13 16:43

I prefer talking in this forum rather than in skype since skype histories are messy and there is a lot of OT jibber jabber. Furthermore, I'm using skype at work to communicate with colleagues and having a constant conversation (even if it is interesting) disturbes me.

So: Discussion in this forum? (At least for the most important facts) laugh
Posted By: MasterQ32

Re: TUST or "The community library" - 05/10/13 17:17

Okay, sounds good.
I will upload my changed at the "Slicers"-Template later (Dropbox is syncing right now).
I can do the camera stuff this evening (maybe also some kind of chase cam and orbit cam)
Posted By: lemming

Re: TUST or "The community library" - 05/10/13 20:40

Originally Posted By: PadMalcom
So: Discussion in this forum? (At least for the most important facts) laugh


I agree here with PadMalcom. This way it's also easier to "join".
Posted By: PadMalcom

Re: TUST or "The community library" - 05/11/13 10:23

I'll improve the bmap-library a lot with mirroring, drawing texts, circles, borders, lighten/darken bitmaps, ...
Posted By: HeelX

Re: TUST or "The community library" - 05/11/13 11:16

Originally Posted By: PadMalcom
I'll improve the bmap-library a lot with mirroring, drawing texts, circles, borders, lighten/darken bitmaps, ...


Are you doing that with per-pixel operations or with a bmap_process shader? If second, I could help you smile
Posted By: PadMalcom

Re: TUST or "The community library" - 05/11/13 13:38

Per pixel, to be honest it is just a [url=http://cimg.sourceforge.net/][/url] port of the fantastic cImg library to Lite-C. But thanks for the offer! laugh

EDIT: Unfortunately, it can not be used for real time operations, some functions need a few frames. bmap_process looks interesting but it is a lot of work to write shaders for each operation laugh
Posted By: MasterQ32

Re: TUST or "The community library" - 05/12/13 18:25

I've updated the documentation and started on a camera controller (a little lie the old from A6 times wink )



@OT:
My programming mood is back, yay!
Posted By: txesmi

Re: TUST or "The community library" - 05/15/13 10:30

hi,
I have been out of my hobbies for a while, but in the meanwhile I wrote a little system that works as a global state machines collection manager. I was wondering if it could fit on tust or it is reinventing the wheel xP

DOWNLOAD

I wrote it translucent for the user, where he has only to start the system, add new state machines and close the system at the end. All the added machines will run automatically.

It can manage any object pointer as machine holder (same concept as 'me' pointer in entity actions) and it is function pointer based. It executes functions with the state machine passed as first paremeter, where the state of any machine can be changed.

Code:
void stateHappy ( STMACHINE *stm ) 
{
   ENTITY *ent = stm_me ( stm );
   ENTITY *entFriend = stm_me ( stm_by_index ( stm_index ( friends_index ) ) );
   if ( entFriend->happyness > 50 )
      ent->happyness += time_step;
   else
      ent->happyness -= time_step * 0.5;
   if ( ent->happyness < 50 )
      stm_set_state ( stm, stateWretch, 0 );
   if ( ent->happyness > 80 )
      stm_set_state ( stm, stateSmiling, 0 );
}



In order to avoid any state change preference between machines I aded a system that ensures that every machine executes its actual function before been changed by another machine.

It can be used for automate almost eveything and the resultant coding style is normally quite clean and readable. Look into main.c to see it by yourself.

What do you think about this? Is it usefull?
Posted By: PadMalcom

Re: TUST or "The community library" - 05/15/13 11:24

To be honest, I don't get exactly what it does laugh Does it contain and manage states of objects? What's the differenece to assigning simple functions to Entities?
Posted By: txesmi

Re: TUST or "The community library" - 05/15/13 21:08

It is a state machines manager. It does what a state machine does: run a different script depending on a state. These state machines are usually contained in a switch case block inside the entity action. A function pointer based state machine avoids the need of this switch case, so does not matter the states amount of the machine. Each machine runs its state function straight. In the worst case, imagine the performance lost with a state machine with a hundred of different states running its last state inside a switch case. And then multiply it by a hundred state machines.

Mainly, the benefit of this code is that you can run function pointer based state machines without having any knowledge about what a pointer to a function is. Furthermore you get the benefit (not really big but necessary in some cases) of that next frame change that avoids the inherent advantage of the execution order. It has also the minor benefit of executing all the machines from a single array pass inside a single while loop. And the big benefit of been objects of any data type, not just entities. The machines do not need an object at all but there it is for its convenience.

This is not originally developed for tust but a code structure I usually write converted (with tust in mind) to an user friendly extension that I will certainly customize for my future projects laugh
Posted By: MasterQ32

Re: TUST or "The community library" - 05/15/13 21:11

i would like to see something like this in TUST.
I could use such state machines very often but then i'm to lazy to implement them in a good way.
Posted By: txesmi

Re: TUST or "The community library" - 05/17/13 12:59

Hi,

I uploaded to TUST the state_machine extension. Also uploaded the node based pathfinder converted to arrays. I have to admit that I don't know how to continue with it...
Posted By: MasterQ32

Re: TUST or "The community library" - 05/17/13 13:01

Sounds good. I will do the free flight camera now. I think about adding some kind of expansion of the network template into a network system.
Posted By: lemming

Re: TUST or "The community library" - 05/23/13 16:45

In case you plan any further network programming, I'm currently working on a network-library wrapper as a side-project.

It's intended to cover basic network commands in ANet, GSTNet and AckNet (or whatever the internal network lib is called) like
- client/server connection (already working for ANet/GSTNet)
- events and messages (already working for ANet/GSTNet)
- create entities (already working for ANet)

You choose the lib you want to use by a define.
It is NOT MEANT to cover everything the different libs provide. But to be enough for a simple tutorial chat or shooter. (Or more if you only use the message-event system.)

I thought this might be useful (and it has already prooven useful to me) if you want to switch the network engine for whatever reason.

At the moment it needs to be cleaned up and is very incomplete. The whole Acknet part is impossible for me anyway, because I have the Extra Edition.
Right now I have no time to work on it. Maybe after the AckCon again.

If you want it, PM me, or tell me here to add it to TUST.
Posted By: MasterQ32

Re: TUST or "The community library" - 05/23/13 16:53

Sounds useful, what are you guys thinking?

For myself i would have some non-gs related project:
A updater/update builder for a directory structure. It's not finished yet, but i think it will be reliable and easy to use. As a lot of people always try to include some kind of updater into their project i think this could useful.
Posted By: PadMalcom

Re: TUST or "The community library" - 05/23/13 17:54

I'd prefer a 100% working GSTNet or ANet solution. Just one network component is easier to maintain than 3 different ons.
Posted By: lemming

Re: TUST or "The community library" - 05/23/13 19:31

Originally Posted By: PadMalcom
I'd prefer a 100% working GSTNet or ANet solution. Just one network component is easier to maintain than 3 different ons.


But you'd have the advantage to maintain only 1 file, as you don't do direct calls anymore.

Example:
Code:
/// @brief (Server) Entfernt eine Entity im Spiel.
///
/// @param nethandle		das globale Handle der Entity
void net_EntRemove(var nethandle)
{
	#ifdef NET_USE_ANET
		enet_svent_remove(nethandle);
	#else
	#ifdef NET_USE_GSTNET
		GSTNet_ent_remove(net_GetPointer(nethandle));
	#else
	#ifdef NET_USE_ACKNET
		return;
	#endif
	#endif
	#endif
}



So if GSTNet would change its function to accept only handles or ANet changing to entity pointers, you'd have to change it for the whole code only one time. And someone having an ANet License could use it, where someone without could use GSTNet. That increases the potential user count for the libs.
Posted By: WretchedSid

Re: TUST or "The community library" - 05/23/13 21:41

Quote:
So if GSTNet would change its function to accept only handles or ANet changing to entity pointers

Other people who didn't know about API design also bought "I built my first library and used naming conventions that no one else used (PS: I used tabs for alignment. They call me edgy)".

Seriously, why should I use a library whose author can't even get the pre-processor directives right? I'm not going to lie, this is useless. And I'm not even talking about the issue that you are going with the lowest denominator here. This is just asking for trouble and maintainability problems.
Posted By: HeelX

Re: TUST or "The community library" - 05/23/13 21:51

@JustSid: I didn't followed this thread enough to know what you are talking about, but I would be interested into what you in particularily mean with those remarks about 1) tabs & alignment and 2) getting pre-processor directives right.
Posted By: Anonymous

Re: TUST or "The community library" - 05/23/13 23:40

@JustSid just so I don't get belittled on a public forum, can you tell a beginning coder(me) where I can learn these API design rules and the common naming conventions I should know?

EDIT_reply* Thanks JustSid. I'll learn the info.I have a question but will pm or new thread and stop hijacking.
Posted By: WretchedSid

Re: TUST or "The community library" - 05/24/13 00:16

Originally Posted By: HeelX
@JustSid: I didn't followed this thread enough

Me neither. I was just commenting about the post above mine.
1) The documentation: Look at the param, it's aligned with two tabs. The problem is that tab width differs on systems, so while indentation is fine using tabs (and the way it should be done), aligning lines is not. Use spaces for that, and the code will show up fine on every machine no matter the tab width.

2) Look at the #ifdef, #else and #endif spaghetti blob there is in the function. It's not only lacking any kind of indentation.

@malice There has been a google TechTalk called "API design and why it matters" (or so). Pretty sure you can find the slides and the talk itself via google. And with naming convention I meant that he uses a naming convention that is neither compatible with Acknex nor either of the two libraries that's getting wrapped there. So now you have three different naming conventions for three libraries. Though to be fair, he appears to be consistent in ignoring the other naming conventions and sticking to his own (which in itself is already a mix of two naming conventions). There is no common naming convention, but the rule of thumb is to stick with whatever the environment you are in uses.
Posted By: Wjbender

Re: TUST or "The community library" - 05/24/13 06:30

If you ask me (i know you did not) but im amazed like that ,that i will cimment ..@justsid not to attack on a personal level but really ? oh cry me a thousand rivers .. You complain about nonsense and thats okay you guys get to choose what you want for the project wich i can agree on is fine to turn down based on whatever reasons but to be frank you sound like a ninny coder ..dude dont make love to the code
Posted By: PadMalcom

Re: TUST or "The community library" - 05/24/13 07:01

Sid says true things but he cannot put it (socially) into words wink Using tabs for distances between multiple expressions is not regarded as "good design".

Example:

Code:
@param[TAB]nethandle[TAB][TAB]das globale Handle der Entity



Instead you should write:

Code:
@param[SPACE]nethandle[SPACE][SPACE]das globale Handle der Entity



Because spaces look the same on all machines while tabs don't.



Nevertheless, I think lemmings idea is a good one and I'd like to see the solution in TUST.

(BTW what you do there technically is called a Fascade Pattern that hides multiple functions, libraries and versions behind static code. I like it a lot and we use it quite often at wort.)
Posted By: WretchedSid

Re: TUST or "The community library" - 05/24/13 07:01

Originally Posted By: Wjbender
@justsid not to attack on a personal level

Go for it, sticks and stones may break my bones, but words... Nah, I have a pretty big ego, just go for it.

I think good API design is important, I'm not the only one who thinks so (yes, I would also jump from the bridge if my friends jumped from it. Because I would no longer have friends anymore). The problem is, arbitrary API design is going to bite you and your users in the ass at some point, and statements like "what if Anet changed from handles to pointers", simply shows that the one who made that statement has no idea of API design.

Not to mention that shims in general are just asking for trouble. There are a million out there, and the older they get the more broken they become. Look at the _stat() function in the Windows POSIX shim, it's broken beyond recognition because Windows ACL system just doesn't fit on top of the unix groups and user ideology. You are going for lowest denominator here, is that really desirable?

I'm sorry for saying that directly, but what do you want me to do? Pretend like it's super awesome and like baked awesomeness, "but..."? I wrote, and still do, awful code too, and if people didn't tell me, I would never learn.
Posted By: sivan

Re: TUST or "The community library" - 05/24/13 07:26

nearly offtopic sorry: does there any comparison exist in connection with atnet, gstnet and the default 3dgs network package? thanks.
Posted By: Wjbender

Re: TUST or "The community library" - 05/24/13 08:34

Agree on alot you say sid , you make good and valid points true , but isint that just a commented line with the tabs ? Really ? I dont get it ..simple comments wit tabs in them is an issue ? I think that could be easily corrected...

As for the technical stuff i wont take you on and no not on a personal level ..
Posted By: WretchedSid

Re: TUST or "The community library" - 05/24/13 08:59

I mentioned the alignment problem with just one sentence in my original post, and just clarified what I meant when Christian asked me. But I actually think it's an important issue, take a look at these two gists:
https://gist.github.com/JustSid/211378039a4d53a83848
https://gist.github.com/JustSid/14004276a0a6b27d342e

They both align correctly in my IDE and with my settings, but the second version with tabs breaks everywhere where users use different settings.

I just assumed that, if there are tabs in the comments, he also used tabs in the actual source (maybe I shouldn't jump to conclusions, but that would make flame wars much harder)
Posted By: Wjbender

Re: TUST or "The community library" - 05/24/13 09:28

Agree that tabs could make code not easy to read or follow or display in a nice coherent manner ..totaly in agreement .

Perhaps it could be said that for future contributers that a standard has to be followed to somw degree , as for what precisily , you or a collection of the team could decide on a template to follow?
Posted By: Rackscha

Re: TUST or "The community library" - 05/24/13 10:18

about GSTNEt/Anet: Used GSTNet before Anet arrived. GSTNet is quite good, but NFS is not around here anymore. So in case of (internal)problems, noone can help.

Anet has some more features iirc, too. I know you have to buy anet, but its worht it.

I'll just stick to Anet.
Posted By: sivan

Re: TUST or "The community library" - 05/24/13 11:36

thanks. it's just a far plan to explore multiplayer possibilities of 3dgs.
Posted By: MasterQ32

Re: TUST or "The community library" - 05/24/13 11:56

@lemming:
i would split up your system into three files and make an include guard that just includes the one file for ANet, GSTNet or Acknex. So your code will be much better to read and maintain, but you should think a lot about your API before implementing it
Posted By: lemming

Re: TUST or "The community library" - 05/24/13 14:51

Wow, I didn't expected so many replies.

To clarify a few things:
Unfortunately it seems you thought this is meant to be some sort of plan. It is not. It is an IDEA. I posted the code just to show what I mean, not to show what great coder I am.
Here I want to quote myself:
Originally Posted By: lemming

At the moment it needs to be cleaned up and is very incomplete.


And because I made every mistake a programmer can make in my very little snippet, I shall comment on this, too:
Sid is right. Thank you for pointing on my mistakes (yeah really!). And I have no problems with his words, I grew up with the internet.
My code is poorly (if not horribly) written and I know NOTHING about API design.
That handle example was the very first I came up with and it even sounded stupid to me, but I had no better idea when I posted it. But Anet for example had an API change in some version that was not so minor.
The precompiler stuff is just that bad, because, well, I never did something that "complex" (more than one IF in a file) with precompiler commands. So I looked in the command list, "Ah, that might possibly work.", and it worked in the first test run. The rest was copypasta. I hate it when I do it Quick'n'dirty, but sometimes I fall for it.
Tabs? Well, dunno. Never thought about that. They are just easier to navigate than spaces.
Naming convention: Yeah, the code was written longer ago. I made several naming convention changes in my life just to find out which one just feels right to me. This one was very close to what I stick now (and believe is called "Camel Case") void prefix_someFunction(var someVar). (But for the CLTEXT lib I changed it to be compatible to the TUST convention.)
So much for my excuses.

About the lowest dominator:
Of course the lib covers only the stuff every other lib has in common. Everything else would be a pain to code. My intention was to ask "Does anyone need something like that?". And we are discussing about that. That's what I wanted.
Posted By: MasterQ32

Re: TUST or "The community library" - 05/24/13 15:51

I've added a small function: draw_font. It's usage is basically the same as draw_text, but allows you to render with custom bitmap fonts and some other features of TEXT
Code:
draw_font("Hello World", 16, 16, vector(0, 255, 0), font, SHADOW, 100);

Posted By: PadMalcom

Re: TUST or "The community library" - 05/24/13 16:32

Code:
And I have no problems with his words, I grew up with the internet.



Haha, this made me laugth laugh

I just added a (strongly) customized version of mystymood to the templates which is absolutely easy to use with just a hand full of functions.
Posted By: HeelX

Re: TUST or "The community library" - 05/24/13 19:33

I don't know why but somehow the tab- and the #define-thingy didn't caught my attention, for whatever reason - of course, I agree. Tabs are in a line a bad idea. Though, I still think that tabs are useful for indentation in if/else blocks, functions, and so on. It is just easier to use. On work, we have a coding policy which also requires whitespace as tabs. Since we use Eclipse as preferred IDE, you can still jump from indendation to indendation with just pressing a key, although they contain whitespace. For Lite-C, I use a pretty simple texteditor which doesn't support this (Programmer's Notepad; before that I used ConTEXT - but I found out that Notepad++ is neat, too). So in these cases, tabs make sense, because they are faster and easier to maintain than whitespace-tabs.

By the way, the slides of "How to Design a Good API and Why it Matters" of Joshua Bloch are to be found here: http://lcsd05.cs.tamu.edu/slides/keynote.pdf, thanks for the hint! There is also a short summary of all important points of the talk to be found here: http://www.infoq.com/articles/API-Design-Joshua-Bloch. --- But I guess it might be too abstract for most people - give them a coding guideline and they will read it; but give them a tech talk about API design, they certainly get questionsmarks raised above their heads. But you are absolutely right, the talk is great and the hints are very nice. Personally, I think the remark that "Code should read like prose" is the strongest one, it rings my bell.
Posted By: MasterQ32

Re: TUST or "The community library" - 05/24/13 19:50

Quote:
Programmer's Notepad
Omg, i'm not alone!
Posted By: Anonymous

Re: TUST or "The community library" - 05/24/13 21:18

@ Mod - Please move or delete this as per you need

Quote:
But I guess it might be too abstract for most people - give them a coding guideline and they will read it; but give them a tech talk about API design, they certainly get questions marks raised above their heads.


It seems the programmers left here are not really hobbyist. It feels like they are educated and in many cases professional coders. I should have stayed in school frown . This whole thing is moving so far way from the paint-by-numbers coders(me).

I'm spending time trying to translate programmer talk into coding-for-dummies. But I should be learning a high level of skill. I say this only because this threads OP subject is to aim for aiding beginner and there is no better platform to take a no-coder to a pro-coder then this engine and environment. So I ask will "you" the resurrection team please think about a long set of instruction materials that achieve that idea. From "How do I make a door open" to "How can I full use the winAPI and C++ functions to extent the scope of what I can go with this environments frame work".

I am working (in my limited ability) to give no-coders functionality in this environment which is part of what your goals are(as I understand them). And you are in a far better place to help people who are starting at the no-code level work in it and move them to the level you work in. Lets face it, beginners come to this with no-code skills and maybe learn from the scattered material to move to a place where I am (able to understand and use most engine instruction[but poorly] to create slow sloppy game). But there is a clear point (which I reached) at which users of 3dgs need to have higher level studies to fully create the things that you are able to.

This is turning into rambling-rant and I'm losing my point, but what I was hope for the "team" was not just a code layer system that helps people(beginner) for function fast but also a document(book [learn to program everything by starting with 3dgs] ,ect..) that lets them move from code-dummy to empower with a good foundation that head-starts them for formal studies in programming. Rant,rant rant...

Quote:
I think the remark that "Code should read like prose" is the strongest one, it rings my bell.


One of the few thing I could grasp in it and The heart of why I asked JustSid for the info. Thank you all so much for suffering the lesser user(me).
Posted By: Wjbender

Re: TUST or "The community library" - 05/24/13 21:53

"scattered material"
That caught my eye thats why i love what is being done here.

Tust is what the comunity needs , not just scattered contibutions all of which wont fit any specific api .. And best is they keep only what is good and usefull . Awesome effort ! Love the idea and love the management of the project , great collection of what is needed..
Posted By: MasterQ32

Re: TUST or "The community library" - 05/28/13 10:22

I've added a complex area fog or smoke effect:
Posted By: PadMalcom

Re: TUST or "The community library" - 05/28/13 10:36

... as well as a nice explosion:


Again, I want to encourage you to post every nice effect you made / found so that it can be integrated in the lib.
Posted By: MasterQ32

Re: TUST or "The community library" - 05/28/13 10:57

I've updated the first post, added some screenshots
Posted By: PadMalcom

Re: TUST or "The community library" - 05/29/13 09:31

Wow how added those nice items?? wink

I've got a wish concerning our API. When we do the first code freeze to polish everything we have so far, can we let ALL functions that the end-user should not use begin with an underscore "_"?

I like this style a lot because you see which function should be used and which shouldn't.
Posted By: Dveyee

Re: TUST or "The community library" - 05/29/13 09:40

Wow that's an impressive collection you guys have made so far. Looks promising! Keep it up!
Posted By: MasterQ32

Re: TUST or "The community library" - 05/29/13 11:49

@PadMalcom:
Just don't add your private function to the header files. They won't be documented with this.
Posted By: txesmi

Re: TUST or "The community library" - 05/30/13 22:29

Hi,
I have been working on a sytem that easily creates collapsable menues from texts.



Code:
TEXT *txtCamera =
{
	string =
	(
		".space=2",
		"Pan.slider=-180,180,1,%.0f,camera->pan,evnCameraLocate",
		"Tilt.slider=-90,90,1,%.0f,camera->tilt,evnCameraLocate",
		".space=2",
		"Distance.slider=10,200,1,%.0f,nCameraDistance,evnCameraLocate",
		"Arc.slider=1,179,1,%.0f,camera->arc",
		".space=2",
		"Ambient.slider=0,100,1,%.0f,camera->ambient",
		"Background color.sub=txtBackgroundColor",
		".space=3"
	);
}



Here is the first version far from been finished. What do you think? Is it valuable?
Posted By: PadMalcom

Re: TUST or "The community library" - 05/31/13 19:22

Looks nice and can be put into the GUI section. Do you already have access to the Hub?

EDIT: After a 3 days fight I implemented Voronoi Diagrams for the procedural part of TUST (my secret love). It can, for example, be used to generate random road networks for cities.

Posted By: sivan

Re: TUST or "The community library" - 06/01/13 15:40

cool. Voronoi Diagrams are also used for terrain analysis and subdivision into areas for pathfinding (or maybe for random terrain generation too, don't remember exactly).
Posted By: MasterQ32

Re: TUST or "The community library" - 06/01/13 16:32


Dynamic street generation
Posted By: PadMalcom

Re: TUST or "The community library" - 06/01/13 19:56



Drawing a spline between several points.
Posted By: HeelX

Re: TUST or "The community library" - 06/01/13 20:18

Originally Posted By: PadMalcom
Drawing a spline between several points.
That is cool! I hope your spline function(s) can be used to evaluate the polygon at specific positions, too, - rather than just "draw" it wink
Posted By: PadMalcom

Re: TUST or "The community library" - 06/01/13 21:33

Yes of course wink You pass a list of vectors and a detail level and you get a list of new vectors that define the spline. The higher the detail level the higher the amount of returned vectors.

EDIT: Now I see what you meant laugh Felix implemented a function to get the exact position on a spline.
Posted By: txesmi

Re: TUST or "The community library" - 06/01/13 22:58

Hi,
I uploaded to gitHub the first vesion of the compact_menu extension. I think the main core is near to be finished ready to support more member types and dynamic member management.



I started this extension with the main idea of giving an easy way to create collapsable menues, but I saw a big amount of possibilities by building some helper template menues for a system like this. For example: a menu to show and modify all the variables of an entity or all the parameters and entities of a map, modify and rebuild the map from the $$M file, a physX parameters controller menu, etc. The posibilities are infinite and it could be a great help for newbies and pros.

It lacks on documentation but here goes a quick summary for adventurous.

Actual members:
- TEXT.title=size_y
Draws a header for the menu. It moves the menu while cliking on it.
- .line=size_y
- .space=size_y
Draws a stylized line.
- TEXT.button=event
Executes a funtion when clicking on it.
- TEXT.slider=min,max,step,decimals,variable,event
Modifies a variable with a slider bar.
- TEXT.bmap=bmapPointer
Draws the bitmap pointed by the BMAP pointer

Future members
- editable digit
- text box
- window
- needle

- vector
- angle
- view
- entity
- ...


Posted By: PadMalcom

Re: TUST or "The community library" - 06/02/13 09:09

Pretty cool, I like the demo a lot! laugh
Posted By: txesmi

Re: TUST or "The community library" - 06/13/13 14:22

I finally got some time to continue with compact menu and added a new editable digit member to gitHub. I decided to manage all the editable members using the mouse and no more. These digits are modificable by clicking over them and moving the mouse up and down. The position of the mouse determines the step of change of the variable. fe: if you click over the number 3 of 1234.567 you will change the variable with a step of 10. If you click over the 4 -> a step of 1, 5 -> 0.1 and so.

The format is
- TEXT.digit=decimals,variable
- TEXT.digedit=decimals,variable,event

edited___________
New inherited member
- TEXT.rbutton=event
Posted By: txesmi

Re: TUST or "The community library" - 06/17/13 18:38

I did a big change in the compact menu panel bitmap rendering process to a faster one. It also detects if a digit or slider is a var of a pointer to a var. There are more changes but not that interesting grin

The actual members are:

+ line + space

And the first template for TUST compact_menu: debug and statics


Posted By: Anonymous

Re: TUST or "The community library" - 06/17/13 19:13

These projects are awesome! Really like the future of the engine. And thank all of you who are working on these great project that are going to make a world of difference for users like me. laugh
Posted By: txesmi

Re: TUST or "The community library" - 06/18/13 14:52

Just finished the documentation of the actual members of compact_menu. I would be grateful if someone with better knowledge of English than me could revise it wink

wiki page
Posted By: sivan

Re: TUST or "The community library" - 06/18/13 15:11

this menu system looks really cool!

a question: is it possible to set pointers as slider min and max values? in my editor I have sometimes problems with it, using loops very rarely leads to errors, but I want to totally eliminate them. basically I need a similar menu system (or maybe exacly this one), I've ever been too lazy to create my own laugh
Posted By: txesmi

Re: TUST or "The community library" - 06/18/13 21:52

It sounds easy and usefull. I will try to implement it in the same member type.
Posted By: sivan

Re: TUST or "The community library" - 06/19/13 06:50

thanks!
for example it is useful for setting lod distances, which should not overlap.
Posted By: txesmi

Re: TUST or "The community library" - 06/19/13 08:23

Hi!

I'm reading the doxygen help in order to improve the documentation of my extensions and I changed this :

Quote:

# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.

EXTRACT_LOCAL_CLASSES = NO

# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
# If set to NO (the default) these members will be included in the
# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.

HIDE_UNDOC_MEMBERS = YES

# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.

HIDE_UNDOC_CLASSES = YES


So the config enforces to comment the objects to be documented. What do you think?
Posted By: MasterQ32

Re: TUST or "The community library" - 06/19/13 09:14

Sounds really useful, i will update the whole documentation
Posted By: txesmi

Re: TUST or "The community library" - 06/19/13 09:32

I did not uploaded the modified file. I upload it right now.
Posted By: txesmi

Re: TUST or "The community library" - 06/21/13 21:48

Hi!

I finally finished all the doxygen comments for my modules. I modified the style of the html help a little bit to fit my taste wink I also managed to insert all the documentation of compact menu in the module header file, so I deleted the wiki entry.

I used the \defgroup tag to group all the content of each module. I suggest you doing so.

Code:
/**
 * \defgroup TrashModule Trash
 * \brief    Linked trash or stack implementation.
 * \ingroup  GenericScriptLibrary
 * \{
 * \file  trash.h
 * \brief Linked trash or stack implementation header.
 * \file  trash.c
 * \brief Linked trash or stack implementation code.
 * \file  test_trash.c
 * \brief Linked trash or stack implementation test code.
 */

// close the group at the end
/**
 * \}
 */



I think that a \brief description is a must.

The headers got a bit mixed at the end with so many comments, so I decided to insert a header in the modules refering to the included documentation.

Code:
/* The Ultimate Script Library 
-----------------------------------------------------------------------------------
   Module: Trash
   Linked trash or stack implementation.

   Read the documentation for further information: TUST\Documentation\index.html
----------------------------------------------------------------------------------- 
*/



before


after


All the rest is clearly explained into Doxygen documentation.
Posted By: txesmi

Re: TUST or "The community library" - 07/03/13 10:59

Hi!

Compact menu slider member limits now support fixed values, fixed variables and pointers to fixed variables. Also, all the member creation strings now can contain as much spaces and tabs as you want. The most time consuming action was writting the documentation xP

@sivan: I would love to see this system running on a project wink
Posted By: sivan

Re: TUST or "The community library" - 07/03/13 11:31

cool, I will need to replace my current GUI as more and more complex options are emerging to be used, like advanced material and shader stuff. it will be not an exciting work, just useful. I will test it soon, after adding partial shade-c support options to my editor, but first I have to conquer the empire of variance shadow mapping errors, grrrrr....
Posted By: Helghast

Re: TUST or "The community library" - 07/03/13 12:21

Originally Posted By: PadMalcom
Looks nice and can be put into the GUI section. Do you already have access to the Hub?

EDIT: After a 3 days fight I implemented Voronoi Diagrams for the procedural part of TUST (my secret love). It can, for example, be used to generate random road networks for cities.



Really interested to read this! Where can I find the source of this (glanced over the github, couldnt find it easily)?

regards,
Posted By: PadMalcom

Re: TUST or "The community library" - 07/03/13 14:03

Hey helghast,

the algorithm can be found here:
http://www.skynet.ie/~sos/mapviewer/voronoi.php
Posted By: txesmi

Re: TUST or "The community library" - 07/04/13 11:40

New string member for compact_menu module!

More info into TUST documentation.
Posted By: txesmi

Re: TUST or "The community library" - 07/18/13 18:44

I added a little function timer module.
Posted By: MasterQ32

Re: TUST or "The community library" - 07/30/13 21:10

I've reworked the usage of the character controller. It is now flexible and customizable. Some values are still hardcoded and docs are missing, but the
core system is stable.
The CCT is now detached from a specific entity and doesn't modify the camera, so it can be used for NPCs as well.

Usage for a simple third person player:
Code:
action player_func()
{
	// Allow only one player!
	if(proc_status(player_func) > 1)
	{
		error("Only one player can be active at a time!");
		return;
	}
	
	my->z += 8; // Lift player up a little to prevent falling through ground
	
	// Setup the camera
	cam_target(me); // Focus the player
	cam_mouse_speed(25); // Set a fast mouse.
	cam_basic_offset(vector(0, 0, 20)); // We want a camera focus a little bit above the player
	cam_3person_offset(vector(-250, -30, 0)); // We want to camera to be behind 
	cam_set_mode(CAMERA_THIRD_PERSON); // Enable third person camera
	
	// Setup the CCT
	CCT *cct = cct_create(my.x, vector(10, 16, 46));
	while(1)
	{
		cam_update(); // Update the camera each frame
		my->pan = camera->pan; // We sync the entity rotation with the camera
		
		// Setup the cct input
		cct_set_input(cct, CCT_FORWARD, key_w - key_s);
		cct_set_input(cct, CCT_SIDEWARD, key_a - key_d);
		cct_set_input(cct, CCT_JUMP, key_space);
		cct_set_input(cct, CCT_CRAWL, key_ctrl);
		cct_set_input(cct, CCT_SPRINT, key_shift);
		cct_set_rotation(cct, my->pan);
		cct_update(cct); // Update the character controller
		
		cct_get_position(cct, &my->x); // Get the position of the character
		
		wait(1);
	}
}

Posted By: MasterQ32

Re: TUST or "The community library" - 07/30/13 23:45

Added a simple animation system as well (has no support for blending atm, but i want to add this)
Posted By: PadMalcom

Re: TUST or "The community library" - 07/31/13 09:41

Only one little bug left in the street generation: Intersections are created too close to each other. But that should not be a problem laugh

Posted By: sivan

Re: TUST or "The community library" - 07/31/13 10:30

it's really awesome, does it work only on flat surface, or on a random terrain too?
Posted By: PadMalcom

Re: TUST or "The community library" - 07/31/13 10:58

The road network (each vertex) can be aligned to the ground so: yes.
Posted By: sivan

Re: TUST or "The community library" - 07/31/13 12:13

thanks, very cool. this TUST library is becoming a real treasure.

maybe in future some little demos could be made showing how to use it (road network, menu system, player control, effects etc.), demonstrating its power could convince people to use it.
Posted By: PadMalcom

Re: TUST or "The community library" - 07/31/13 12:48

Yes that would be great but we are only 2 (with txesmi 3) guys constantly working on it so it will take some time laugh
Posted By: sivan

Re: TUST or "The community library" - 07/31/13 13:53

yes I know. I hope I would have some time to spend with tust related works...
Posted By: MasterQ32

Re: TUST or "The community library" - 07/31/13 14:00

I've built another feature: Input Manager
It allows users to built a Unity-alike input system with multiple key bindings and so on...

Init-Code:
Code:
input_init(); // Initialize the input system

// Setup axis controls
input_set_buttons("forward", key_for_str("w"), key_for_str("s"));
input_set_axis("forward", key_force.y, 1, 0.01);

input_set_buttons("sideward", key_for_str("a"), key_for_str("d"));
input_set_axis("sideward", key_force.x, -1, 0.01); // Invert X-Axis to get proper left-right movement

// Three simple buttons for movement
input_set_button("jump", key_for_str("space"));
input_set_button("crouch", 29); // ctrl
input_set_button("sprint", key_for_str("shiftl"));



Usage:
Code:
var inputValue = input_get("forward");



In the example above, inputValue is influenced by key_w, key_s and key_force.y. key_w increases , key_s decreases and key_force.y is added to the value. So eg. controlling a player would be possible with wasd and key_force without any additional programming or changes required.
Posted By: Rackscha

Re: TUST or "The community library" - 07/31/13 14:56

@MasterQ32 looks nice BUT please for the sake of Performance, use Constant IDs and NOT strings o.O

Something like:

Code:
//complete nonsense order for demonstration, only
int CInput_Forward = 0;
int CInput_Jump = 1;
...
input_set_buttons(CInput_Forward, key_for_str("w"), key_for_str("s"));
...
var inputValue = input_get(CInput_Forward);



Use strings where you need to display something, otherwhise use IDs tongue
Posted By: MasterQ32

Re: TUST or "The community library" - 07/31/13 15:10

I couldn't notice any big performance impact. I know that strings aren't that fast, but string comparison ist fast enough for this purpose.

The reason why i used strings is that you don't need to use constant IDs.
Also the focus of TUST should be usabilty and not performace.
Posted By: Rackscha

Re: TUST or "The community library" - 07/31/13 15:36

Then you need Constant-Strings tongue
In these cases you just avoid to write them inline.
Posted By: lemming

Re: TUST or "The community library" - 07/31/13 15:51

@PadMalcom, MasterQ32: That's some really nice work! =)

I'm looking forward to see and test the animation and input system.
How are the strings stored and compared?
Posted By: PadMalcom

Re: TUST or "The community library" - 08/02/13 11:08

@Lemming thanks! laugh

Here is - next to voronoi - another algorithm to create road networks: Quadtrees!



(Still a little buggy.)
Posted By: MasterQ32

Re: TUST or "The community library" - 08/02/13 17:28

We now have an online documentation avialable: http://tust.masterq32.de
Posted By: MasterQ32

Re: TUST or "The community library" - 08/16/13 12:25

I think i'm going to remove the the documentation included in the repository. Instead my server will create and maintain the documentation creation. The Doxyfile will remain in the repository to allow changes on the documentation style not only by me.
The server will do daily updates and pack tust into three packages:
TUST Complete
TUST Source-Only (with dlls)
TUST Offline Documentation

Is this okay for you all or any vetos?

Greetz
Felix
Posted By: Rackscha

Re: TUST or "The community library" - 08/16/13 14:35

@MasterQ32 the online documentation is a great start:)
Does doxygen allow you to define the descriptions in you'r sourcefiles?
Posted By: MasterQ32

Re: TUST or "The community library" - 08/16/13 14:37

Yes, it allows different styles of inline documentation:
Code:
/**
 * \brief This method does something
 * \param p This parameter is used
 */
void do_something(int p);

Posted By: PadMalcom

Re: TUST or "The community library" - 08/27/13 18:36

Simple triangulation implementation to create meshes from any polygonal form. Green is the polygon and red is the generated triangular mesh.



P.S. Holes etc have not been testet yet.
Posted By: Timothy

Re: TUST or "The community library" - 09/07/13 16:11

I've found an error with using the "math.c" file from TUST with A7. To fix this put the following function at the beginning of the "math.c" file (thanks to MasterQ):
Code:
int floor(float f)
{
int i = f;
if(i < 0) i--;
return i;
}

Posted By: sivan

Re: TUST or "The community library" - 09/07/13 21:15

because floor is an A8 function.
Posted By: PadMalcom

Re: TUST or "The community library" - 09/08/13 12:58

@Timothy: Thanks for the hint! It is good to see someone using TUST next to us developers!! laugh

I think we should keep TUST conform to A8 and keep A7 workarounds in an external file that can be included whenever it is needed.
Posted By: Timothy

Re: TUST or "The community library" - 09/08/13 14:04

Yes that would be pretty cool since there is not that big of a difference between A7 and A8 yet.

Also the dynamicmodels.c does not work with A7 since it uses pvertexdecl (line 83). Is there a workaround for this?
Posted By: rayp

Re: TUST or "The community library" - 09/13/13 00:23

Happy Birthday MasterQ32 btw.
...now its MasterQ33 höhö ^^
Posted By: HeelX

Re: TUST or "The community library" - 09/13/13 20:43

Happy BÖRSDAY to YOU, HÄPPIE bürthdää TU JU, heppi börfday LIEBER fEEEElicks, hippi birthdi tu YOU! smile

Posted By: MasterQ32

Re: TUST or "The community library" - 09/13/13 21:12

Thanks to both of you!
@rayp: Would be MasterQ20 then, but nevermind...
Posted By: rayp

Re: TUST or "The community library" - 09/13/13 21:20

Meant as joke iam sure u know ^^
...omg 20. What times they were! This month 30th ill become 30. wtf?!? 30! The beginning of the end is near.
Posted By: Feindbild

Re: TUST or "The community library" - 09/16/13 09:11

The documentation is great when working with TUST, but I think we/you need something less technical and more "to the spot", so it's more obvious which features and capabilities are included in it. Or do you have something like this and I'm just missing it?
Something like a Wiki.
Posted By: MasterQ32

Re: TUST or "The community library" - 09/16/13 09:42

I will work on the documentation to write some tutorials on how to use it. But i don't have that much time atm...
The main page as well needs some more content, like download link or a nice description what it is...

I've made some examples already, but i think TUST should have examples for all it's modules.
It will be some work... grin
Posted By: PadMalcom

Re: TUST or "The community library" - 10/13/13 15:42

Can we decide to use skill1 as a global skill to store an entity's type? laugh
Posted By: MasterQ32

Re: TUST or "The community library" - 10/13/13 15:52

i would prefer some kind of config-file that allows the user to define the entity-type-skill as he wishes.

Code:
// If next line is uncommented, tust will use this configuration
//#define TUST_TYPE skill[42]
#include "tust.h"

Posted By: PadMalcom

Re: TUST or "The community library" - 10/13/13 16:06

I don't care HOW we do it as long AS we do it laugh
Posted By: Superku

Re: TUST or "The community library" - 10/13/13 17:40

I would not set anything on the first 10-20 skills as they are normally used to define behaviour of entities via WED, probably not even on the first 90 skills.
What I normally do is to use skill100 as the global entity type skill, skill99 sometimes for subtypes and then use 90-98 for additional data/ pointers to reserved memory and the like (most other skills are used for arbitrary calculations and so on, depending on the function/ action/ entity).
Posted By: PadMalcom

Re: TUST or "The community library" - 10/15/13 12:46

Thanks for your input. I added the following lines to "tust.h":

Code:
/**
 * A global skill to save an entity type
 */
#define TUST_TYPE skill[99]

/**
 * A global skill to save an entity sub type
 */
#define TUST_SUB_TYPE skill[98]

/**
 * A global skill to save a data pointer
 */
#define TUST_DATA skill[97]

Posted By: MasterQ32

Re: TUST or "The community library" - 10/15/13 13:40

I would add an #ifndef to The defines that allow The user to redefine The defines
Posted By: PadMalcom

Re: TUST or "The community library" - 10/15/13 14:08

Okay, did it.
© 2024 lite-C Forums