Not logged inGosu Forums
Forum Gosu Homepage Help Search Register Login
Up Topic Gosu / Extending Gosu / Chingu 0.8 released
- - By ippa Date 2010-12-13 13:28 Edited 2010-12-13 14:11
Just in time for Christmas LD #19, here's Chingu 0.8:

In late 0.7.x and 0.8 tons of new things have been implemented:
=============================================
- I finally started doing tests (rspec) seriously. This has helped in making Chingu more stable and finding those small bugs I wouldn't otherwise had found. Thanks txus and spooner (on github) for helping me with this.

- Shipping with GameStates::Edit, just push it and you can edit your GameObjects on screen, and save and load your maps. Pretty minimalistic yet powerful.

- GameStates::EnterName, premade gamestate to have the gamer enter his alias/name.

- Example16 shows off how you can get online highscores for your game with _minimal_ work using class OnlineHighScore, GameStates::EnterName and a free account @ www.gamercv.com.

- Example21 shows off a sidescrolling game. Press 'E' anytime, edit any object, press 'E' again to return to the game and jump on that new block you just created. Edit as you play, enabled by the premade GameStates::Edit !

- README is updated, reflecting most of the new stuff. There's also a list of projects using Chingu so you easily can learn by example.

- Premade class SimpleMenu, for quick 'n easy menusystems. Nice for compos like LD.

- Tons of other small fixes, additions and tweaks. See github commitlog for everything ;)

Maybe most cool of all, a lot of quality patches from other ppl:
===========================================

- HakubJozak made GameObject into a Chingu trait instead of a big monolithic class. This will open up for easier implementation of for example a ChipmunkObject.

Spooner have:
- rewritten the inputhandling making it a whole lot better and more stable.
- added caching of fonts with Font[16] (using default font size 16) or Font["verdana", 16] (verdana size 16)
- made it possible to change windows (Window#close deletes all the cached assets), for example if you want a splash window or a config window before the main game loads.

---------------------------------
What is it: a game library depending on ruby/gosu
install: gem install chingu
source: https://github.com/ippa/chingu
rdocs: http://rdoc.info/github/ippa/chingu
Parent - - By Spooner Date 2010-12-13 13:40
The caching of fonts isn't quite as described. Either use Font[16] (default font of size 16) or, to be more specific, Font["verdana", 15].

I also made it possible to change windows (Window#close deletes all the cached assets), for example if you want a splash window or a config window before the main game loads. This would also allow the possibility to change resolution or full-screen window state (previously opening a new window would work, but cached assets wouldn't work any more).
Parent - By ippa Date 2010-12-13 14:18
right, fixed :).
Parent - - By jlnr (dev) Date 2010-12-13 18:52
I would be wary of opening a new Gosu::Window, I think I tried it on OS X and it would not work—only the first Window that is shown actually works. It seems to vary from platform to platform.

Patches welcome, but moving Gosu::Window to GLFW and offering Window#resize() seems wiser to me. This could automatically keep the position etc. :)
Parent - By Spooner Date 2010-12-13 21:16
Ah, I see. I thought the issue was just Chingu (which failws on new windows because it tried to use the assets from the original window again).

It seems to work OK in Windows, at least. I didn't try in Linux. Window#resize might be useful, but it would also be nice to be able to have Window.full_screen = true as well (if that is possible).

The reason I made this change was that I was hoping to have a config window that then opened the main app in the resolution and full-screen depending on the users requirements. I could just use a separate process for this though, although it would mean I had to reload all my gems (or 10s wait on Windows) and make another ocra exe, which although not ideal, would work.
Parent - - By RavensKrag Date 2010-12-14 02:02
Seems like Chingu is just getting better and better.  I would switch, but I think the time it would take to retool would not be so good.  Plus, I'd have to reimplement a lot of stuff for the rather eccentric way that I'm handling sprites.  I might just copy some things like the state manager, timer, and edit state ^_^;

If I have the time though, I'll try to whip up some Chipmunk integration stuff.  No reason for more people to go through that than necessary...
Parent - - By ippa Date 2010-12-14 10:48
Copy away, if you can use anything it's all good. There's actually an example on how to use GameStateManager in pure gosu... but haven't looked at it in a while. class Animation is also pretty decent and "standalone" from Chingu.

An easy-to-use ChipmunkObject would be awesome since chipmunk is a bit cumbersome to work with IMHO. Actually this fork -- https://github.com/gwil/chingu -- was made to add chipmunk stuff, but seems like it didn't happen :P. I might take a look at it for 0.9 myself if nobody else does it. I would love some patches from you :). Long time since I looked at chipmunk actually.
Parent - - By RavensKrag Date 2010-12-14 11:25
I have to admit, the animation stuff it looks interesting, but I don't completely understand it.  Perhaps if I look at it a bit more I'll get it ^_^;

I've got some stuff in place in my code already to provide an interface layer on the Chipmunk stuff, so when I get the time (dang finals...) it shouldn't be that hard.  Well, in theory anyway.  Though, I question the wisdom of essentially putting a wrapper on a wrapper, it is convenient.  However, I suppose if I wanted sheer speed I'd be using C/C++...

Though as a general note, I'd be happy to submit patches, as I can see a few areas already where the code could be cleaned up.
Parent - By Spooner Date 2010-12-14 18:19
I use the bits of Chingu I like, patch other bits and ignore others. I did use Chipmunk with it in my LD game, Alpha Channel (though only after my actual LD entry, which just used really naive hand-made physics).
- By ippa Date 2010-12-14 10:44
There's a Chingu 0.8.0.2 just released taking care of the "missing rest-client" gem dependency thingie that hit a few ppl.
Up Topic Gosu / Extending Gosu / Chingu 0.8 released

Powered by mwForum 2.29.1 © 1999-2013 Markus Wichitill