I have designed a simple game of Hangman. I have used Canvas and few Sprites.
In the beginning, the Sprites do not show up but as the user tries to guess alphabets, different Sprites show up.
This works perfectly in Live Test - please refer “Hangman Screenshot 1” file. However, when I see the same game on Thunkable App on my Android phone, the Canvas is not visible at all. I waited for few minutes (just in case images take time to load), it still doesn’t show. – please refer “Hangman Screenshot 2” file.
The same issue comes when I download and install Android APK.
I searched documentation and found that there may be issue with PNG images. So I chanegd to JPG, no success. I tried GIF also, but no success.
In the “when Canvas loads” block, I have moved my Sprites out of Canvas. When the user presses an alphabet (which are displayed on screen), these Sprites start showing up on Canvas. I move them back to Canvas if the guessed alphabet is wrong.
As I have mentioned earlier, this functionality works perfect on Live Test. But not on android mobile.
When I completed the program to my satisfaction, I downloaded it for Android and installed on my phone. There I noticed that Sprites are not loading (after initial screen). Later I checked Live Companion app of Thunkable and faced the same issue.
Since I have to show alphabets, I need 26 Sprites. Plus 5 spaces (= 5 more Sprites) and 4 Sprites for Hangman. Is there any better way to achieve / optimize this?
I created 200 sprites programmatically and don’t see a problem with that number. Also uploaded a large image - also no problem. Apparently, the problem is that sprites are added on the panel, or there is a bad sprite that causes a crash. I can’t understand it yet.
I checked your project again and see that the problem is not with sprite. This time I started deleting all the sprites from the beginning and the canvas only started working when I got to the letter sprites. After that, I added 5-6 sprites and the canvas still worked.
Unfortunately, I can’t answer your question. There is a workaround, but it is only available to programmers who know how to work with HTML canvas and JavaScript
I recommend that you study all the blocks for working with the list and use the block for creating a list from a line of text with separators to get the list.
also look at any blocks - this will allow you to reduce the processing blocks for clicking on buttons
you have a very long condition. See how it can be shortened. To do this, study the concept of functions
Hi have you find a solution for this issue, because I found the problem like you as well
No matter I rebuild and keep changing sprite, it still be the same doesn’t work