Forums Archived

The forums are being archived. See this topic for more information.

rubygame slow. Increasing fps?

Get help and support with Rubygame

rubygame slow. Increasing fps?

Postby programx » Fri Dec 24, 2010 2:10 am

Hi all, some time ago that I program in pygame and I appreciate the difference in rubygame, and the latter I found much better syntactic and also much more understandable, more like an improved version of pygame, but I could note is that it is much slower than pygame, as did several tests from some games I had in a pygame to rubygame and when in pygame they ran at 60 fps, in rubygame ran at 30 fps, then my question is:
There is a way to optimize rubygame?, use Surface['image'] to load the images and do not know if that affects performance, or if there is any better method to upload images or a trick to raise the fps I would be grateful, Greetings!.

By the way, I use windows xp, ruby 1.9.2 and rubygame 2.6.4 (i install it via rubygems).
User avatar
programx
 
Posts: 3
Joined: Fri Nov 05, 2010 4:55 am

Re: rubygame slow. Increasing fps?

Postby programx » Mon Dec 27, 2010 1:36 pm

I see no answer to this question, to draw in rubygame fps plummet, and already tried everything but it seems the same library, I definitely change to Gosu, I did some tests and is much faster .
User avatar
programx
 
Posts: 3
Joined: Fri Nov 05, 2010 4:55 am

Re: rubygame slow. Increasing fps?

Postby Rusty » Tue Dec 28, 2010 4:48 am

Try using ruby-prof to profile your application and see where the bottlenecks are.

Code: Select all
require File.expand_path(File.dirname(__FILE__)) + "/config/environment.rb"
require 'ruby-prof'
results = RubyProf.profile do
  game = Game.new
  game.run
end
printer = RubyProf::GraphHtmlPrinter.new(results)
printer.print(File.new("report.html","w"))


You can produce something like this:

Image
Rusty
 
Posts: 3
Joined: Sun Dec 26, 2010 10:50 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron