Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PICO-8 port of QPong to celebrate 30th anniversary of Game Boy in Europe #1

Open
HuangJunye opened this issue Aug 26, 2020 · 22 comments

Comments

@HuangJunye
Copy link
Collaborator

HuangJunye commented Aug 26, 2020

Abstract

Port QPong to PICO-8, a fantasy retro console.

Description

September 28, 2020 will be the 30th anniversary of Game Boy release in Europe (Why Europe? Because we already missed the 30th anniversary in Japan and US, LOL). QPong is one of the most famous quantum games because it was featured in the very first episode of Coding with Qiskit.

PICO-8 is a fantasy console that is great for making and playing retro 2D games. I have a GameShell which looks almost like a Game Boy. So if we can port QPong to PICO-8, I can play QPong in a Game Boy-like machine. Wouldn't that be cool?

You may ask: why not making a real Game Boy port of QPong? The answer is simple: making a real Game Boy game is very difficult and the tools are not very modern. An easy way to make GB game does exist (GBStudio), but it doesn't support making a game like QPong. So PICO-8 port of QPong playing on a GameShell is the closest resemblance to a real Gameboy port I can imagine.

We can use MicroQiskit-Lua to make the quantum simulation.

Members

Deliverable

  1. A QPong game runs on PICO-8.
  2. A blog post about the game, history of Game Boy and quantum computers.

GitHub repo

https://github.com/HuangJunye/QPong-PICO-8

@HuangJunye HuangJunye changed the title PICO-8 port of QPong to celebrate 30th anniversary of Gameboy in Europe PICO-8 port of QPong to celebrate 30th anniversary of Game Boy in Europe Aug 26, 2020
@ethanlee515
Copy link

ethanlee515 commented Sep 7, 2020

Gameshell claims to be compatible with Pygame, and it seems like somebody has made it work. There might not be a need to port QPong to PICO-8 in order to play it on a GameShell, plus PICO-8 costs money and Lua is such a terrible language to work with...

What about we just give the not-very-modern tools you mentioned a try, write it for the actual gameboy, and see how far we get?

@ethanlee515
Copy link

ethanlee515 commented Sep 7, 2020

I took a look at the not-very-modern tool (GBDK) you mentioned, just to see how hard is it to port QPong to the actual Gameboy. GBDK supports only C and assembly; I was hoping that it might just be a C library that I can build and link as C++, but that's far from the case too. GBDK includes a compiler that targets the ASxxxx assembly, and a linker that builds ASxxxx into binary; I can't fit C++ into this picture anywhere. Seeing that we don't even have a MicroQiskit version for C, it might be best for me to drop this GBDK approach for now...

@HuangJunye
Copy link
Collaborator Author

HuangJunye commented Sep 7, 2020

Pico-8 games aesthetically look closer to gameboy games than pygame games. I don't know Lua in general, but I enjoy coding pico-8's Lua version. It's much better than C or C++. You are right the major drawback of pico-8 is that it costs money. I can sponsor one copy of pico-8 for the team.

@HuangJunye
Copy link
Collaborator Author

I really want to make a real gameboy version of QPong but it requires much more work than what we can manage in a hackathon. But I will definitely be interested in exploring with you after the hackathon.

@ethanlee515
Copy link

The first step would be to port MicroQiskit to C, wouldn't it? Either ways, I'll go download Pico-8 for now, and we'll chat tomorrow? Can't wait to meet you in person. This is 李懿 (Yi Lee) from 中央研究院 (Academia Sinica) btw. :)

@HuangJunye
Copy link
Collaborator Author

Yes you are right. Perhaps we can take that as a project. There is a C++ version of MicroQiskit but I don't know how straightforward it is to port to C.

I won't be able to join in person due to the pandemic, unfortunately. But I'll be joining virtually via Google Meet. Talk to you tomorrow!

@ethanlee515
Copy link

The C++ version does its dynamic memory allocation using std::vector. We'd need to rewrite that at the very least. How straightforward that is would then depend on if we allow the use of, say, GNU C Library. The rest I imagine are number-crunching, which is similar from one language to the next... Either ways, I'd imagine it can be done well within a day; maybe I can throw in a Java version too while we're at it if all goes well.

Wouldn't you prefer to see the Pico-8 QPong port as a project though?

@HuangJunye
Copy link
Collaborator Author

Of course I would prefer to work on PICO-8 port. I have very clear idea of the port and I am sure it can be done within 24 hours. A gameboy port requires a lot more research so there will be many more uncertainties. That's why I suggested porting MicroQiskit to C as a hackathon project with the hope that the team can continue working on gameboy port of QPong after the hackathon.

I think we could also create a separate team for porting MicroQiskit to different languages. We want to support more languages so that we can create many more applications for people to learn QC.

@HuangJunye
Copy link
Collaborator Author

@mimihuang @em17611 @uyry6 I saw your messages in emails but not on GitHub. Are you interested in working on this project?

@mimihuang
Copy link

mimihuang commented Sep 8, 2020 via email

@em17611
Copy link

em17611 commented Sep 8, 2020

@mimihuang @em17611 @uyry6 I saw your messages in emails but not on GitHub. Are you interested in working on this project?

Sorry, I decide to join another project and give up this one.

@ethanlee515
Copy link

I'm doing this project though :)

@HuangJunye
Copy link
Collaborator Author

@mimihuang @em17611 No problem! @ethanlee515 Great! You are in!

@alfa871212
Copy link

Hi, can I join the team?

@LeeJ-art
Copy link

LeeJ-art commented Sep 8, 2020

can I join in the team? Thanks

@zuohank
Copy link

zuohank commented Sep 8, 2020

join it because second team may be break

@HuangJunye
Copy link
Collaborator Author

@ethanlee515 @LeeJ-art @zuohank @alfa871212 Can you look for me in Qiskit Slack? My Slack ID is @Junye. Let's create a group chat and start discussion.

@alanspace
Copy link

Hello, it's Alan, please add me into the issue, thanks

@HuangJunye
Copy link
Collaborator Author

@alanspace No problem, I added you.

@HuangJunye
Copy link
Collaborator Author

I am polishing the code and will write a blog post over the weekend. Please let me know if you are interested in writing the blog post.

@zuohank
Copy link

zuohank commented Sep 25, 2020 via email

@HuangJunye
Copy link
Collaborator Author

I cleaned up the code, added a menu, change palette to game boy color. Here is the blog post and tweet. You can play the latest version here: https://kirais.itch.io/qpong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants