Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu News / Gosu 0.9.0 released
- - By jlnr (dev) Date 2015-05-16 23:11
This version finally implements the new, cleaner interface I had originally planned for Gosu 0.8.0. (This release does not introduce any other major features, nor does it fix any bugs.)

Basically, instead of this:

Gosu::Image.new(some_window, "filename", true)

...you can now write:

Gosu::Image.new("filename", tileable: true)

This does not rely on any global variables or other hacks - Gosu::Image is really independent from Gosu::Window now. All the constructors and factory methods have been completely refactored. All the rendering primitives, from draw_line to rotate(4) { ... }, now live directly inside the Gosu module, e.g. Gosu::draw_line(...).

The new interface has been documented in rdoc already: https://www.libgosu.org/rdoc/

Please let me know if anything that works in Gosu 0.8.x does not work in Gosu 0.9.x. In theory, this version should be 100% backwards compatible.
Reply
Parent - By jlnr (dev) Date 2015-05-16 23:37
Ouch, Gosu::Font#initialize does not seem to be backwards compatible. I'll see what other bugs I find until tomorrow and release v0.9.1 then.
Parent - - By lol_o2 Date 2015-05-17 13:14
I tried this new version and I get this: "Gosu::Graphics can only be drawn to while rendering" :(
I'm using Window.record to pre-draw map, but it's done while initializing game state and it happens in update. Is there a way to bypass this limitation?
Parent - By jlnr (dev) Date 2015-05-17 13:38
You can either lazily record it inside the Window#draw call tree, or wait for me to fix this issue here: https://github.com/jlnr/gosu/issues/277

I wasn't sure if anyone already used record outside of draw, so I didn't make it a priority for 0.9.0 - oops. I'll try to address this later today.
Up Topic Gosu / Gosu News / Gosu 0.9.0 released

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill