How to make Python Games with Trinket

I’m very excited to announce a new and much-requested feature.  Our latest update lets you make cool interactive games by letting our Python Trinkets react to click and key events.  But, in true Trinket spirit, how about I show you first, then tell:

Turtles in Space is a simple asteroids clone that demonstrates this new speed and interactivity, adapted from “Python Programming Fundamentals” by Kent Lee.  You can move around with the arrow keys and fire with the ‘x’ key.  Each asteroid is a Turtle, as are the bullets it fires.  Before Trinket, running this awesome Python game would take downloading and installing software and working through compatibility problems.  By putting Python games in a Trinket, now anyone can see how the game works, remix it, and share it over the internet.

Our awesome Trinket users have already started making cool interactive programs.  Check out this simple drawing program by Patrick Rodriguez:

Want to change the rules of the game? Try remixing either of these programs!  Tweet the link @trinketapp and we’ll feature your work.

We’re building out challenges that will help you build our own games, step-by-step.  Interested?  Email us at hello@trinket.io for more information and a sneak peek! We’re always looking for help testing what we build with students.  And, as always, we’d love to hear your feedback and suggestions- we couldn’t do it without you!

  • Aleta Chowfin

    Hi, I am just in the process of setting up a maze game in Trinket and have some issues with the key movement. Would you have any suggestions?

  • http://www.grantjenks.com Grant Jenks

    For a collection of Free Python Games that run on Trinket check out http://www.grantjenks.com/docs/freegames/ All the games use Python’s Turtle module which Trinket has copied here. Several arcade classics like Tron and Pacman are included.