Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Getting keyboard input without pause in Ruby.

I know the gets method exists, but this is for simple command line games. I want to be able to take keyboard inputs without interrupting the flow of my code. So you would press the down arrow and the character moves down. Is there a way to do this in Ruby?

Hey! Not sure if there is an easier way but thought it was an interesting question and stumbled across this:

https://leanpub.com/developing-games-with-ruby/read (Moving Things With Keyboard Section)

Leverages a game library (Gosu).

2 Answers

Yw, good luck with your game! : )

This looks like a great resource and should have all the answers to my questions. It will probably even have answers to questions I haven't yet thought to ask. Thank you!