========================================= Tank Fight game! Fight in a randomly-generated battlefield. Shoot bouncy bullets to eliminate the enemy! Beware, though, lose focus and you'll backfire! ========================================= Green Tank (player tank in single player mode): Arrow Keys to move M to fire! Red Tank: WASD to move Space to fire! ========================================= Power ups will spawn once in a while. Right now, there is only 1 power up! Laser: The next shot will be faster and can pass through walls. =========================================
Now with a single player mode! Click the button on the menu to toggle between single player mode and two player mode. How it works: The AI tank first calculates a path. It does this by moving until it hits a wall and then turning 3 times. If this results in being closer to the player tank, it will set this as the path; otherwise it tries again moving differently. When it's near enough, the AI tank has a chance of taking a shot. It calculates whether the bullet will hit itself, the player tank, or nothing (by having the bullet move as it would if fired all within one frame, through a custom block with "run without screen refresh" on). That, and the distance to the player tank, will influence the chance that the AI tank will fire. 12/18/23 update: I had accidentally left on the ability to manually fire the AI tank's bullets. That's now fixed. #game #games #multiplayer #all