-
Notifications
You must be signed in to change notification settings - Fork 84
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
The game will be slow #3
Comments
haha, this is a hidden feature since you are the best player in the world 😁 Which devices are you using? will it always happen after 3 minutes? |
Dear JakeLin, especially with this line I think it is not about hidden feature, if you reach more than 150 seconds the CPU usage will be the highest and the game will be jammed. Kind regards |
@hemnf it was a joke 😅, we call |
I think we need a maximum number of enemies, ex: 60. |
After a quick scan on your code, it seems that you iterate over all enemies to check if there is a collision. A possible workaround would be to save all positions of every enemy in a 2D list and update it on each tick with new positions. Then only checking the current position of the player in the list for collision, sudo code: Not sure if this is doable but if it is, |
Hi,
Thank you for your code and I really like it. I have one issue, when the game reached more than 3 minutes, it will be very slow and the user can not move the dot.
Thanks
The text was updated successfully, but these errors were encountered: