Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Looking for a Gosu tutorial(Video or Text)
- - By Eamonn Date 2013-05-16 20:09
Hello. I have recently finished learning the Ruby Programming Language and I would like to jump right into learning Gosu. I was looking at the ruby4kids tutorial series but it didn't really teach that much and wasn't very useful. I could not find any other tutorials. Does anyone know where I can find a simple easy(ish)-to-follow Gosu tutorial? I'd like it to teach enough concepts to program a full game. If a tutorial is not a good idea, how do other people learn Gosu? Can you tell me the best way to learn Gosu? I don't like reading though documentation so don't say to read the documentation(even if it's the best thing :P).

Thanks! Any help is welcome/appreciated! :D
Parent - By RunnerPack Date 2013-05-16 23:11
You don't have to read the documentation "cover-to-cover" to learn from it. Just skim over the main classes (Window, Image, etc.) and look at the included examples. When you have a general idea of how things are done, start making something. If there's something you want to do, but you don't know how, take a look in the docs. There's really not that much to Gosu (on the surface) and it's really well organized and logical. You should be able to pick up the basics very quickly with just a bit of practice.

Also, don't forget to use the search engine here on the forum. Most likely, your question has already been asked and answered at least once.
Parent - - By jlnr (dev) Date 2013-05-17 04:58
There is no definitive list of concepts :) If you want to write a jigsaw puzzle game, the code will look completely different from a Super Mario clone. Gosu makes almost no assumptions about what you want to do.

I would suggest that you download a few smaller games from the Showcase and mod them a little, and get a feeling for which code style you prefer.
Parent - - By Eamonn Date 2013-05-17 14:39
Thank you all for your help! So really I should just read the main parts of the documentation and then when I understand the main concepts get some example games and mod them a little bit? The only thing that puzzles me is camera movement. What I think you would do would make the X/Y position of the object(s) that you want to move adjust depending on the way you move like up, down, left and right. I'll look into it though. Thanks you all for giving me some help on this!!! :D
Parent - By RunnerPack Date 2013-05-21 04:27
That's one way to do it, but that can get quite complicated/slow when you start using more than a few objects. Have a gander at: Gosu::Window#translate.

Use it like:

translate(world_x, world_y) {
  thing.draw(local_x, local_y, ...)

Keeping in mind, of course, that when the camera moves, e.g. right, the world "moves" left, and so on.
Up Topic Gosu / Gosu Exchange / Looking for a Gosu tutorial(Video or Text)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill