VolosR / SpaceWars

Space Shooter Game for TTGO T Display
25 stars 17 forks source link

Executing it in 2022 #1

Open labrax opened 2 years ago

labrax commented 2 years ago

Dear Volos, This is a great code you have here! I am amazed by it and I had to make some changes for it to run in my system. First, the Tone32.h header is not available. Now that is built-in into ESP32 libraries. Then, the BUZZER_CHANNEL parameter is not needed anymore for the functions tone and noTone, remove them. If people have not setup TFT_eSPI completely, they'll need to do the user setup: comment the line to the top (User_Setup.h), and uncomment the ttgo line (setup 25). Thanks again

nechry commented 2 years ago

@labrax

I'm interested by your refactoring, can you share your code, or a PR

labrax commented 2 years ago

Hi @nechry, I can send you later this week. Depending on your requirements, consider using FabGL (http://www.fabglib.org/index.html). It has options for double-buffering etc which make game development easier. Remember that the license might not be ideal if you want to make future commercial use.

nechry commented 2 years ago

@labrax thank, it's just for personal usage and leaning. definitively no plan for commercial use.

labrax commented 2 years ago

Check it out at: https://github.com/labrax/SpaceWars. Don't forget to set your TTGO/display version on the TFT_eSPI file (on my Windows located at %UserProfile%\Documents\Arduino\libraries\TFT_eSPI\User_Setup.h). If you want me to, I can push some changes to minimally see it running on the TTGO with only two buttons. Also, this gist might help you to convert figures to the rgb565 format that is used: https://gist.github.com/labrax/ccc7bd65521137c7f5277fde33e0bfeb . Let me know if there is anything else that could help you. Best regards

nechry commented 2 years ago

many thank @labrax I will check it soon. I will see to use platformio instead of Arduino IDE, it's more easy to configure by device the TFT_eSPI lib. I will keep you on touch. A great thank to Volos, for his work and your Youtube channel

nechry commented 2 years ago

@labrax my refactoring code and yours are identical. But I don't get any sound during game, when I compile and download from platformio. With Arduino, yours and mine work as expected. I finally found a problem https://github.com/espressif/arduino-esp32/pull/6898 With the patch I get the tones during the game.

labrax commented 2 years ago

Great to hear!