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 trialJonathan Carpenter
10,251 PointsGetting 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?
2 Answers
Abigail Glunn
10,068 PointsYw, good luck with your game! : )
Jonathan Carpenter
10,251 PointsThis 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!
Abigail Glunn
10,068 PointsAbigail Glunn
10,068 PointsHey! 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).