The quality of AI responses often comes down to your specific prompt - and GameDev Assistant is no different in that regard. In this article, we'll provide some tips for writing good prompts so you can get the most out of this Godot co-pilot!
Use the Context Tags
GameDev Assistant allows you to pass in additional contexts like your open scripts or your Project Settings via the
Context Tags. Make sure to use the context tags where appropriate. The more relevant context the AI has for the task at hand, the more accurate the results!
Write Clear Commands
When prompting the AI, make sure you're very clear on when you want the AI to answer a question or give information, and when you want the AI to
do something. For example, using a prompt like "I need to change the color of my player's sprite to blue" is unclear. The AI may choose to think you're asking how to do this and give you just the steps for it, or it may choose to think you're telling it do it and produce a
one-click action button for the task.
Make sure you're very clear with the AI on exactly what it should be doing (e.g., explaining an error code, creating a new 2D player, etc.)
Specificity of Task
In conjunction with the above, make sure you provide the AI with all the particular details of the task - especially if you have specific requirements for a feature you want to implement. For example, there are a ton of different ways to implement an inventory system (how many slots does the inventory have? are there separate collections for consumables and key items? do items stack, etc.?). If you want the inventory to be done in a specific way, make sure to tell the AI that; otherwise, the AI will most likely give you results that it sees as the most common denominator of implementation - and consequently may be far, far away from what you want for your project.
Breakdown Complex Projects to Smaller Tasks
As a general guideline, AI always tends to work better when given smaller tasks. Not only does it prevent the context from growing too large, but ensures the AI is less likely to get confused when dealing with multiple complex systems.
For example, if you told the AI you want it to "Create an FPS game with inventory for guns and ammo, power ups, multiple levels, and multiplayer", you're probably going to get a half-broken game as the AI will struggle to implement that many systems all at once.
Instead, it would be better to break the game down into one feature at a time for each prompt:
- "Create a first-person 3D character controller. The player should be able to move with the WASD keys."
- "Add the ability for the player to jump and crouch."
- "Can you create a pickup parent class that is removed when the player enters it? It should also have an override-able function that "activates" the pickups abilities when the player enters it.
- etc.
Keep Chats to a Single Feature
By design, every time you chat with an AI, previous messages are sent as context with new chat messages. Unfortunately, and this is true of all LLMs, eventually the context grows too large for the AI to be able to process it correctly. This results in time out errors, hallucinations, and more.
Thus, when using GameDev Assistant, we recommend trying to keep chats to a single feature. This ensures quicker and more accurate results - and there are no limitations to how many conversations you can start. Don't worry if you still need an older chat however - our tool
saves every chat!