Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
EuRuKo presents

Javier Ramírez
 (javier@formatinternet.com)
          * in *
  Fun with Ruby
(and without r***s)

Program your own
 games with Gosu
the characters
Ruby ................. as The Damsel
Hardware ............ as The Villain
 Gosu ...................... as The Hero
 Chipmunk ........ as The Scientist
  Rubyscript2exe ........ as Himself
why games
work   rest   play   sleep




improve, have fun
why ruby

because i can!
less code, less clutter
easy to try out
why me
                             HTML
        PASCAL /
BASIC               C/C++             JAVA   RUBY
                              ASP
          DBase
LOGO                 SQL               PHP
                    VBasic JavaScript
        Assembler
Non-technical considerations
   concept
 ●


   game specs / core design
 ●


   gameplay/game mechanics
 ●


   balance
 ●


   look and feel
 ●



     More at “Game Architecture and Design: A New Edition”
     by Andrew Rollings & David Morris
Part I

what's in a game?
  (game development 101)
Web Development Abstraction
One ring to rule them all
Game Development Abstraction




  3D games are the same, just harder
Game Development Components
the living game
Development Components
    main loop / event loop
●


    game logic: levels, collisions, AI ...
●


    stateless images (tiles / models)
●


    stateful images (sprites / models)
●


    sound FX and music
●
Part II

when Ruby met Gosu
about
by Julian Raschke and Jan Lücker
Gosu ( 고수 ): High Hand - Leader
C++ + Ruby Bindings

http://code.google.com/p/gosu/
 (http://tinyurl.com/euruko-gosu)
design rationale
Bloatfree: Gosu aims to contain everything that
is necessary to write a game in clean C++ or
Ruby code, yet not much more.

Reality-driven: Everything in Gosu exists for
the same single reason: It was necessary for
an existing project. Nothing was, and will ever
be, added out of boredom.
game demo
source code

http://tinyurl.com/euruko-games

 http://code.google.com/p/eurukuest
     (http://tinyurl.com/eurukuest)
Gosu::Window
Gosu::Image

load individually or tiled
drawing can be rotated / scaled
supports z-index
can use Rmagick objects
Gosu::Sample & Gosu::Song
full playback control
  volume, speed, pause, resume,
  stop, pan

looping supported
       midi are better if converted to XM
Gosu::Font

can be a system font or a file
easy to check the real width
supports rotation and scaling
code walkthrough
about
by Scott Lembcke

A 2D rigid body physics library, designed
with 2D video games in mind.
http://code.google.com/p/chipmunk-physics
    (http://tinyurl.com/euruko-chipmunk)
about
about
chipmunk basics
Space
Body
Shape
Vect
Joint
Part III

your 15 minutes of fame
doing it is just half the fun
tar2rubyscript
by Erik Veenstra

RBA file:
init.rb => tar + base64 + comments
rubyscript2exe
by Erik Veenstra
 packages ruby, the script and all
 dependencies together into an
 executable file.

 works on windows, linux, OSx
rubyscript2exe
First Step: it runs the application,
checking for all the required
gems and scripts, creating a list
of dependencies to include in
the executable
rubyscript2exe
The “Environment Embedding Executable”
gzips all the dependencies
and attaches the file to a copy of eee
muhahahahaha!
 http://formatinternet.com
 javier@formatinternet.com
 http://twitter.com/supercoco9
 http://www.workingwithrails.com/
 person/5987-javier-ramirez

More Related Content

Fun With Ruby And Gosu Javier Ramirez