sean butler

chat gpt please generate code for a small video game

chat-gpt   selected

it turns out that without too much prompt wrangling chat-gpt is capable of generating reasonable code for simple videogames.

something on a par with an teenager or learning programmer such as 1st year undergrad.

tutorial

its a very simple text mode (c++, ncurses) video game, the sort of thing one might produce in an early learn to program tutorial.

is it possible that the language model is reproducing the text from a tutorial it has ingested? i feel (without too much evidence to back this up) that this is the likely explanation.

source

follow along this github repo to see how Chat GPT generates the c++ source code for a simple video game. we manage to get a text-mode game with simple characters following user input with some very basic prompts.

lesson learned

in the above example i forgot to say please. sorry, i for one welcome our new AI overlords and will remember to say please in future. you probably should too.