Posts | Comments

Planet Arduino

Archive for the ‘game engine’ Category

For owners of Sinclair ZX Spectrum computers in the ‘80s, few games were more desirable than Matthew Smith’s Manic Miner. It is very much a classic and has official and unofficial ports available for just about every console and computer released since. There was even a port made for Microsoft’s Zune MP3 player. And now you can play it on an Arduino UNO thanks to Scott Porter’s custom game engine and port.

This isn’t the first time someone has done this, as James Bowman created a Manic Miner port for Gameduino a decade ago. But Porter’s project is a little different. His port runs on a custom engine on an Arduino UNO Rev3 that produces composite video output through a custom shield. That shield also contains a speaker driver circuit, buttons for control, and a port to connect an NES controller for a more comfortable gaming experience.

Porter’s biggest challenge was generating video, as that requires very accurate timing. For that reason, he recommends using an official UNO and not generic boards that sometimes cut corners with resonators instead of crystals. 

The game engine is impressive, with a fixed framerate of 50fps at 256×256 and up to nine sprites on screen. One of those sprites can have pixel-perfect collision detection with all of the others, which is ideal for a game like Manic Miner. But the video is monochrome and there do seem to be some glitches evident in the demonstration video. Regardless, this is very impressive and we’re excited to see what else Porter can achieve with his engine. 

The post This new game engine runs Manic Miner on an Arduino UNO appeared first on Arduino Blog.

A neat little hacker project that’s flying off the workbenches recently is the Arduboy. This tiny game console looks like a miniaturized version of the O.G. Game Boy, but it is explicitly designed to be hacked. It’s basically an Arduino board with a display and a few buttons, anyway.

[rv6502] got their hands on an Arduboy and realized that while there were some 3D games, there was nothing that had filled polygons, or really anything resembling a modern 3D engine. This had to be rectified, and the result is pretty close to Star Fox on a microcontroller.

This project began with a simple test on the Arduboy to see if it would be even possible to render 3D objects at any reasonable speed. This test was just a rotating cube, and everything looked good. Then began a long process of figuring out how fast the engine could go, what kind of display would suit the OLED best, and how to interact in a 3D world with limited controls.

Considering this is a fairly significant engineering project, the fastest way to produce code isn’t to debug code on a microcontroller. This project demanded a native PC port, so all the testing could happen on the PC without having to program the Flash every time. That allowed [rv] to throw out the Arduino IDE and USB library; if you’re writing everything on a PC and only uploading a hex file to a microcontroller at the end, you simply don’t need it.

One of the significant advances of the graphics capability of the Arduboy comes from exploring the addressing modes of the OLED. By default, the display is in a ‘horizontal mode’ which works for 2D blitting, but not for rasterizing polygons. The ‘vertical addressing mode’, on the other hand, allows for a block of memory, 8 x 128 bytes, that maps directly to the display. Shove those bytes over, and there’s no math necessary to display an image.

This is, simply, one of the best software development builds we’ve seen. It’s full of clever tricks (like simply not doing math if you’ll never need the result) and stuffing animations into far fewer bytes than you would expect. You can check out the demo video below.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook