Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Sanguine - A roguelike game in Ruby / Gosu
- By salin Date 2010-06-02 21:37
Hi.

I've been working on and off for some time on a roguelike game called Sanguine which uses Gosu for the UI. 

It's not complete but you can wander around, hit things, level, get, drop and equip items.  Maps can either be handcrafted or procedural generated using a BSP algorithm.  The one thing I really like about the design is the idea of an Effect - essentially something which is applied to a game object e.g. a weapon doesn't have a damage etc but rather it has a collection of effects, some of which are applied on strike.  Makes extending really easy and items simple to implement.

It might run a bit slow but that will mainly be because the map view code needs optimising (a simple job I just haven't gotten around to yet), it runs fine for me under Ruby 1.9 on a 2 year old Macbook.

Gosu made the input and tile rendering simple.  Having bold-only fonts was a slight pain.  Big thanks for Julian and all the other Gosu contributors for making such a great library.

Having just started a new job development is currently suspended but hopefully I'll finish it one day.  If anyone gets any use out of the code I'll be happy.

One final thing - this is the first application I ever coded in Ruby, hence it's not as Ruby-ish as it probably could be and I've probably done some strange things.  On the flip side I've tried to lay it out logically and comment so it should be obvious how it all works.

There source can be found here:  http://github.com/salin/sanguine

steve
- By ippa Date 2010-06-03 19:42
Hey, cool.... I can't get down the strairs in my Win7 box though :P  (I'm pressing >)
- By ? Date 2010-06-04 16:45
lol that's probably because the stairs down code was the last thing I was working on.  Just looking at it I've hard coded the key id in game_window.rb:

elsif id == 47 && shift_down then Key.new(:portal_down)

I suspect substituting the magic number 47 for a proper Gosu kb will fix the problem.
- By ? Date 2010-06-04 16:53
Actually I think the problem is in portal() in agent.rb:

if destination == :up         
    self.game.map.portals[:down].location.arrive(self)      
else        
    self.game.map.portals[:up].location.arrive(self)       
end      

should be if destination == :down.  The big question on my mind is how was this ever working - I'll check at home:)
- By jlnr (dev) Date 2010-06-07 09:43
Please note that by using a magic number for the id you effectively limit the game to one OS, these are not the same everywhere :) The old correct way would be to use char_to_button_id("<"), except it's broken on 64-bit OS X and I had no idea how to fix it. Which is why char_to_button_id is deprecated now. It would be safer to use a key that is available everywhere and let the user change it, I guess.

(< is not a single key on US keyboards right? So char_to_button id would return nil using those, for example.)
- By salin Date 2010-06-08 16:55
I hadn't really given much thought to this (the hard-coded #id was just for testing).  Perhaps an interim solution of a key-id mapping mixin and script to update it.  At least would be re-usable.
Up Topic Gosu / Gosu Showcase / Sanguine - A roguelike game in Ruby / Gosu

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill