Categories
Games Hardware Programming

My new PyGamer device

The items from the PyGamer Starter Kit, fresh from the box, laid out: carrying case, speaker, PyGamer, acrylic enclosure kit, rechargeable battery, and button caps.
The PyGamer Starter Kit: Carrying case, speaker, PyGamer unit, acrylic enclosure kit, rechargeable battery, and button caps.
Founded in 2005, Adafruit Industries is a company that produces open-source hardware and electronics kits for hobbyists.

I’m now the proud owner of an Adafruit PyGamer game console! It’s an open-source handheld game player that you can program using MakeCode Arcade, CircuitPython, or Arduino.

I’d been meaning to get one for some time. There was a deal on them last weekend, so I placed an order for the PyGamer Starter Kit, which included all the goodies pictured above.

The PyGamer is a cute little unit that doesn’t take up very much space, as the photo below (shown beside a U.S. dollar bill and quarter for scale) shows:

Here’s a close-up photo of the front of the circuit board. That’s an analog joystick on the left, the screen in the middle, the “A” and “B” buttons on the right, and the “Select” and “Start” buttons along the bottom, with a row of five LED lights between them:

Want to know more about processors? Check out my recent presentation from November’s Tampa Devs meetup, How Computers Work “Under the Hood.”

Here’s the back of the circuit board. The most prominent features are the processor (the square thing in the center of the board), the two sockets to either side of the processor, which allow you to connect the unit to FeatherWing daughterboards for all sorts of hardware projects, and the three STEMMA connectors at the bottom, which make it easy to connect the unit to all sorts of sensors and devices:

The Starter Kit comes with pre-cut acrylic pieces that form a protective shell for the unit, plastic caps for the buttons, a speaker for game sounds, a rechargeable battery, and a carrying case. Here’s what the PyGamer looks like with the enclosure assembled:

What are its specs?

At the heart of the PyGamer is the ATSAMD51, a microcontroller built on the ARM Cortex M4 processor, which is used as the basis for a lot of chips for small devices or embedded controllers. Released in 2018, the ATSAMD51 is a 32-bit chip running at 120 MHz with 512K Flash memory and 192K of RAM. It’s not going to compete with a Raspberry Pi, but it’s more than enough for handheld retro-gaming.

The PyGamer board housing the processor provides these goodies:

  • An additional 8 MB of Flash memory for files, which is meant for game assets: images, sounds, fonts, and other data.
  • A MicroSD card slot for even more Flash memory.
  • A backlit 160 by 128-pixel color TFT display.
  • An analog thumb joystick, a scaled-down version of the ones you’ll find on PlayStation and Xbox controllers.
  • 4 buttons — the classic “A,” “B,” “Start,” and “Select.”
  • 5 Neopixel LEDs, whose colors can be individually controlled. These can be used for additional feedback, such as showing the user how many “lives” they have.
  • A 3-axis accelerometer for sensing motion.
  • A light sensor.
  • A headphone jack as well as a speaker driver. The PyGamer Starter Kit includes a speaker that plugs into the driver for headphone-free sound.

How do you program it?

The easiest way to program it is via MakeCode Arcade, a friendly programming tool that allows you to create games using drag-and-drop blocks like Scratch. It also supports game programming in JavaScript or Python with its game libraries.

Want to get a little more hardcore with the programming? It’s also programmable in CircuitPython, a version of Python made specifically for microcontroller boards.

Want to get even more hardcore? You can also program it in Arduino’s programming language, which is a mutant of C++.

Why did I get this thing?

For fun, of course — but also for sharpening my programming and hardware skills while having fun! In today’s world of laptops, virtual machines, and a zillion abstractions that distance programmers from their systems’ “bare metal,” having a low-level understanding of computers is an increasingly rare skill. As always, I’m trying to set myself apart.

I’ll also use it in an upcoming video series on programming — watch this space in 2024 for more!

Categories
Games Hardware Humor

Know your logic gates!

Need explainers?

Categories
Conferences Games Programming

Learn Godot Game Engine along with game designer Terry Cavanaugh!

Who’s Terry Cavanaugh?

Terry Cavanaugh poses with a Nintendo Switch.
Terry Cavanaugh.

Terry Cavanaugh is an indie game developer based in Monaghan, Ireland. His portfolio includes the commercial games  Dicey Dungeons

Super Hexagon (which is super-hard)…

…and VVVVVV (which is frustrating and maddening in the best possible way):

He’s also behind some freeware gems, including At a DistanceDon’t Look Back, and Tiny Heist.

What’s Godot Game Engine?

Godot Game Engine logo

Godot Game Engine is an free-as-in-beer, free-as-in-speech game engine for developing 2D and 3D games for desktop, web, mobile, and XR platforms.

2D game being designed in the Godot  IDE.
Tap to view at full size.

(In case you’re wondering, it’s pronounced “Go-DOH”, and the name comes from the Samuel Beckett’s absurdist play Waiting for Godot.)

3D game being designed in the Godot IDE.
Tap to view at full size.

You code Godot games in C, C++, C#, and their own Python-like language, GDScript.

Here’s the list of Godot Game Engine’s “pros” from gamedesigning.org:

  • Platform integration: you can easily upload creations to different platforms. If you want to get your project out easily and quickly, this is an option for you.
  • Constantly updated: The developers are hard at work updating Godot. Since it’s free, this is a pretty cool aspect, so I recommend throwing a few donations dollars their way!
  • It’s free: It’s completely free! No packages! No subscription models! No memberships!
  • Great User Interface: The UI is easy to use and read, leading to better and more comprehensive game development
  • Scripting: The ease of use for scripting is actually a lot easier than many different engines. They use their own invented script, titled GDScript. It’s easier to pick up and translates beautifully into finished projects and assets
  • Community and online resources: As I said before, the community for Godot is supportive and has a huge presence online. I got lost in a YouTube rabbit hole looking at some Godot tutorials videos alone. Again, I recommend the subreddit for engaging with the community and checking out the actual Godot site for some demos and tutorials for beginners.
  • Seamless Downloads: You can download it right from the browser and get going immediately with the self-contained program. Have at it!

How can you learn Godot Game Engine with Terry Cavanaugh?

Screen shot of Terry Cavanaugh’s “Stop Waiting for Godot” page.

“Let’s all learn Godot, next weekend!” wrote Terry Cavanaugh on this page. “Sometimes the word ‘game jam’ means competition, but that’s not really the vibe I’m going for here. There’s no judging, and nobody is going to win. Or, if you prefer, as they say over at Ludum Dare, your game is your prize.”

That’s the plan — he’s going to learn Godot by building a game, and he’s inviting people to come along for the ride. You can even build one as he builds one.

I think I’ll check it out. It sounds like fun, and might be a interesting way to put my recently-acquired gaming laptop through some new paces.

The details