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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Fun With Ruby And Gosu Javier Ramirez

4,309
views

Published on

Slides for javier ramirez's talk at EuRuKo 2009

Slides for javier ramirez's talk at EuRuKo 2009

Published in: Technology

0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,309
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
37
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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