The title of this article is misleading. We didn’t make a small game, but GPT-4, a new version of ChatGPT, did. If our game is very basic and coded in HTML, it could be customized very easily, without the slightest knowledge of coding.
The game is on this page.
It all started with a request: Can you create a game in HTML? So GPT-4 will code in a few seconds a very simple little game where you have to catch falling squares by moving the arrow keys on your keyboard.
From there, all you have to do is give it instructions: create a welcome screen, place a “Start” button, enter the score, change the font, give it a retro gaming touch… You quickly understand how to modify the images to make the game more personal.
Actually, there is nothing complicated about it for someone used to code but it is an incredible tool for those who don’t know anything about the subject.
The other great strength of GPT-4 is understanding the problem. For example, the chatbot hadn’t thought of clicking the “Start” button to launch the game (and honestly, the author of this article hadn’t thought of that either). So it was enough to tell him that nothing was wrong for him to understand what was expected of him.
The main problem with GPT-4 is that it has a conspicuously limited build length. Systematically, it stopped in the middle of the code. But once you understand this limit, just ask it to generate the rest of the code and put the two parts together.
Another concern, obviously, some instructions can be forgotten along the way, even if this is frankly not the norm: GPT-4 runs and ends up providing all the information requested.
This small example mostly gives an idea of its coding potential for beginners. Inevitably, we are still far from complex applications, but GPT-4 can also be of great help.
Source: BFM TV

