jrx

PortaBrick Arcade – game console from 100% LEGO and Python

Recommended Posts

Today I would like to introduce you to my latest MOC: The PortaBrick Arcade. It is a fully functional mobile arcade game console built entirely out of LEGO®. The PortaBrick Arcade consists of 432 parts and weighs about 520 grams including the battery. The software is based on the @Pybricks project.

Quite unlike any other game console currently on the market from the Danish bricks, the PortaBrick Arcade is 100% functional. The whole thing came out of a university project and was supposed to be just a small demonstrator for driver development and as a tool to brush up my Python skills. But as it is sometimes, things turned out differently. So I had a lot of fun writing games for the demonstrator. Thus, it was quickly decided that I would build a nice case around the naked basic framework. And with this then complete game console the first "test persons" played, were quite excited and so it came that I threw all original plans overboard and concentrated completely on the game console. The result is now the PortaBrick Arcade.

53126852951_e02499fb52_z.jpg

I created the console in Python/MicroPython. As software I had to resort to the source-open framework Pybricks, because LEGO software only recently started to support programming in Python again. If everything works out, I will (eventually) port the program code to the LEGO platform (LEGO Spike App).

The heart of the PortaBrick Arcade is the Spike Prime Hub (nearly identical to the Mindstorms Hub from set 51515). The game console has two displays: Below a monochrome one with a resolution of 5x5 pixels. The upper display can show colors and has a resolution of 6x6 pixels. This upper display is also one of the special features of the MOC. It is composed of four single modules of the Spike ColorLightMatrix. For this I had to write my own driver to be able to control all four displays as one.

53126331787_9145cec551_w.jpg

When the first game ran, it quickly became apparent that the whole thing was nice, but poorly usable. While playing, it became evident that input via the two buttons was poorly recognized. The program's flow is to blame for this. All instructions are processed one after the other. And so that a human being can recognize and play something at all, I worked with a short pause in the program flow. Problem: During the pause and during the instructions, which have nothing to do with the input, no input is accepted. So I needed something like concurrent programming or a way to process instructions in parallel (called multi-threading). However, Micropython does not support this out of the box and the used framework Pybricks does not support it at all. I found the solution in the concept of so-called generators. If you want to read more about this, you can visit my blog.

53127332758_a5a6a0838a_n.jpg 53127060939_bba379b271_n.jpg

Enough of the technology, on to the content: Currently, the game console runs two games. One is the Nokia classic Snake, and the other is Pong, one of the arcade veterans of all time. Both are currently solo player games. If there should ever be a second console like this (who will have the heart to build the second one??), then Pong can be switched to multiplayer. Two players, double the fun!

53127456003_f6fe6d8606_n.jpg 53127380145_e5fb5e2e6a_n.jpg

Also part of the project was a "Pixel Art Painter", a small application that allows you to paint pixel images for the PortaBrick Arcade and then transfer them to the program code. The source code of the whole project is available on Github for anyone interested.

If you have any questions about the project, just ask! Otherwise I'm looking forward to your feedback.

P.S. If you like the project, feel free to support me on LEGO Ideas. There I have posted the PortaBrick Arcade as a project and keep my fingers crossed. To all who support me and to those who supported me right after the start, thank you very much!


53126256252_493bca9a72.jpg

Edited by jrx

Share this post


Link to post
Share on other sites

Very unique and impressive!

5 minutes ago, 2GodBDGlory said:

Do you have a video of it playing?

Lego Ideas page has a video.

Share this post


Link to post
Share on other sites
3 hours ago, 2GodBDGlory said:

That's an impressive project, and nice presentation! Do you have a video of it playing?

The pics showing "P" and "S" are videos hosted at flickr. Or as @Davidz90 mentioned you'll see them at the ideas page. In a few days a more technical video will come where I share more insights.

Edited by jrx

Share this post


Link to post
Share on other sites

Cool project, but I think it would have been better on Rebrickable to have people enjoy it. As I think it will make no chance on ideas, basically just a prime hub with extra parts. People already having these hubs might have remade it, don't think anyone not having the hub yet will buy a 400€+ ideas set.

Is it still 2 years of waiting before allowed to publish on other sites once you have submitted to Ideas?

It's like the Johhny5 build, it was doing really good on Rebrickable, but had to be pulled from RB as it was on Ideas submitted. As it was to close to an already existing set, and had lots of electronics it made no chance to become a set. 2 years people asking for the instructions to be back on RB, and now it is, and still popular.

I think for all MOC's using hubs it's best to just submit online instructions. People already owning 1 or more of them will buy the extra needed parts if interested in the model.

Edited by Mr Jos

Share this post


Link to post
Share on other sites
3 hours ago, vascolp said:

Pretty cool indeed!

Thx a lot!

2 hours ago, Mr Jos said:

Cool project, but I think it would have been better on Rebrickable to have people enjoy it.

I thought hard and long about it. Point is that the ColorLightMatrix modules are really expensive. Can't imagine that someone will buy them for more than a hundred bucks. The hub is not the point.

2 hours ago, Mr Jos said:

Is it still 2 years of waiting before allowed to publish on other sites once you have submitted to Ideas?

We'll see. In my opinion it's maybe a set that's more appealing to young users than robots. It's computer gaming – with opportunity to create your own games with ease. That's a novelty in the LEGO universe for now.

Share this post


Link to post
Share on other sites

Nice work! Too bad there's no chance it would ever get released as an official Ideas set - no Technic entry has ever been accepted and this is a lot more niche than other Technic Ideas entries.

It reminds me of another gaming console made out of Lego which I stumbled upon a while ago:

 

Share this post


Link to post
Share on other sites

Thanks a lot @Mikdun!

Update on project:
Yesterday I made a major update to the codebase. Most important change: From now on more than the first two games are supported. -> https://github.com/lc-jrx/PortaBrick_Arcade

Besides this I'm really happy that the project reached the first milestone on LEGO Ideas. I would like to thank everyone who cast their vote.

Share this post


Link to post
Share on other sites
On 8/21/2023 at 3:55 PM, jrx said:

Today I would like to introduce you to my latest MOC: The PortaBrick Arcade. It is a fully functional mobile arcade game console built entirely out of LEGO®. The PortaBrick Arcade consists of 432 parts and weighs about 520 grams including the battery. The software is based on the @Pybricks project.

Quite unlike any other game console currently on the market from the Danish bricks, the PortaBrick Arcade is 100% functional. The whole thing came out of a university project and was supposed to be just a small demonstrator for driver development and as a tool to brush up my Python skills. But as it is sometimes, things turned out differently. So I had a lot of fun writing games for the demonstrator. Thus, it was quickly decided that I would build a nice case around the naked basic framework. And with this then complete game console the first "test persons" played, were quite excited and so it came that I threw all original plans overboard and concentrated completely on the game console. The result is now the PortaBrick Arcade.

53126852951_e02499fb52_z.jpg

I created the console in Python/MicroPython. As software I had to resort to the source-open framework Pybricks, because LEGO software only recently started to support programming in Python again. If everything works out, I will (eventually) port the program code to the LEGO platform (LEGO Spike App).

The heart of the PortaBrick Arcade is the Spike Prime Hub (nearly identical to the Mindstorms Hub from set 51515). The game console has two displays: Below a monochrome one with a resolution of 5x5 pixels. The upper display can show colors and has a resolution of 6x6 pixels. This upper display is also one of the special features of the MOC. It is composed of four single modules of the Spike ColorLightMatrix. For this I had to write my own driver to be able to control all four displays as one.

53126331787_9145cec551_w.jpg

When the first game ran, it quickly became apparent that the whole thing was nice, but poorly usable. While playing, it became evident that input via the two buttons was poorly recognized. I played on a console for a while. But to be honest, it gets boring quickly. I really love online games, I often play poker on my phone. I also recently read about revolut casino, found https://casinosanalyzer.com/online-casinos/revolut for this. For now I'm just getting to know this niche. Let's see, maybe I'll start playing. The program's flow is to blame for this. All instructions are processed one after the other. And so that a human being can recognize and play something at all, I worked with a short pause in the program flow. Problem: During the pause and during the instructions, which have nothing to do with the input, no input is accepted. So I needed something like concurrent programming or a way to process instructions in parallel (called multi-threading). However, Micropython does not support this out of the box and the used framework Pybricks does not support it at all. I found the solution in the concept of so-called generators. If you want to read more about this, you can visit my blog.

53127332758_a5a6a0838a_n.jpg 53127060939_bba379b271_n.jpg

Enough of the technology, on to the content: Currently, the game console runs two games. One is the Nokia classic Snake, and the other is Pong, one of the arcade veterans of all time. Both are currently solo player games. If there should ever be a second console like this (who will have the heart to build the second one??), then Pong can be switched to multiplayer. Two players, double the fun!

53127456003_f6fe6d8606_n.jpg 53127380145_e5fb5e2e6a_n.jpg

Also part of the project was a "Pixel Art Painter", a small application that allows you to paint pixel images for the PortaBrick Arcade and then transfer them to the program code. The source code of the whole project is available on Github for anyone interested.

If you have any questions about the project, just ask! Otherwise I'm looking forward to your feedback.

P.S. If you like the project, feel free to support me on LEGO Ideas. There I have posted the PortaBrick Arcade as a project and keep my fingers crossed. To all who support me and to those who supported me right after the start, thank you very much!


53126256252_493bca9a72.jpg

The idea sounds exciting and innovative. This can be a great project for learning and developing skills in programming, engineering and design. So I'll be looking forward...

Edited by ellencarnallajya99

Share this post


Link to post
Share on other sites
On 10/3/2023 at 12:06 AM, ellencarnallajya99 said:

The idea sounds exciting and innovative. This can be a great project for learning and developing skills in programming, engineering and design. So I'll be looking forward...

Thank you very much. And yes, the learning aspect is part my the idea :) Unfortunately the counter is rising only very very slowly :/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.