Log In  
Follow
kvittore
[ :: Read More :: ]

Cart #chatgpt_chase-1 | 2022-12-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

My second ChatGPT game.
I will note any changes I made to its code but otherwise, all code and comments were created by ChatGPT with prompts in order listed.

Prompts:

  • Pico-8 basic game code
  • Add player using pset, with movement control
  • Add enemy at random spot at the edge of the screen, enemy should attack player within 30 pixels
  • Player shoots at enemy using pset
  • Enemy moves toward middle of screen
  • What should I add to my game?
    • It told me to add player and enemy health text display and something to happen when player or enemy dies
  • Add health display
  • How can I improve this code?

    • It said:

      • Add more enemy types, each with their own behavior and appearance. For example, you could add a faster enemy that moves towards the player even if they are not close, or a stronger enemy that takes more hits to defeat.

      • Add obstacles and power-ups that the player can interact with. For example, you could add walls that the player can hide behind, or health packs that restore the player's health.

      • Add a scoring system that rewards the player for defeating enemies and completing objectives. You could also add a high score table to keep track of the best players.

      • Add a level system with progressively harder challenges. For example, you could add more enemies, stronger enemies, or tougher objectives as the player progresses through the game.

      • Add sound effects and music to enhance the gameplay experience. For example, you could add a background music track, and sound effects for player movements, enemy attacks, and projectile impacts.

Changes:

Line 34, Added cls()
Lines 36-39, fixed button assignment. was 0123 now 2301
Lines 54 and 55, swapped sin and cos
Lines 67 and 78, replaced chatgpt's comments for "something to happen" with _init()
Lines 88 and 89, swapped sin and cos
Lines 95 and 96, swapped sin and cos
Line 115, text position was (64,0) now (0, 10)

P#122449 2022-12-15 03:43 ( Edited 2022-12-15 04:02)