Just as calculators took over the tedious number calculations in mathematics a few decades ago, artificial intelligence (AI) is changing coding. Take Kyo, an eight-year-old boy from Singapore who created a simple platform game in just two hours that attracted over 500,000 players.
With just simple instructions in English, Kyo brought his vision to life using the coding app Cursor and also Claude, a general-purpose AI. Although his father is a programmer, Kyo received no help from him in developing the game and has no formal programming training himself. He then developed another game, an animation app, a drawing app and a chatbot, each of which took him about two hours.
This shows how AI dramatically lowers the hurdle in software development and closes the gap between creativity and technical skills. Apps and platforms dedicated to this purpose include AlphaCode 2 from Google and Ghostwriter from Replit.
Another example of the power of these apps is an eight-year-old American girl named Fay who built a chatbot that claimed to be Harry Potter. She had it up and running in just 45 minutes, after which she was asked if she had heard the rumors about the Deathly Hallows and suggested discussing it over a Butterbeer at the Three Broomsticks.
For those who already know how to code, numerous AI apps have also become incredibly helpful. Unlike the natural language coding apps described above, tools like Tabnine and GitHub Copilot act as intelligent assistants that predict and autocomplete code as you type.
Alternatives like Sourcery and DeepCode go one step further, providing real-time code cleanup, suggesting improvements and fixing vulnerabilities. New tools come onto the market every week, such as OpenAI's GPT Canvas, a new version of GPT designed to help with demanding coding. Many of these tools can also translate code from one programming language to another, for example from JavaScript to Python.
The productivity gains these tools provide are revolutionizing the software industry. Up to 70% of companies have already adopted programs like GitHub Copilot, with programmers reporting that AI allows them to write software that is more reliable and bug-free.
By eliminating the need to spend so many hours ironing out human errors, programmers can spend more time focusing on higher-value tasks such as designing system architecture and collaborating with colleagues.
It's also a game-changer for university lecturers like me as we struggle to keep up. We had to rethink teaching materials and assessment methods, and grapple with how to accurately assess a student's programming skills in situations where AI tools do much of the work.
Today's restrictions
As exciting as all of this is, AI coding is still in its infancy. At this point, it can only help non-programmers create simple applications or games. It is not yet capable of overseeing large, complex IT projects by understanding the big picture the way a human programmer would.
It also cannot yet find new ways to solve problems and will be even more likely to lag behind in areas such as spacecraft navigation that require highly specialized knowledge.
Many tools also don't write perfect code: a program often works, but isn't efficient or secure enough for use in the real world. Likewise, AI tools do not inherently understand the context of the data they process and therefore may misprocess sensitive information or perpetuate biases in the data they are trained on.
For all these reasons, in professional situations there is still a need for a programmer to ensure that everything meets the required standards. Undoubtedly, in the future we will see AI coding tools designed to tackle everything from security issues to highly specialized topics. Your ability to help non-programmers build apps will only improve, too. However, at least for now, AI coding is still expanding the skills of programmers rather than replacing them entirely.
How to create your own game
Still, it's incredible what you can do with these tools as a non-programmer. Here's a quick guide to creating a simple platformer:
Step 1: Sign up for an AI tool: Create an account using, for example, 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 like Python as well as a source code editor like VS Studio Code 2 – the coding platform will keep you up to date.
Step 2: Start your game: Open a new project in the tool. At the prompt, type: “Create a simple platform game where the platforms are made of sweet treats.”
Step 3: See what it's like: Click Run or Preview to see what you've created (depending on what system you're using, you may need to do this in the source code editor). You should see platforms made of candy or cake.
Step 4: Make some changes: Let's say we turn the main character into a parrot. Just type “Make the avatar a green parrot” in the prompt.
Step 5: Add Features: Now, in the prompt, type: “Let the parrot control with the cursor arrows, enter some candies for it to collect, and add a scorer for the number of candies collected.”
Step 6: Test and Optimize: Click Run or Preview again to test the updated game. Make changes by typing something like: “Insert a black crow chasing the parrot across the screen.” When the crow touches the parrot, the screen freezes and displays the message “Too bad” in the middle of the screen !!!!” Repeat these steps until you are satisfied with the results.
Step 7: Bring It Out: You may now want to share your game with friends or online via an app store. It must be said that AI programmers don't do this well yet, so you may find this more difficult without prior knowledge. One option is to make the game available online via a free platform like Zeabur, as explained here.
Daniel Zhou Hao, School of Computing and Mathematical Sciences, University of Leicester
This article is republished from The Conversation under a Creative Commons license. Read the original article.
Comments are closed.