Fun With Ruby And Gosu Javier Ramirez
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Fun With Ruby And Gosu Javier Ramirez

on

  • 6,451 views

Slides for javier ramirez's talk at EuRuKo 2009

Slides for javier ramirez's talk at EuRuKo 2009

Statistics

Views

Total Views
6,451
Views on SlideShare
6,226
Embed Views
225

Actions

Likes
6
Downloads
37
Comments
0

8 Embeds 225

http://formatinternet.wordpress.com 170
http://coderwall.com 25
http://www.slideshare.net 20
http://www.slideee.com 3
https://twitter.com 3
http://planeta.aspgems.com 2
http://localhost:3001 1
http://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Fun With Ruby And Gosu Javier Ramirez Presentation Transcript

  • 1. EuRuKo presents Javier Ramírez (javier@formatinternet.com) * in * Fun with Ruby (and without r***s) Program your own games with Gosu
  • 2. the characters Ruby ................. as The Damsel Hardware ............ as The Villain Gosu ...................... as The Hero Chipmunk ........ as The Scientist Rubyscript2exe ........ as Himself
  • 3. why games work rest play sleep improve, have fun
  • 4. why ruby because i can! less code, less clutter easy to try out
  • 5. why me HTML PASCAL / BASIC C/C++ JAVA RUBY ASP DBase LOGO SQL PHP VBasic JavaScript Assembler
  • 6. 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
  • 7. Part I what's in a game? (game development 101)
  • 8. Web Development Abstraction
  • 9. One ring to rule them all
  • 10. Game Development Abstraction 3D games are the same, just harder
  • 11. Game Development Components
  • 12. the living game
  • 13. Development Components main loop / event loop ● game logic: levels, collisions, AI ... ● stateless images (tiles / models) ● stateful images (sprites / models) ● sound FX and music ●
  • 14. Part II when Ruby met Gosu
  • 15. 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)
  • 16. 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.
  • 17. game demo
  • 18. source code http://tinyurl.com/euruko-games http://code.google.com/p/eurukuest (http://tinyurl.com/eurukuest)
  • 19. Gosu::Window
  • 20. Gosu::Image load individually or tiled drawing can be rotated / scaled supports z-index can use Rmagick objects
  • 21. Gosu::Sample & Gosu::Song full playback control volume, speed, pause, resume, stop, pan looping supported midi are better if converted to XM
  • 22. Gosu::Font can be a system font or a file easy to check the real width supports rotation and scaling
  • 23. code walkthrough
  • 24. 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)
  • 25. about
  • 26. about
  • 27. chipmunk basics Space Body Shape Vect Joint
  • 28. Part III your 15 minutes of fame
  • 29. doing it is just half the fun
  • 30. tar2rubyscript by Erik Veenstra RBA file: init.rb => tar + base64 + comments
  • 31. rubyscript2exe by Erik Veenstra packages ruby, the script and all dependencies together into an executable file. works on windows, linux, OSx
  • 32. 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
  • 33. rubyscript2exe The “Environment Embedding Executable” gzips all the dependencies and attaches the file to a copy of eee
  • 34. muhahahahaha! http://formatinternet.com javier@formatinternet.com http://twitter.com/supercoco9 http://www.workingwithrails.com/ person/5987-javier-ramirez