Scripts / Introducing ScriptGuru: The community guide to GameGuru's Lua API

Author
Message
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 17th May 2020 18:42


https://script-guru.com

Overview

Hi everyone, it's been years since I've been active in the community, but I've been following GameGuru's progress since release and have always planned to build something with it. With the announcement and Alpha release of GameGuru MAX, and the extra free time due to COVID-19, I figured the time was now.

Toying with GG's scripting over the past several weeks and browsing scripts written by some of the community's advanced scripters has shown me how capable GG can be in the right hands. But there's one problem: the documentation around GG’s Lua API is very limited. I understand the development team is small and there are a lot of functions to document (over 1200! - I know because I indexed them all), but I think the community can help with that.

Without diving in head first and dissecting other user’s scripts, it’s very difficult to learn how anything in GG works. This is fine for people who learn this way, but creates an obstacle for others. I believe that a solid documentation website for GG’s Lua API would serve as a useful resource for both new and experienced GG users, as well as enticing new users with scripting experience to use GG for their next project.

Goal

The goal of ScriptGuru is to glean knowledge from scripters within the community and collectively build a documentation website for GG’s Lua API.

As of right now, the website is pretty bare and mostly serves as a shell for future documentation; although it does contain a searchable index of every function currently available in GG which can be pretty useful on its own. With the help of the community, I believe it could grow into something much more.

Technologies

I’ve built the website with VuePress, which is a platform tailored towards creating documentation websites using Vue and Markdown, and I am hosting both the website and source code in a MIT-licensed GitHub repository. Hopefully these decisions will encourage others to pull a copy of the repo and contribute some documentation through a pull request.

Contributing

If you made it this far, you might be interested in contributing, right? Well if you do want to contribute, I wrote a section on contributing documentation on the ScriptGuru website that should answer most questions.

If you’d like to contribute but don’t want to pull the repository and write the Markdown, feel free to post your documentation in this thread, and I will do my best to write the Markdown and add it to the website on your behalf, along with any attribution you’d like for the work.

Notes

- ScriptGuru is currently a heavy work in progress, as noted on the website’s homepage. Expect things to change as the project develops, and I encourage anyone who has opinions to voice them. I’d like this project to be as community-oriented as possible.

- I don’t currently have a contributors section on the website, but I fully intend to add one. I think it’s important that people who want it get proper credit for their contributions. I’m open to suggestions on the best way to implement this. My ideas currently include a list of names/usernames and avatars on the homepage, or a small contributor section at the bottom of each documentation page.

- Due to GG relying heavily on global variables and functions, there wasn’t really any existing categorization for the API. I did my best to split the variables and functions into categories, but there were a number of cross-category functions that were tough to categorize. Let me know if you think a function is miscategorized and should be moved somewhere else.

Note to the mods: I apologize if this is seen as a team request. My aim isn't to start a team, but to help build a community-driven resource for GG creators.
Signatures are overrated.

Attachments

Login to view attachments
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 17th May 2020 18:55
Here are links to documentation pages for a couple simple functions I did as examples:
- CollisionOff(e)
- CollisionOn(e)
Signatures are overrated.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 18th May 2020 05:49
Ah, nice. This is a big project- I hope if the project progresses ahead - values are
also included.

BTW if there's any chance that GGMAX's dynamic Lua system includes a UI
that only accepts the limits--- WhooYeah! (We can ignore all of the below....)

Here's what I'm thinking as a scripter;
It would be very nice if the effort was made to uncover the constraints of values
entered into all the function calls (where such functions receive values.)
For example the SoundVolume function was recently discussed elsewhere --
(and the value for volume is 1 to 100 BTW) simple.
But if you inadvertently set it out of bounds in the script, you get a Runtime Error,
which causes you to have to do a hard break out of GG and start it over again.

I think that's the same in most functions-- but maybe NOT even ALL! What's the big
gripe here? Well, as a game engine, running in TEST mode-- it's for testing!
It would be a pleasant feature if it was more like a debugging mode. It would be a
friendly reminder just to see a "Above limits" / "Below limits" error @ line # and no
locking up of GG and start it over-- just a notice and perhaps even a notice on the
limits at that time.

Also.....
Any other errors that can be caught before the program goes into quarantine,
and instead the creator can continue back straight into the editor-- any other
such events with debugging style error handling would make things a bit sweeter.

Lot's of work for that?! Yes, extensive for sure. A great huge amount of time added
to an already packed developers schedule. So -- maybe there is a list somewhere
that the community could acquire...?!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 18th May 2020 06:06
For me it's 3:35 minutes between the Runtime Error and
GG loaded back up with the same level re-loaded again...
PM
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 21st May 2020 13:09
@GubbyBlips Thanks for the feedback! I completely agree with you about documenting valid number ranges, and I'll keep it in mind going forward. Maybe I'll add a note to the parameter description column, or an extra column in the parameter table, for functions involving number ranges.

I'm hoping to get around to documenting some more functions this weekend (considering particles, since that's what I've been playing with lately), so you should see some updates here soon.
Signatures are overrated.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st May 2020 17:31
Wow- you've taken on a great task! I hope these #'s stay the same for MAX
as they are now-- so your work is not in vain. Have you emailed Lee
to inform him of what you are working on? Or you have already done that
and already have the "list"!
PM
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 22nd May 2020 05:00
I haven't contacted Lee, but I bought GameGuru MAX a couple weeks ago and used the Alpha release's Lua environment to get the full list of functions. I'm sure things will change as GGM develops, but I'll just have to deal with that as it comes. I doubt the ScriptGuru documentation will be anywhere near complete by the time GGM launches anyway.

The good news is I got around to documenting the Particles functions sooner than expected. Here are a few cool ones:
- ParticlesAddEmitterEx
- ParticlesLoadEffect
- ParticlesSetGravity
- ParticlesSetWindVector
Signatures are overrated.
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 22nd May 2020 13:19 Edited at: 22nd May 2020 13:23
Just testing out my new signature.

EDIT: Trying again...
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd May 2020 10:45
looking very good, reminds me of the AGK docunmentation
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
darimc
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Nova Scotia, Canada
Posted: 23rd May 2020 20:48
Quote: "looking very good, reminds me of the AGK docunmentation "

Thanks, smallg! It's nice to hear coming from someone with so much GG scripting experience. I used a lot of your scripts to help bring me up to speed and prepare for this project.

Also I didn't realize AGK had documentation site, but I checked it out and you're right, it is pretty similar. I guess my approach wasn't too far from what TGC might have done for a GG docs site then .

Login to post a reply

Server time is: 2024-04-24 06:18:20
Your offset time is: 2024-04-24 06:18:20