You are right, and to go a step further - Generating full games with AI is possible now. Computer games that weren't even considered possible 2 years ago.
I've been playing text-based adventure games that I have made with ChatGPT and they are fascinating. Try the below command in ChatGPT (don't read the text below if you actually want to play it though!).
> Hi, I would like to play a text-based adventure game with you. I will say commands and you will respond either describing the situation or saying what the characters have said. Responses should be kept fairly short. The game will not end until I say the word 'endthegame'. In a combat situation, you will tell me how many hitpoints the character I am in combat with has, and I will describe the attack - you will evaluate that attack and decide how many hitpoints to deduct from the enemy. The game is set on a spaceship, however the spaceship is under attack. There is a portal gun. Part of the solution should be to teleport to the enemy ship and kill the enemies, and this should be telegraphed to the player after a few turns. The goal will be to stop the enemy ship from destroying our ship. I will say some things that will not be possible in context, or that are too vague, and if this happens you should respond saying why I cannot do the action, or that it was too vague. In general you should try and accomodate the players actions though, even if they have negative consequences - but not allow them if they are too vague or are multi-step.
Can the above now be considered 'source code' to a game? A text-based game which is fun to play (at least I find it fun!) and with free-flowing narrative, where your actions have consequences.
It's pretty wild to go into this game, where you can go up to characters and start 'proper' relationships with them, talk in natural language, and be able to make genuine choices about how to solve a problem that the developer didn't even dream of.
You can also generate an infinite amount of quasi-educational text adventures by prompting it with a historical or fictional setting. Give it a piece of classic literature and it will try to come up with something on-theme.
That would be awesome! Huge opportunity in education.
I'm still experimenting with the right prompts to make gameplay fun.
Without prompts GPT-3 will tend to 'play the game for you' or allow you to do non-sensical actions (e.g. if a house is on fire, and your command is 'blow the fire out with your gigantic lungs', it will respond with 'you blow the fire out!' rather than 'you blow but this does not have any effect'), but if you tell it to ignore actions that would not work it tends to go 'on rails' and expect a specific sequence of actions from the player, so just trying to balance those two things!
I've been playing text-based adventure games that I have made with ChatGPT and they are fascinating. Try the below command in ChatGPT (don't read the text below if you actually want to play it though!).
> Hi, I would like to play a text-based adventure game with you. I will say commands and you will respond either describing the situation or saying what the characters have said. Responses should be kept fairly short. The game will not end until I say the word 'endthegame'. In a combat situation, you will tell me how many hitpoints the character I am in combat with has, and I will describe the attack - you will evaluate that attack and decide how many hitpoints to deduct from the enemy. The game is set on a spaceship, however the spaceship is under attack. There is a portal gun. Part of the solution should be to teleport to the enemy ship and kill the enemies, and this should be telegraphed to the player after a few turns. The goal will be to stop the enemy ship from destroying our ship. I will say some things that will not be possible in context, or that are too vague, and if this happens you should respond saying why I cannot do the action, or that it was too vague. In general you should try and accomodate the players actions though, even if they have negative consequences - but not allow them if they are too vague or are multi-step.
Can the above now be considered 'source code' to a game? A text-based game which is fun to play (at least I find it fun!) and with free-flowing narrative, where your actions have consequences.
It's pretty wild to go into this game, where you can go up to characters and start 'proper' relationships with them, talk in natural language, and be able to make genuine choices about how to solve a problem that the developer didn't even dream of.