I have been busy working on my remake of Frogger, and have just received my adafruit PYGAMER. I was so excited at how easy it was to place the game on the device and was eager to play.
When the games starts, the player cannot move very well and keeps moving back and forth. To try and fix this problem, I have commented out various functions within the game to try pinpoint the performance degradation.
I suspected that the ‘on game update’ was the culprit, so I changed that to include a small interval. I also noticed that if I do not place any enemies on the screen, then the player moves fine.
In this version, while the enemies move, the player cannot move well. Instead of placing the enemies back to other side (when hitting a wall), I decided to leave the enemies at the wall. You will notice, that after the enemies no longer move, the player can move again fine.
I am guessing that are a number of issues that might be causing it:
- maybe the way I am looping through arrays
- there are too many sprites
- the player moves each time by following another sprite (hidden due to its z index), and then in each game update I check if it has stopped in order to place it correctly on the screen and to allow the player to move again.
The game works fine within the browser (with every function switched on), and the enemies move fine within the PYGAMER. I have a feeling that how the player moves towards the other sprite is a costly operation and causing the adafruit to slow down (frogging.follow(nextPlayerPosition, froggingSpeed))
Does anyone have an adafruit PYGAMER to test this game?
I hope someone can give me good advice, as I want to finish off the rest with music, animations and scoring.