Schlagwort: PyGame

  • Code the Classics on sale now

    Code the Classics on sale now

    Reading Time: 4 minutes

    TL;DR: we made a fully automated luxury gay space communist type-in-listing book. Buy it now and get it in time for Christmas.

    Code the Classics cover

    Back in the dawn of time, in the late 1980s, I grew up on a diet of type-in computer game listings. From the BBC Micro User Guide, to The Micro User magazine, to the ubiquitous Usborne books: an hour or two of painstaking copying and a little imagination would provide you with an experience which wasn’t a million miles away from what you could buy on the shelves of your local computer store.

    Can you believe they did “Machine Code for Beginners”?

    The simple act of typing in a game helped to familiarise you with a programming language (usually a dialect of BASIC), and by making mistakes you could start to understand what other, more intentional changes might accomplish. Some of the earliest games I wrote started off as heavily modified versions of type-in listings; in fact, one of these made a sneaky reappearance on this blog last year.

    Fast forward to the present day, and aside from regular appearances in our own MagPi and Wireframe magazines, type-in listings have faded from view. Commercial games, even casual ones, have become much more sophisticated, beyond what you might expect to be able to enter into a computer in a reasonable amount of time. At the same time, tools like Unity remove the need to develop every title from the ground up.

    But there’s still a lot to be said for the immediacy of the type-in experience. Three years ago, we asked ourselves whether we could make a type-in game listing book for the modern era. The end result, of which we’re launching the first volume today, is Code the Classics. David Crookes and Liz Upton will take you behind the scenes of the creation of five classic arcade games, and then I’ll show you how to implement a simple Python game inspired by each one.

    Cavern

    Substitute Soccer

    Developing retro arcade games has been a hobby of mine since those early BBC Micro days, and I spent many happy evenings developing these titles, ably assisted by Andrew Gillett and Sean Tracey. It was important to us that these games be as close as possible to the standard of modern commercial casual games. With this in mind, we invited Dan Malone, famous among many other things for his work with The Bitmap Brothers, to provide graphics, and long-time game audio pro Allister Brimble to provide music and sound effects. I’ve known Dan for nearly twenty years, and have admired Allister’s work since childhood; it was an enormous pleasure to work with them, and we took the opportunity to snag interviews with them both, which you’ll also find in the book. Here’s Dan to offer you a taster.

    Meet the artist behind Code the Classics

    Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

    We’ve pushed the boat out on the production values for the book itself too: think of it as an object from a parallel universe where Usborne made luxury hardbound coffee-table type-in listing books rather than paperbacks.

    So although, like all our books, you can download this one for free, you’ll really want a physical copy of Code the Classics to have, and to hold, and to leave on your bedside table to club intruders with.

    And while the listings are rather long, and fully-commented versions are available on GitHub, perhaps you should think about spending a rainy afternoon actually typing one in.

    Website: LINK

  • Pre-order Code the Classics today!

    Pre-order Code the Classics today!

    Reading Time: 2 minutes

    Today, we are proud to announce Code the Classics, the latest (and long-awaited) publication from Raspberry Pi Press.

    Pre-order Code the Classics today

    Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

    Code the Classics

    Code the Classics not only tells the stories of some of the seminal video games of the 1970s and 1980s, but shows you how to create your own games inspired by them using Python and Pygame Zero, following examples programmed by Raspberry Pi founder Eben Upton.

    Get game design tips and tricks from the masters. Explore the code listings and find out how they work.

    Learn how to code your own games with Pygame Zero. Download and play games examples by Eben Upton.

    Pre-order Code the Classics today

    Code the Classics is available to pre-order now from the Raspberry Pi Press online store, and it will be released in time for Christmas on 13 December. Pre-order today for FREE UK shipping.

    Code the Classics is the perfect gift for anyone with fond memories of the video games of the 1970s and 1980s, and it’s also a brilliant way for young coders to get into understanding the code mechanics behind gaming, helping to inspire them to create their own.

    Website: LINK

  • The Fisher Piano: make music in the air

    The Fisher Piano: make music in the air

    Reading Time: 2 minutes

    Piano keys are so limiting! Why not swap them out for LEDs and the wealth of instruments in Pygame to build air keys, as demonstrated by Instructables maker 2fishy?

    Raspberry Pi LED Light Schroeder Piano – Twinkle Little Star

    Raspberry Pi LED Light Schroeder Piano – Twinkle Little Star

    Keys? Where we’re going you don’t need keys!

    This project, created by either Yolanda or Ken Fisher (or both!), uses an array of LEDs and photoresistors to form a MIDI sequencer. Twelve LEDs replace piano keys, and another three change octaves and access the menu.

    Each LED is paired with a photoresistor, which detects the emitted light to form a closed circuit. Interrupting the light beam — in this case with a finger — breaks the circuit, telling the Python program to perform an action.

    2fishy LED light piano raspberry pi

    We’re all hoping this is just the scaled-down prototype of a full-sized LED grand piano

    Using Pygame, the 2fishy team can access 75 different instruments and 128 notes per instrument, making their wooden piano more than just a one-hit wonder.

    Piano building

    The duo made the piano’s body out of plywood, hardboard, and dowels, and equipped it with a Raspberry Pi 2, a speaker, and the aforementioned LEDs and photoresistors.

    2fishy LED light piano raspberry pi

    A Raspberry Pi 2 and speaker sit within the wooden body, with LEDs and photoresistors in place of the keys.

    A complete how-to for the build, including some rather fancy and informative schematics, is available at Instructables, where 2fishy received a bronze medal for their project. Congratulations!

    Learn more

    If you’d like to learn more about using Pygame, check out The MagPi’s Make Games with Python Essentials Guide, available both in print and as a free PDF download.

    And for more music-based projects using a variety of tech, be sure to browse our free resources.

    Lastly, if you’d like to see more piano-themed Raspberry Pi projects, take a look at our Big Minecraft Piano, these brilliant piano stairs, this laser-guided piano teacher, and our video below about the splendid Street Fighter duelling pianos we witnessed at Maker Faire.

    Pianette: Piano Street Fighter at Maker Faire NYC 2016

    Two pianos wired up as Playstation 2 controllers allow users to battle…musically! We caught up with makers Eric Redon and Cyril Chapellier of foobarflies a…

    Website: LINK