Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu News / Gosu 0.7.27 released (& 0.7.27.1 hotfix)
- - By jlnr (dev) Date 2011-01-29 15:12 Edited 2011-02-07 08:59
Hey,

Another release with a short but intense feature list:

• Windows: Switched from FMOD3 to Audiere
• All: Added Gosu::fps() that returns the approximate current framerate

Well, I'll leave it to public judgement which of these three changes is only a gimmick. ;) Please verify that your games still work.

The next stop is to replace much windowing code by glfw, after that, 0.8 is just around the corner.

The hotfix (0.7.27.1) mainly reverted to SDL_mixer again for Linux. Two other fixes:

• Linux: needs_cursor? should work again (thanks to TheOm3ga)
• C++: kbRangeBegin constant has been fixed on all platforms (thanks to shawn42)
Reply
Parent - - By Spooner Date 2011-01-29 18:02 Edited 2011-01-29 18:07
Killing fmod, at last, is a great boon! Thanks!

EDIT: Oh, forgot to say that I promised you $10 when fmod went away. Please feel free to tell me how to donate :P
Reply
Parent - - By RavensKrag Date 2011-01-29 18:06
Agreed, now I could actually sell my game if I wanted to.  Not that I see that happening any time soon, as I would first need a game to sell ^_^; but still, thanks for that.

The fact that as a result we now have the ability to alter the speed is pretty cool as well.  Don't see an immediate use for that myself, but I know how good the audio is in Braid as a result of having effects like that.  It should be cool to see what people do with it.
Reply
Parent - By jlnr (dev) Date 2011-01-30 07:47
You could alter the speed with FMOD too, but not SDL_mixer. If you have any collision or explosion sounds, just play them with Gosu::random(0.9, 1.1) for the speed argument. I like it. :)
Parent - By jlnr (dev) Date 2011-01-30 07:56
I do have PayPal, but contributions are more welcome. Sadly, most stuff on http://code.google.com/p/gosu/wiki/ToDo is creepy C++ right now.

Or you can point at 10 blatant English errors when I have my game's stringfile extracted? :<
Parent - - By RavensKrag Date 2011-01-29 18:03
Looks pretty cool.  The fps thing is pretty common, so I'm glad that's part of Gosu now.  It was probably a lot slower doing the calculation in Ruby, at least the way I was doing it.
Reply
Parent - - By jlnr (dev) Date 2011-01-30 07:44
Well, I do it in the most stupid and simplistic way, which was also okay to do in Ruby. :) Algorithmic contributions welcome, I only care about the FPS always being @100%, which I can still monitor using my approach.

http://code.google.com/p/gosu/source/browse/trunk/GosuImpl/Inspection.cpp
Parent - By RavensKrag Date 2011-01-31 08:29
Wow, this is much more simplistic than the way I was doing it, that's for sure.  I was dividing by the exact number of milliseconds to get a FPS value as a floating point decimal instead of the way you're doing it which just basically assumes that the time elapsed is close enough to a second, and that an integer value is good enough.

Personally, although it lacks precision, I prefer your method.  I assume it's faster, and it's certainly more elegant.
Reply
Parent - - By kyonides Date 2011-01-30 17:38
It sounds good but I can't get the libaudiere-dev package.
Reply
Parent - By TheOm3ga Date 2011-01-30 19:49
I guess you're talking about GNU/Linux. What distribution are you using?
Reply
Parent - By meustrus Date 2011-01-30 19:52
Here's my #1 question: What platforms support MIDI?
Reply
Parent - - By TheOm3ga Date 2011-01-30 19:58
This is great! Previously, with SDL_Mixer, every time I used a Gosu::Song, it took a while to close the game, it was some kind of lag. Now with that Audiere lib, it works flawlessly.

I'm also glad to have that speed control over the samples now in Linux. It will be very helpful to mimic, for instance, the rising sound of an engine acelerating.

Thanks.
Reply
Parent - By bestguigui Date 2011-02-01 19:10 Edited 2011-02-02 19:47
Great work ! Thanks !

By the way, I found a quick and easy way to solve the texture repetition and croping problem :

require "rubygems"
require "gosu"
require "opengl"
include Gl, Glu

class GLTexture
  # GOSU IMAGE -> OPENGL TEXTURE FIX
  # SOLVES PROBLEM WITH REPETITION / CROPING
  def initialize(p_win, filename)
    gosu_image = Gosu::Image.new(p_win, filename, true)
    array_of_pixels = gosu_image.to_blob
    @texture_id = glGenTextures(1)
    glBindTexture(GL_TEXTURE_2D, @texture_id[0])
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, gosu_image.width, gosu_image.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, array_of_pixels)
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
    gosu_image = nil
  end
 
  def get_id
    return @texture_id[0]
  end
end

That way I can easily get a proper texture id and use it in an OpenGL drawing. All that thanks to your new method, Gosu::Image#to_blob ! So, again, thank you !
Reply
Up Topic Gosu / Gosu News / Gosu 0.7.27 released (& 0.7.27.1 hotfix)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill