Skip to content

Instantly share code, notes, and snippets.

@bil-bas
Created October 25, 2010 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bil-bas/644723 to your computer and use it in GitHub Desktop.
Save bil-bas/644723 to your computer and use it in GitHub Desktop.
The calling order of draw and update are inverted in Gosu 0.7.24 on Windows
require 'gosu'
include Gosu
class Game < Gosu::Window
def initialize
super 640, 480, false
@count = 4
end
def update
p ["update", milliseconds]
@count -= 1
exit if @count == 0
end
def draw
p ["draw", milliseconds]
@count -= 1
exit if @count == 0
end
end
Game.new.show
# Windows 7x64
#
# ["draw", 1581786]
# ["update", 1581792]
# ["draw", 1581832]
# ["update", 1581833]
# Ubuntu x64
#
# ["update", 49031508]
# ["draw", 49031509]
# ["update", 49031523]
# ["draw", 49031748]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment