I found a few problems that made this game quite exploitable, and I also have some suggestions that might fix the exploits.
1st Exploit:
The player can just go to the left side of the screen and aim at the center, the enemies always spawn on the right side and will run into the bullets eventually.
I weighed down my space bar with my phone and left this game open for a few minutes while I went to get food, I came back and I was still alive and the enemy was big enough to cover half of the screen.
2nd Exploit:
The player can hide offscreen, the bullet will remain in the playing area. The enemies will continue to chase the player and die upon hitting the bullet.
Possible Fixes:
- I think the 1st exploit can be fixed if you allow the enemies to randomly spawn on screen, the fixed spawn points and enemy pathing is what makes this exploit possible. If you make the enemies spawn randomly, like 50 - 100 pixels away from the player (the distance is so that the enemy does not spawn on top of the player), then I believe it would make this exploit obsolete.
- The 2nd exploit can be fixed by either making the bullet exist only if the player presses space, or a better fix would be to restrict the player to the playing area. I think restricting the player would be the better option since it's not a good gameplay mechanic if the player can go offscreen.
Other suggestions:
- Rate of fire - I noticed the rate of fire was dependent on whether the bullet was still onscreen, this makes the rate of fire highly inconsistent. If you fire towards a nearby wall, you fire fast, but you fire slowly if you shoot your shots from a distance. I think having a fixed rate of fire would be better (like the player shoots 1 bullet every 0.3-0.5 seconds).
- Turning Speed - I feel like turning is a bit too slow, maybe speed it up a bit but not too much.
- Enemy - Right now, there is a single enemy that grows every time it is killed. No matter what the size the enemy is, it will always be killed in one shot. Maybe add more enemy types is varying health and speeds. Also set an upper limit on size growth so they won't end up taking half of the screen.
- Score - A way to keep track of the score would be nice, maybe a little point counter in a corner would be enough.