Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Showcase / Second Generation Chingu Example Loader - Vastly Upgraded
- - By ml Date 2013-08-09 13:18
Hi everybody. I have updated and improved the Chingu Example Loader. On github the new version is simply called "loader".
You can check it out here:

The command to start the game is "ruby loader.rb".

This one is way better than the first version. It loads LOTS more examples. It even loads Conway's Game Of Life.
I've rigged the spacebar and the arrow keys to have a role in almost every example.

The pause ('P') and reset ('R') features work essentially globally.

'Q' and 'enter' toggle gamestates.

Pressing 'Z' at any time puts the name of the current gamestate to the terminal.

I included a Gemfile for use with bundler. Loader requires gosu, chingu, and texplay. I'm not sure what to do with 'Gemfile.lock'...

I think I've got a pretty decent game structure - very simple. Very basic. The main file, 'loader.rb', requires files from the 'gs' folder, and launches the Loader window. In the 'gs' folder, CORE.rb holds the Loader window, the Pause gamestate, and the Welcome gamestate. All the other gamestates and object classes are in the other .rb files in 'gs'. The main logic for calling different gamestates is in CORE.rb.

I am hoping to add even more examples in the future. My biggest hope is to figure out how to load CptnRuby as a gamestate. Any suggestions on how to adapt CptnRuby to a Chingu::GameState would be warmly received. Loader comes equipped with CptnCat, for reference. And the Chingu reference manual is included in the 'ref' folder.
Parent - - By allcaps Date 2013-08-11 02:45
Pretty slick.  Thanks.
Parent - By ml Date 2013-08-11 06:49
Hey thanks! I was wondering when (if) you were going to check it out.
Parent - - By RavensKrag Date 2013-08-21 05:31
Why are the buttons for previous state and next state so far apart? "Previous" and "next" are closely related, but the Q and ENTER keys are so far apart (opposite ends of keyboard).

I would sort of understand if it was a semantic binding (you have P bound to "pause", which is semantic), but Q doesn't really convey "go back" to me.

If it's because you don't want to use the arrow keys, because they're being used in the actual games, I would suggest CTRL+LEFT / CTRL+RIGHT. Or maybe something like F7 / F8 because there next to each other, and F-keys are not used often in gameplay.

(I picked F7 / F8 specifically because on my keyboard, FN+F7 is "previous track" and FN+F8 is "next track)
Parent - By jlnr (dev) Date 2013-08-21 13:17
On Macs, the F keys are "reversed" by default - F7 is "previous track" and Fn+F7 is the real F7. So one would have to hold Fn all the time while shuffling through the states. Tab / Shift+Tab? :)
Parent - - By RunnerPack Date 2013-08-22 05:46
My suggestion (unless they're used for other stuff; I haven't tried the program, yet): PgUp / PgDn
Parent - By ml Date 2013-08-24 09:47
Hey everyone, thanks for checking out the project, and thanks for the feedback.

I have made some updates.

I resurrected the fart feature (F button) from the original chingu example loader.

I am pleased to announce that the fart feature has been fully refurbished and upgraded. @RunnerPack, I hope this gives you some extra incentive to try it out.

For fast upgrade if you have already cloned from github, just cd into /loader, and execute:

git pull origin

In response to feedback about the gamestate toggle controls, I have added the button L for "Last Gamestate" as a temporary solution. I have kept Q in there as well, for the purpose of long-term testing and comparison. The function keys raise the issues identified by @jlnr, but I went ahead and added them in as background controls (not identified in the welcome screen). Now there are several different ways to toggle gamestates.

@RunnerPack, I do not know how to use PgUp and PgDn as keyboard input in either Gosu or Chingu. Tips on how to use input from those keys (or for the keys of ' and ; and < and >) would be warmly received.

We'll see how the controls evolve in the future... this is a very interesting discussion.

I was thinking of Q as standing for "Quit current gamestate", since it quits out and you lose any progress in that gamestate. It is close to the escape key, which has a somewhat similar function, at least in my mental map. I think of it as like the button you push when you're playing X-Box, and you're deep in a settings menu, and then you press that button to exit a whole bunch of times until you get back to the game - that kind of thing.

It does have a zippier feel to it using the L button...

I have also made some general updates. The fish now move a little bit more. And I added in some decent horse sounds in the viewport example (Sandbox gamestate).

The main additions are the L button and the F button.
Parent - - By ExplodingCookie Date 2013-09-10 15:44
This is impressive, excellent work.
Parent - - By ml Date 2013-09-24 05:54
@ExplodingCookie, thank you very much for this compliment! BTW, my next upcoming project uses the music from Stageoids....

If you want a sneak peek at the almost finished draft of my next project, it is currently residing on this github repo.

It is a team effort by myself and Fractional - a basic Asteroids remake - using bits and pieces of several different Gosu projects - with extra attention given to the intro and ending. I am especially proud of the ending. It still needs a little bit of editing but it is coming together nicely. The main game music is the Stageoids music and I think it works perfectly.

Feel free to let me know how you would prefer to be attributed in the ending credits.

Spooner and others have been super helpful in assisting with technical issues. I have started posting my Gosu-related questions on and it has been pretty helpful.

Best regards.
Parent - - By ExplodingCookie Date 2013-09-24 18:09
I think just "Main Theme - ExplodingCookie" would be fine.

How would I install chingu though?
Parent - By ml Date 2013-09-27 07:50
It's really easy - if you were able to run the Chingu Example Loader, you already have Chingu installed.

It is the same process as installing Gosu - a basic gem install.

You can run "gem list --local" to see if Chingu is already installed.

If it is not installed, just execute "gem install chingu" from Terminal / Command Prompt with Ruby.

In the final version of ChinguRoids I will add a gemfile for bundle install, but I have not put one in there yet. Loader has a gemfile for bundle install.
Parent - By ml Date 2013-09-28 16:08
btw, if all else fails, you can always execute "gem install chingu" to install the latest version.

Also, to run ChinguRoids, cd into the /ChinguRoids-1 folder and execute "ruby main.rb".

Hopefully this helps.... :)
Up Topic Gosu / Gosu Showcase / Second Generation Chingu Example Loader - Vastly Upgraded

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill