ENIGMA Forums

General fluff => General ENIGMA => Topic started by: TheExDeus on August 22, 2010, 10:30:48 am

Title: Help File?
Post by: TheExDeus on August 22, 2010, 10:30:48 am
So.. anyway. I though on how I could help and manual came to mind. I wanted to know how exactly will help work? At one point you made some online page, but I don't really think that online manual is the best idea. I for one, think that GM style help works the best. You can search really fast in it, and information about every functions is present. There was also some information thing in the function progress page, but it seems that it has been removed. As far as GM's functions are concerned, we could just take the information from the GM's manual (shamelessly copy and paste) and it would cover most of the manual.

edit: Also, I think the priority still should be not adding new functions, but just replicating the GM ones. So when you could open a GM game, press run, and just create a 5x smaller and 5x faster game than GM that would be the greatest thing. And would be a great insult to YYG too. Then we could become prophets, and go around GMC and tell about free new age of game development.
Title: Re: Help File?
Post by: RetroX on August 22, 2010, 10:38:28 am
There will not be a CHM for ENIGMA.

kthx, bai

Also, I mentioned ENIGMA on the GMC once, and a staff member actually deleted my post and PMed me saying that it was rude.
Title: Re: Help File?
Post by: IsmAvatar on August 22, 2010, 10:55:57 am
What I'd like to see is some kind of light-weight Markup Language version of a help file. This way, LGM can dynamically look up functions in it, and display the help for that function easily, as well as knowing the arguments for the function.

Actually, LGM already has a text file with all the functions, their arguments, and the description of the function (the descriptions have yet to be filled in). It was generated from the online function list, which was in text, yaml, and xml (although I don't know where the topic's gotten to now).


Edit: Found it.
http://enigma-dev.org/forums/index.php?topic=520.msg6138#msg6138
Seems the database has been changed and the export stuff wasn't updated, so it's broken now.
Title: Re: Help File?
Post by: Josh @ Dreamland on August 22, 2010, 11:21:17 am
I actually started a CHM file, but then I realized that maintaining it is too large a task for any one person, so I decided to invest in an online method and a way for LGM to retrieve that text, as Ism was pointing out.

With a little luck, we'll be able to pull off a Javadoc-like system, capable of looking up info on a function while you are coding.

I may maintain a generic CHM file for learning how to use LGM and ENIGMA, becoming a developer, etc... I need to think about organization, though.

But yes, when this is settled you will be able to help by submitting descriptions for functions that work in ENIGMA. We'll see what we can do with those from there.
Title: Re: Help File?
Post by: TGMG on August 22, 2010, 03:46:11 pm
What about javaHelp? It looks similar to the kind of chm help system, with search etc and cross platform. The files are just html, so they can be parsed by an xml library for LGM function list.
Plus all the formatting tags of html, can have images etc :)
Title: Re: Help File?
Post by: Josh @ Dreamland on August 22, 2010, 03:48:49 pm
CHM files are just HTML, too. If LGM could this format natively, though, without further coding (in excess of an include and a call), then the format sounds perfect. Otherwise... Most platforms come with some sort of chm viewer, or at least have one easily available.
Title: Re: Help File?
Post by: IsmAvatar on August 22, 2010, 03:53:37 pm
CHM format is proprietary, meaning that LGM can't use it. End of story.

I like the javaHelp idea. LGM can read and display HTML very easily.
Title: Re: Help File?
Post by: Josh @ Dreamland on August 22, 2010, 05:03:17 pm
Sounds good to me.
Title: Re: Help File?
Post by: RetroX on August 22, 2010, 08:19:39 pm
CHM is MSHTML.  Don't use it. :V
Title: Re: Help File?
Post by: TheExDeus on August 23, 2010, 10:44:56 am
javaHelp sounds good. I guess Enigma wouldn't be something like GM, that is updated once in 4 or so years, so chm isn't a good solution. So I agree that some generated help would be needed, thou I still think it should be local in one way or another.
Anyway, when the infrastructure is there, I would gladly help with documenting some functions.
Title: Re: Help File?
Post by: IsmAvatar on August 23, 2010, 11:17:18 am
Quote
o I agree that some generated help would be needed, thou I still think it should be local in one way or another.
This is what I'm in favor of as well, because not every user has internet access, and it can be annoying when a program needs to contact the internet for something.

For now, you're welcome to document the already known GM functions.
Title: Re: Help File?
Post by: TheExDeus on August 23, 2010, 01:16:39 pm
With known you mean already implemented functions, or all GM functions?
And in what format should I document? So LGM could load it at some point. And do we need short description, long description? Should simple things like functions information should be "function(argument0,argument1,argument2)" or "function(argument0 type argument0, argument1 type argument1...) etc. So draw_sprite(sprite sprite_index,int image_number,int x, int y).. Dunno if this would be needed, as arguments themselves tend to be quite self explanatory.
Title: Re: Help File?
Post by: RetroX on August 23, 2010, 01:53:05 pm
I'd put it in C-style with the argument type.
Title: Re: Help File?
Post by: IsmAvatar on August 23, 2010, 01:59:29 pm
Feel free to do all the GM functions, since that's the goal of Enigma. Or if you'd like, just do only the implemented GM functions. Eventually there will be a number of additional enigma functions which we'd like to have documented as well, but I wouldn't just go with the current function list, since any number of those could disappear at any moment.

I'm in favor of including the argument type as well.
Title: Re: Help File?
Post by: RetroX on August 23, 2010, 02:09:56 pm
Also, I'd recommend using "sprite_id" instead of "sprite" because really, you could probably enter any number and it would be considered acceptable by the compiler.
Title: Re: Help File?
Post by: retep998 on August 23, 2010, 03:34:18 pm
Also, I'd recommend using "sprite_id" instead of "sprite" because really, you could probably enter any number and it would be considered acceptable by the compiler.
What happens when you give gm a decimal sprite id like 2.5?
Does it round, floor, ceil?
Or does it just ignore it?
Or does it error?
Or does it crash?
Or does it fuck up utterly?
Title: Re: Help File?
Post by: RetroX on August 23, 2010, 04:03:01 pm
It gives you an error because you're giving a double and not an int
Title: Re: Help File?
Post by: IsmAvatar on August 23, 2010, 04:15:04 pm
Enigma will. He asked about GM, though, which doesn't distinguish between double and int.
Title: Re: Help File?
Post by: Josh @ Dreamland on August 23, 2010, 04:15:35 pm
ENIGMA Will do no such thing. A warning is thrown if the variable is not an ENIGMA type, and the value is truncated.
Title: Re: Help File?
Post by: TheExDeus on August 23, 2010, 05:13:59 pm
Quote
What happens when you give gm a decimal sprite id like 2.5?
Its rounds it. So 2.5 would be 2.

And in what format should these functions be? I guess the best way to document them would be trought the description boxes in function progress page. This way it automatically goes into the database. I see it works again. Thou another input box should be need no? Like one box for the function "draw_sprite(sprite_id sprite, int image_index,int x,int y)" and the big box for the description. So when you type/search the function you get something like:
Function name - Description
E.g.
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index.
Or:
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index.
Title: Re: Help File?
Post by: RetroX on August 23, 2010, 06:21:25 pm
Italics are nice.
Title: Re: Help File?
Post by: Josh @ Dreamland on August 23, 2010, 06:39:59 pm
HaRRiKiRi:
The function list page (however outdated) will allow you to submit a description.
Title: Re: Help File?
Post by: IsmAvatar on August 23, 2010, 07:07:05 pm
Might also be nice to include a return type.
Title: Re: Help File?
Post by: retep998 on August 23, 2010, 11:44:48 pm
We need an open source documentation system for enigma, which can be stored both locally and also retrieved off the internet, with the optional feature of also being able to add and edit documentation, all from within the LGM IDE.
We also need some sort of intellisense for LGM, otherwise Imma stick to vc++.
Title: Re: Help File?
Post by: TheExDeus on August 24, 2010, 05:08:04 am
Quote
The function list page (however outdated) will allow you to submit a description.
I tried submitting one, but it still shows that no description was submitted to the function. I tried "draw_sprite". And the thing is, if I can't change the function string itself, then I need to write its description accordingly. Like instead of:
Quote
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and sub-image of image_index.
How I initially planned, I need to write:
Quote
Draws a sprite with its origin at position (x,y) and sub-image of subimg.
So if in the future you change the argument names, like replacing subimg to image_index (thou this is a variable, so subimg probably would stay), then description would need to be changed too. This way I would also be able to set the argument types, as this does seem a manual process (thou it could be possible to get the argument types from C+ definitions and generate these automatically..).

Quote
We need an open source documentation system for enigma, which can be stored both locally and also retrieved off the internet, with the optional feature of also being able to add and edit documentation, all from within the LGM IDE.
This would be nice. Especially saving locally.