qiskit-community / qiskit-hackathon-taiwan-20

32 stars 10 forks source link

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

Open HuangJunye opened 3 years ago

HuangJunye commented 3 years ago

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

ethanlee515 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

mimihuang commented 3 years ago

Dear Mr. Huang,

Sorry, our friends ask us to join another group. Thus, we need to give up this project. Thanks for your invitation.

Sincerely yours, Miriam Mimi Huang

Junye Huang notifications@github.com 於 2020年9月8日 週二 下午1:48寫道:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qiskit-community/qiskit-hackathon-taiwan-20/issues/1#issuecomment-688632984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZ4AGH47VQAAF7TNFVA4P3SEXAR7ANCNFSM4QL5JA7A .

em17611 commented 3 years ago

@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 commented 3 years ago

I'm doing this project though :)

HuangJunye commented 3 years ago

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

alfa871212 commented 3 years ago

Hi, can I join the team?

LeeJ-art commented 3 years ago

can I join in the team? Thanks

zuohank commented 3 years ago

join it because second team may be break

HuangJunye commented 3 years ago

@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 commented 3 years ago

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

HuangJunye commented 3 years ago

@alanspace No problem, I added you.

HuangJunye commented 3 years ago

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 commented 3 years ago

sorry,l have a lot of homework this weekend.so,l think l won't have time to join the blog post.

Junye Huang notifications@github.com於 2020年9月25日 週五,下午5:34寫道:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qiskit-community/qiskit-hackathon-taiwan-20/issues/1#issuecomment-698829256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5F6IXF72IYWYVIX2TV2ETSHRPZBANCNFSM4QL5JA7A .

HuangJunye commented 3 years ago

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