import { Alert, Link, List, ListItem, ListItemText, Paper, Typography } from "@mui/material"; import { DividerBox, SectionBox, OutlinedBox } from "@/components/base/boxes"; import { systemMessage } from "@/constants"; export default function Instructions() { return ( <> Under the Hood Build on top of{" "} nextjs-hf-spaces {" "} with NextJS + TypeScript +{" "} openai-node . The full source code can be found on{" "} failfa-st/2D-GameCreator-GPT. Games are stored in localStorage. We use a very strong system message to make sure that the AI behaves like a 2D Game Developer, where "TEMPLATE"{" "} refers to the code of the selected game in the{" "} Games list, intitally this is the{" "} Base Game:
{systemMessage}
The user message follows another template, to make sure that the selected Command is included and that the AI always returns the full source code, as this is easier to process instead of just parts of the code. The prompt is the message that you entered into the prompt field:
									{`"$\{command\}": $\{prompt\}. Return the full source code of the game.
TEMPLATE:`}
								
Troubleshooting Unhandled Runtime Error: SyntaxError: Unexpected identifier The generated output was interrupted, as it was too long and the OpenAI API delivered not everything. If you can, switch to GPT-4 as it allows a bigger context size (change it in the options and also increase the max_tokens). If you can't do this, then please help us extend the GameCreator so that it can also resume when the output is interrupted. You need help? Something is not working?{" "} Please let us know! ); }