Open labrax opened 2 years ago
@labrax
I'm interested by your refactoring, can you share your code, or a PR
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.
@labrax thank, it's just for personal usage and leaning. definitively no plan for commercial use.
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
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
@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.
Great to hear!
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, theBUZZER_CHANNEL
parameter is not needed anymore for the functionstone
andnoTone
, 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