I dont think people have actually done this before, using AI to generate code to use it for a textbased RPG game, I can’t wait to see how this turns out
atleast our fingers won’t hurt
90% of code MUST be written with AI
(EDIT: Removed join link)
I dont think people have actually done this before, using AI to generate code to use it for a textbased RPG game, I can’t wait to see how this turns out
atleast our fingers won’t hurt
90% of code MUST be written with AI
(EDIT: Removed join link)
That sounds fun and easy. Can I join?
import random
def text_adventure_game():
"""
This function creates a text-based adventure game.
The player will be presented with different scenarios and choices to make.
The outcome of the game will depend on the player's choices.
"""
# Welcome message
print("Welcome to the Text Adventure Game!")
print("You find yourself in a mysterious land. Your goal is to find the hidden treasure.")
# Game loop
while True:
print("\n---")
print("What do you want to do?")
print("1. Go left")
print("2. Go right")
print("3. Go straight")
print("4. Quit the game")
choice = input("Enter your choice (1-4): ")
if choice == "1":
print("You go left and encounter a ferocious dragon!")
print("You have two options:")
print("1. Fight the dragon")
print("2. Run away")
dragon_choice = input("Enter your choice (1-2): ")
if dragon_choice == "1":
print("You bravely fight the dragon, but unfortunately, you are no match for its strength.")
print("Game over!")
break
elif dragon_choice == "2":
print("You wisely choose to run away from the dragon.")
print("You continue your journey.")
elif choice == "2":
print("You go right and find a hidden treasure chest!")
print("Congratulations! You have won the game!")
break
elif choice == "3":
print("You go straight and encounter a group of friendly villagers.")
print("They offer you a map to help you find the treasure.")
print("You graciously accept the map and continue your journey.")
elif choice == "4":
print("You have chosen to quit the game. Goodbye!")
break
else:
print("Invalid choice. Please enter a number from 1 to 4.")
# Start the game
text_adventure_game()
That dragon fighting scene is making me cough blood. They never used random for the damage (like I did)
I don’t quite understand. You’re just asking AI to write an RPG game?
It would be fun for it to generate a story, but why does it need to write the code too?