Prompt-to-Game

Welcome to Space Rush!

Game making has never been easier (ahem ahem 😮‍💨) with the advent of ChatGPT and newer AI models. At Freshly.ai, we provide tools, community and real support to get the most out of your favorite AI.

It takes a lot of effort to prompt your way into a decent game with some basic features and minimally appealing graphics, but it is absolutely possible…and here’s the proof.

Goal:

blow up asteroids (5 pts each)

Weapon:

triangular nukes 🔺

Tips:

Shoot near asteroids ☄️ to get points. Be careful with your own bombs.

Movement Controls:

Arrows and space bar / or swipe screen and tap (best on iPhone/ipad)

Shooting:

space bar or Tap the screen

Space Rush was created by a non-programmer, exclusively with the use of ChatGPT (GPT4) in under 12 hrs of back and forth demanding code…ruthlessly and insistently.

One major challenge is getting complete scripts when asking ChatGPT, since it largely prefers to give chunks of code. This makes it quite harder to troubleshoot and put together code for a working app or game.

For this reason, one tip is to simply copy-paste a reinforcement statement like the one below (use it!), at the end of every one of your prompts/requests when you really want your complete code, thus saving yourself from the pain of endlessly stitching code:

The basics of game creation using ChatGPT or other LLMs:

Three kinds of files were required to create ‘Space Rush’, a python script (works like the ‘orchestra director’ to run the game), a Javascript (contains the essence of the game and it’s mechanics) and an HTML (primarily for the start page, the scoreboard and game canvas layout). We started by providing ChatGPT the idea for our game, including all envisioned game mechanics, specifying we wanted all three of these files. It was also important to clarify to ChatGPT that we wanted to be able to run it as a Python flask app; this allows to run the game and ‘package’ all of it’s components to display them through your browser…instead of just seeing it on the IDE ‘console’ window. What is an IDE you may ask? Simple, programs like PyCharm and Visual Studio Code are called Integrated Development Environments (IDEs). IDEs are software applications that provide a comprehensive environment for software development. They typically include a code editor, a debugger, a compiler or interpreter, and a variety of other tools that help developers write, test, and debug code. You can download and install free versions of these programs for your game project or you could use a popular online IDE like Replit, where you can also collaborate with others on projects, share your work, and deploy your applications.

Ok, ChatGPT gave you the scripts…now what?

Once you are set up with your IDE, file organization is essential. Make a file with the name of your game, within it, you must create a ‘templates‘ folder and a ‘static‘ folder. Your python script must be placed within your game folder, the Javascript file within the static folder and the HTML file within the templates folder. As you advance your game development, audio files can be added to the static folder. When in doubt, ask ChatGPT for clarification!

Re-calibrate your focus and ADHD, while having fun! Try our Ai-made BouncyPaint game FREE (iPhone download) in Apple’s AppStore!

Wanna get jump-started on your game making journey with ChatGPT?

Join Premium and gain access to the ChatGPT chat session that reveals the bulk of Space Rush’s game development (see here). Observing how we “fight” and “wrestle” ChatGPT to produce a game is likely to greatly enhance your prompt engineering skills. Perhaps you too will start making your own games!

Leave your comments and suggestions below! Space Rush version 2 (V2) is on the next corner, so be sure to come back for more! But tell us, how much did you score?!!✊😆🥇

2 responses to “Prompt-to-Game”

  1. Corey Avatar

    I want to make a game with ai

    1. Human Earthling Avatar
      Human Earthling

      Awesome 👏

      Great!

      Undeterred determination and good prompting will get you there!

Leave a Reply

Your email address will not be published. Required fields are marked *