I am looking for a good graphical structure to make a good 2D game in Ruby. I did 3 very simple tests to see which Ruby graphical structure is faster between Gosu and Rubygame . The test creates 1000 instances of the "Square" class, which move and draw a red square in the simplest way using the framework method. The third test is the same thing, but in a clean OpenGL implementation (without any frameworks). Here are the results:
PURE OPENGL (using ruby-opengl) 80Fps: alt text http://grab.by/JTM
GOSU (using ruby-opengl + gosu) 46Fps: alt text http://grab.by/JTC
RUBYGAME (using ruby-opengl + rubygame + rsdl) 32Fps: alt text http://grab.by/JTw
Why is there such a big fps difference between a pure OpenGL test and a Rubygame or Gosu test? (they both use opengl)
Are these frameworks really reliable or is there a better framework I should use? (I don’t see how I view the whole process of loading images of sounds and fonts in pure OpenGL: p)
What is your opinion?
ruby opengl rubygame libgosu
XPac27
source share