October 16th, 2024

Ask HN: AI Wars – control your 2d space shooter with AI

A developer has created a 2D space shooter game where players control ships using AI scripts based on prompts. The game features increasing difficulty and plans for a competitive format.

Ask HN: AI Wars – control your 2d space shooter with AI

A developer has created a prototype for a 2D space shooter game where players can control their ships using AI scripts instead of traditional controls. Players input prompts similar to ChatGPT, which the game translates into code to dictate the ship's behavior. For example, a prompt like "Play aggressively when score is low, become more defensive as score increases" is converted into a script that manages the ship's actions based on its score and the presence of enemies. The game features increasing difficulty as more enemy ships appear with higher scores, challenging players to craft effective AI prompts. The developer plans to expand the game into a competition where players submit their scripts, and ships compete for the highest score within a one-minute time limit. The game includes a framework that outlines the capabilities available to the ships, such as sensing enemies, movement, combat actions, and decision-making functions. The developer is seeking players interested in testing the game and providing prompts for their ships.

- The game allows players to control ships using AI scripts based on user prompts.

- Players can input various strategies, which the game translates into executable code.

- The game increases in difficulty as players score higher, adding more enemy ships.

- Future plans include a competition format for players to test their AI scripts against each other.

- The game features a framework that defines the ship's capabilities for movement, combat, and decision-making.

Link Icon 3 comments
By @jhbadger - 4 months
For the long history of such games (where people actually wrote the rather simple AI code for their avatar), take a look at RobotWar and its various later clones like C-Robots and Omega.

https://en.wikipedia.org/wiki/RobotWar

By @solardev - 4 months
I love the idea of having an AI prompt to write code for the bots. There are already games like https://screeps.com/ or https://store.steampowered.com/app/2060160/The_Farmer_Was_Re... where you program your bot to do things, but they do require some minimal coding experience. Being able to describe behavior in plain english would be pretty cool.

However, I think having real-time feedback is a huge part of games like this. You try a command or two, see what unexpected thing happens, rapidly iterate and try again, one step at a time. Having to submit every prompt revision to you (even for testing) makes it hard to iterate. Any chance you'd want to build a thin web wrapper over it so players can sign up and try it on their own?

By @solardev - 4 months
FYI there is already a tower defense game series called AI War on Steam. It doesn't use code, but the name is similar enough to be confusing. https://store.steampowered.com/app/573410/AI_War_2/