Game Development Reference
In-Depth Information
127 end
128
129 GameWindow . new . show
Run it, use WASD to navigate, up / down arrows to zoom and spacebar to reset the camera.
$ ruby 02-warmup/coordinate_system.rb
It doesn't look impressive, but understanding the concept of different coordinate systems
and being able to stitch them together is paramount to the success of our final product.
Prototype of separate coordinate systems
Luckily for us, Gosu helps us by providing Gosu::Window#translate that handles
camera offset, Gosu::Window#scale that aids zooming, and
Gosu::Window#rotate that was not used yet, but will be great for shaking the view
to emphasize explosions.
Search WWH ::




Custom Search