Tested ChatGPT strongest plugin: 0 experience, 5 minutes to develop game

Cressi originates from the Temple of AofeiQuantum bit | official account QbitAIWith ChatGPT's latest code interpreter, you can create a game in 5 minutes!This is not nonsense, a blogger has already released a demo:This is a game that uses space as the background and allows spacecraft to strike asteroids.The effect was still very impressive, some netizens praised the GPT-4+code interpreter=ChatGPT-4

Cressi originates from the Temple of Aofei

Quantum bit | official account QbitAI

With ChatGPT's latest code interpreter, you can create a game in 5 minutes!

This is not nonsense, a blogger has already released a demo:

This is a game that uses space as the background and allows spacecraft to strike asteroids.

The effect was still very impressive, some netizens praised the GPT-4+code interpreter=ChatGPT-4.5 after watching it.

It is worth mentioning that this blogger not only showcased his achievements, but also thoughtfully provided a tutorial, even telling us the prompt.

We immediately tried it ourselves~

Rapid reproduction, upgraded by the way

We are trying to reproduce according to the tutorial, where the prompt is from Auntie Sauce:

Writep5. jscode for Asteroids where you control aspaceship with the mouse and shoot masteroids with the leftclick of the mouse Ifyourspaceshipcollideswithanasteroid, youlose. Ifyoushootdownallasteroids, youwin! I want to use my own textures for the space, and I want to use them for industries

We input it to ChatGPT with the code interpreter turned on intact and quickly obtained a section of JS code:


Following the author's tutorial, we will copy this code onto an online compilation platform.

There are also pictures of spaceships and asteroids that need to be prepared by ourselves. After we upload them, we will run!

Eh, what's wrong?

Don't panic, we directly copied the error message to ChatGPT and quickly obtained a correction plan:

It turned out that ChatGPT forgot to output component related functions.

After adding it, it would be great. Although the result is somewhat different from DEMO, it is still playable and takes less than five minutes.

(In DEMO, the position of the spaceship is fixed and the direction can be turned, but the game we reproduced is exactly the opposite)

But we are not satisfied with this, so we will try to add some features to ChatGPT next.

We did not specifically design the prompt in these steps, but directly described it in natural language, and the results were also very good.

We won't gradually show the code and prompt here. At the end of the article, we shared the chat records of the entire production process and ChatGPT

Firstly, add scoring and timing mechanisms:

Careful readers may see that asteroids of different sizes have the same score here.

So we asked ChatGPT to set different scores for asteroids of different sizes.

Moreover, the asteroid here doesn't come back after flying out of the screen, and we have also fixed this bug.

Is that smell already there? But this spaceship doesn't seem to turn, so we'll solve this problem next:

Finally, we added a pause function (controlled by the space bar), and this game was finally completed.

Eating snakes and not stepping on white blocks can do it

Following the blogger's tutorial, we will try to have ChatGPT play some other games.

For example, the greedy snake, except for the walls around it that were later required to be displayed separately, everything else is directly displayed in one step!

However, we require the food to be drawn in a circular shape, and ChatGPT provides a square shape, which is also harmless.

I don't know if the game Snake Eating is too classic, causing ChatGPT to know what to do when they see the name.

So we tried again and didn't give the game a name, just described the gameplay to see how ChatGPT performed.

What we need to do this time is' don't step on white blocks'. We described the gameplay and found that except for the slow speed, everything else was very good.

The above is all the evaluation of the code interpreter for the game. If you have any new ideas, please leave a comment in the comment section!

Reference link:
https://twitter.com/icreatelife/status/1678184683702566922

Production process
Asteroids:
https://chat.openai.com/share/7fdc27a1-4a64-4c2f-a27d-c62f31a8af97
Greedy Snake:
https://chat.openai.com/share/c67ca1c8-8a9e-41a1-bd0d-40970b52104c
Don't step on the white block:
https://chat.openai.com/share/639e957d-66bd-41bb-9676-1c9890629d49

- End -

Follow us and stay informed of cutting-edge technology trends as soon as possible


Disclaimer: The content of this article is sourced from the internet. The copyright of the text, images, and other materials belongs to the original author. The platform reprints the materials for the purpose of conveying more information. The content of the article is for reference and learning only, and should not be used for commercial purposes. If it infringes on your legitimate rights and interests, please contact us promptly and we will handle it as soon as possible! We respect copyright and are committed to protecting it. Thank you for sharing.(Email:[email protected])