Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Is there actual documentation for gosu?
- - By Vivisector 9999 Date 2013-08-25 02:09
So my project was running into issues using Rubygame (which is dead anyway), and I thought I'd look at gosu to see if it would actually be worth porting over to it.

Unfortunately, the documentation seems too severely lacking to even begin. If a real rdoc exists on this site, it's buried far too cleverly for me to find.

I don't want a short tutorial. I don't want ANY tutorial.

I want just a nice clean page that lists all the classes and methods and shit that gosu contains.

Something that I can refer to if I have a question like "How do I set the font? What are the arguments for that?" or "I want the mp3 to start at 0:18 for this scene. Can I actually do that?"

Something that looks like this or this.

Help.
Parent - - By ml Date 2013-08-25 03:45 Edited 2013-08-25 04:11
Hi Vivisector, welcome to the wonderful world of Gosu.

I also had a hard time finding the rdocs at first. The information you are looking for is hidden on the upper right hand corner of the rdoc page, where there are buttons for Classes and Methods and Files. The URL is:

http://www.libgosu.org/rdoc/

And like I say, the buttons are hiding in plain view at the top right corner. It took me quite a while to find them at first.

I'm pretty sure you'll love Gosu. It is very easy to install and try out. In most cases all it takes is "gem install gosu".

There are some good examples included within the gem files in the /examples folder. They're not tutorials in the classic sense - just working examples with useful comments throughout. You can try it out in a jiffy by cd'ing into the gem files and running the examples (or by copying the examples to a more accessible location and then trying them out from there). They give a good overview of Gosu's general features.

Hope this helps a little.
Parent - - By ml Date 2013-08-25 04:27
By the way...

I have only tried out RubyGame a little bit. I checked out the rdocs you linked to.

Gosu only has a few basic classes, which provide a lot of utility in a fairly simple framework. This gives a lot of versatility allowing you to make your game features the way you want them.

There is also a gem which builds on top of Gosu, called Chingu, which has provides more built-in classes and methods, but has less overall versatility.

In case you are interested in taking a peek, Chingu's rdocs are located at:

http://rdoc.info/github/ippa/chingu

Some people find Gosu easier to work with, and some people find Chingu easier to work with. I think they're both fantastic. Chingu has a few significant differences, but it is nice in that it has a lot of built-in extras. Like Gosu, it comes packaged with a lot of working examples, and can be installed with a simple "gem install chingu".

There are also several additional gems which beef up Gosu's repertoire, adding things like shaders and detailed pixel-level collision detection. I haven't tried them out too much yet. They are used in some of the more robust games on the Showcase forum.
Parent - - By jasonl Date 2013-08-28 08:16
hi all
i am new guy using gosu, when i search some information about gosu, i found that the document of gosu is not clear for me. for example the 'draw' method, it only show the first and the second parameter,maybe i can guess the 'color' parameter, but what the others parameters means???  i don't know, why not write the document more clear?? it should be the most important information for people to learn a new gem.
---------------------------------------------------------------------------------------------
- (Object) draw(x, y, z, factor_x = 1, factor_y = 1, color = 0xffffffff, mode = :default)

Draws the image so its upper left corner is at (x; y).
Parent - - By lol_o2 Date 2013-08-28 11:37
Aren't the parameters obvious?
Anyway:
-z is the z order of image. Images with higher z are drawn over the lower ones. With the same z, images are sorted by order of drawing
-factor is the scale (this really should be named scale). factor_x equal 2 means that image is twice stretched horizontally etc.
-mode is either :default, :additive or :multiply
Parent - - By EdwinOdesseiron Date 2013-08-28 11:52
Agree on renaming factor to scale, I didn't know what does it do until I tried it.
Parent - By jlnr (dev) Date 2013-08-29 07:00
Agreed
Parent - By ml Date 2013-10-25 02:21
This is not directly related to your question, but provides a good description of Gosu's angle offset feature:

http://gamedev.stackexchange.com/a/61683/34765
Parent - By jlnr (dev) Date 2013-08-29 06:59
I'm sorry, YARD broke my custom Gosu rdoc theme and the default theme is just terrible/hard to discover. If this has changed in the meantime or there is a better YARD theme, please let me know :)
Parent - - By jlnr (dev) Date 2013-09-21 07:02
Thanks to eris_discord, the rdoc on libgosu.org has been massively updated :) Check it out.
Parent - - By ml Date 2013-09-29 20:13
Just browsed the new rdocs. I don't have the old ones memorized, but from what I can tell, it's the same basic layout as before, but with a lot of extra details. Must have taken quite a lot of work. Nice job eris_discord, that is a significant contribution.
Parent - - By erisdiscord Date 2013-10-02 16:08
Yep, the layout would actually take a lot more work to change than the content! YARD theming is undocumented territory.

Thanks! I wanted to work on something, saw an opportunity and took it. It was about a day's work IIRC and actually pretty fun. Mostly adding actual documentation for a lot of the parameters, fixing a few errors and elaborating on descriptions I thought were unclear. Pretty proud of my work.

I've actually got a writeup explaining the blending modes floating around too but I think I haven't pushed it yet for some reason. Maybe I'll work a bit more on my local copy and send a pull request later this week when I'm not busy.
Parent - - By ml Date 2013-10-03 04:12
Man, that's awesome. Way to take the initiative, help out in a big way, and take some of the workload off of jlnr. With regard to the blending modes, I didn't know anything about them until now. Very useful to know about.

I'm a huge fan of Gosu, and in my personal opinion, nothing is lacking. That being said, I think the beefed up the documentation makes it even more fantastic.
Parent - - By erisdiscord Date 2013-10-03 17:07
Yeah, I've got so much enjoyment out of Gosu, it really just feels good to contribute back.

Maybe one of these days I'll finish one of the projects I've started.
Parent - By ml Date 2013-10-17 06:13
I look forward to seeing your finished (or partially finished) projects whenever you feel ready to post them.

Hopefully one of these days I'll be able to figure out a way to contribute to Gosu in some meaningful way. I have also gotten a lot of enjoyment out of Gosu, but so far my only contributions have been to share small video games on the Showcase....
Up Topic Gosu / Gosu Exchange / Is there actual documentation for gosu?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill