Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Extending Gosu / Really useful libraries
- - By chase4926 Date 2013-06-05 03:44
So these have been on my github for a while now, but I've never made a post about them yet.

I use these in each project I make, and they _really_ help me out.

Library name + short description:

Non-gosu libraries:

lib_misc.rb
  - Just my personal library of semi-useful methods, might be useful to someone.

lib.rb
  - Intended to be a "library loader library", but I lost interest in making it do that, it's now just a very small collection of methods.

lib_encrypt.rb
  - Very useful collection of encryption / compression methods, and their counterparts.

Gosu libraries (The really useful ones):

lib_alphabet.rb
  - An amazing font system; Make sure to grab alphabet.png or make your own if you plan on using it.

lib_lighting.rb
  - A lighting system I made a couple years ago, this one already has a post.

lib_medialoader.rb
  - Here's the best one, the crème de la crème. It loads all the images, sounds, and tilesets located within their specified folder once and for all.
    To use an image once loaded, it's as easy as Media::get_image('tower.png') -or- Media::get_sound('hiptobesquare.ogg')

lib_misc_gosu.rb
  - Another small one with a few gosu related methods.

Repo link:
https://github.com/chase4926/chase4926-library/tree/master/ruby

Feel free to use any or all, credit isn't necessary, but appreciated.
Parent - - By jlnr (dev) Date 2013-06-07 20:59
The media loader is not bad because it preloads everything, unlike most helpers which load images and sounds on demand, introducing lag during gameplay. But I think Chingu's Image['name'] syntax is still a little neater. :)

The Ruby style could be a little more idiomatic, e.g. inverse_bool seems to be just the !/not operator in disguise?
Parent - By chase4926 Date 2013-06-07 21:09
inverse_bool is a very old bad method that I have no use for anymore, it should and will be deleted at some point.
Up Topic Gosu / Extending Gosu / Really useful libraries

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill