Create an account with, say, Cursor or AlphaCode 2 and follow the setup instructions. Depending on which tool you choose, you may need to do a quick install. You may also need to install a programming language such as Python, as well as a source code editor such as VS Studio Code 2 – the coding platform will keep you right on this.
Open a new project in the tool. Into the prompt, type: “Create a simple platform game where the platforms are made of sweet treats”.
Click “run” or “preview” to see what you’ve created (depending on which system you are using, you may have to do this in the source code editor). You should see platforms made of candy or cakes.
Let’s say we change the main character into a parrot. Simply type into the prompt: “Make the avatar a green parrot”.
Now type into the prompt: “Let the parrot be controlled by the cursor arrows, insert some sweets for it to collect and add a score counter for how many it has collected”.
Click “run” or “preview” again to test the updated game. Make changes by typing things like, “Insert a black crow that will chase the parrot around the screen. If the crow touches the parrot, freeze the screen and display a message in the middle of the screen saying ‘Too Bad!!!’”. Keep repeating these steps until you’re happy with the results.
You might now want to share your game with friends or online via an app store. It must be said that AI coders are not yet doing this well, so you may find this trickier without prior knowledge. One option is to deploy the game online via a free platform such as Zeabur, as explained here.
Daniel Zhou Hao is from the School of Computing and Mathematical Sciences at the University of Leicester
Published 16 October 2024, 06:02 IST