The slides of the talk I gave at DeccanRubyConf, 2014. It includes game history, concepts of game programming and about GOSU.
GOSU is a 2D game development framework. It works well for c++ and Ruby.
C++ by Julian Raschke and Jan Lucker. • Official Website: http://www.libgosu.org • Official game board: http://www.libgosu.org/cgi- bin/mwf/board_show.pl?bid=2
increase fall count by 1! @fall_count += 1 ! ! #egg should move -400 to be visible at the screen! current_egg.x = current_egg.x - (400 * @fall_count)! ! end
@config['game']['gravity'] if egg.free_fall! ! #when pressed space, current egg should fall! if button_down?(Gosu::KbSpace)! egg.free_fall!! #to move the curret egg left only when it is not free fall! elsif button_down?(Gosu::KbLeft) && !egg.free_fall! egg.x = egg.x - 10 if egg.x > 100! elsif button_down?(Gosu::KbRight) && !egg.free_fall! egg.x = egg.x + 10 if egg.x < 700! end! end