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

Executing it in 2022 #1

Open
labrax opened this issue Jun 1, 2022 · 7 comments
Open

Executing it in 2022 #1

labrax opened this issue Jun 1, 2022 · 7 comments

Comments

@labrax
Copy link

labrax commented Jun 1, 2022

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
Copy link

nechry commented Jul 17, 2022

@labrax

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

@labrax
Copy link
Author

labrax commented Jul 17, 2022

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
Copy link

nechry commented Jul 18, 2022

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

@labrax
Copy link
Author

labrax commented Jul 18, 2022

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
Copy link

nechry commented Jul 20, 2022

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
Copy link

nechry commented Jul 21, 2022

@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 espressif/arduino-esp32#6898
With the patch I get the tones during the game.

@labrax
Copy link
Author

labrax commented Jul 21, 2022

Great to hear!

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

No branches or pull requests

2 participants