Sep 16, 2024
We compared the game code generated by ChatGPT 4o versus ChatGPT 5o by using the same prompt for both.
Source code
Source code is available on Github: Source code
Prompt for the game:
- Creating a simple pacman-like game using HTML, CSS, and JavaScript.
- The game board should have white background
- the bricks that blocks the pacman
- A dog character moves around, controlled by keyboard's arrow keys. Use a small image "dog.webp" to represent it.
- Basic walls and apples for Pac-Man to "eat." Use a small image "apple.webp" to represent the apples.
- Adjust the size of the images to be correct.
- Simple keyboard controls for movement.
- Apples show up randomly at the beginning of the game, and may intermittenly show up in the middle of the game
- Pac-Man keeps going forward. When it hits a wall it stops. When it hits an apple, the apple disappears
- Make the moving animation smooth
- Make the apple disappearance animation smooth
Prompt for the dog:
- create a 3d soft style cartoon image of a dog with white background.
Prompt for the apple:
- create a 3d soft style cartoon image of an apple with white background.
Join us on WeChat
Ming Dao School uses 1-1 coaching and group events to help high-tech professionals grow their careers and handle career transitions.
If you like to join our upcoming mock system design interview events or other coaching programs, please contact us on LinkedIn.