RubyGosuTutorial: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
(4 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
== A warm welcome to the totally useless Game Programming in Ruby tutorial ==
 
== A warm welcome to the totally useless Game Programming in Ruby tutorial ==
  
<div style="font-family: Monaco, Courier"><pre>
 
sudo gem install gosu or download from [http://code.google.com/p/gosu gosu website]
 
gosu introduction: [http://code.google.com/p/gosu/wiki/RubyTutorial]
 
for platformer tile physics see [http://jnrdev.72dpiarmy.com]
 
  
example game code: [http://github.com/oneup/puituniverse/tree/master poit universe]
+
* <code>sudo gem install gosu</code> or download from [http://code.google.com/p/gosu gosu website]
</pre></div>
+
* read gosu introduction: [http://code.google.com/p/gosu/wiki/RubyTutorial GosuWiki::RubyTutorial]
 +
* for super mario style platformer tile physics see [http://jnrdev.72dpiarmy.com jnrdev]
 +
 
 +
shortcut:
 +
 
 +
<pre>require 'gosu'
 +
 
 +
class GameWindow < Gosu::Window
 +
  def initialize
 +
    super(640, 480, false)
 +
    self.caption = "Gosu Tutorial Game"
 +
   
 +
    @background_image = Gosu::Image.new(self, "media/Space.png", true)
 +
  end
 +
 
 +
  def update
 +
  end
 +
 
 +
  def draw
 +
    @background_image.draw(0, 0, 0);
 +
  end
 +
end
 +
 
 +
window = GameWindow.new
 +
window.show</pre>
 +
 
 +
== Poit (Isn't Puit). ==
 +
* open source ruby game : [http://github.com/oneup/puituniverse/tree/master poit universe]
 +
* for git usage see [[GitTutorial]]
 +
 
 +
 
 +
 
 +
 
 +
 
 +
== Gosu Lacks (aka... needs own OpenGL code) ==
 +
We wan't to replicate the full feature-set of oldschool 2D gaming, hence: ^^(see above)
 +
 
 +
<div style="color: orange">
 +
* Pixel Operations (Putpixel)
 +
* Palette Swap (-> from: CuteWars.python)
 +
* Animation System built-in (PuitWars' kyoto has this)
 +
</div>

Version vom 12. Juni 2009, 04:48 Uhr

A warm welcome to the totally useless Game Programming in Ruby tutorial

shortcut:

require 'gosu'

class GameWindow < Gosu::Window
  def initialize
    super(640, 480, false)
    self.caption = "Gosu Tutorial Game"
    
    @background_image = Gosu::Image.new(self, "media/Space.png", true)
  end

  def update
  end

  def draw
    @background_image.draw(0, 0, 0);
  end
end

window = GameWindow.new
window.show

Poit (Isn't Puit).



Gosu Lacks (aka... needs own OpenGL code)

We wan't to replicate the full feature-set of oldschool 2D gaming, hence: ^^(see above)

  • Pixel Operations (Putpixel)
  • Palette Swap (-> from: CuteWars.python)
  • Animation System built-in (PuitWars' kyoto has this)