What do you do when you're stuck in game development?

When I was in university, I remember one of my teachers told us that computer engineering and being a programmer in general really summarizes to 'The art of knowing how to Google'. That really stuck with me for the longest and even more when I entered the industry and fully understood what he meant. Indeed, when you start developing software or games, you'll find yourself a lot on webistes like stackoverflow.com or just Google to find the answers you need. Most of the time you'll be able to find what you need because you're most likely not the first person who's having this problem, so you'll probably find some solutions on forums where people discuss different ways to solve a problem. Another option recently has been using ChatGPT. You could now just post the entirety of your code as a prompt and ask ChatGPT to fix the problem, then with a bit of refining, it can help you get to the appropriate solution.

What if documentation is limited?
You'll quickly notice in your game development journey that not all game engines, softwares, programs, APIs, etc. have the same amount of documentation. Most of the time, it's related to its popularity and how many people use it. The less people use it, the less documentation there'll be. It could also be because it's a new API and even though documentation is out by the code writer, bugs may not have been found yet. So you might be the first one to discover new bugs and might have to troubleshoot on your own. In this case, there are a few things you could do. Simple troubleshooting should always be the first thing you want to do. That includes calmly looking at your code and understanding exactly what every single line of it does and why it's not giving the desired outcome. Once that's done, if you can at least figure out where the bug is, then finding how to solve is only the second half of the problem. A good trick is to look for the same conceptual solution in another language or even another software and understand how they applied it and then replicate it in your solution. Another option is to look in the code to fully understand the API and understand what everything does and what you can and cannot do. Usually, a lot of APIs are open-sourced so that's a big plus.

If there's no documentation... Start it!
The beauty of the game development world is that if ever you get to a point where you've tried all the above solutions and you still can't find what's wrong with your code. You can create a new thread! You can simply go on the API or the software's website and find a forum section. From there, you simply create a new thread explaining your problem. There are a lot of different forums and places you can do that, so it's only a matter of finding the right place to do so. From there, people should be able to help you debug your code and often even the API writers will hop in to figure out what your issue is. Nowadays, a quicker way to ask the code writers is to join the discord channel of the API. That gets you, not only a community but also answers and direct access to the API writers. 

What other techniques do you use when you're stuck? What's your go-to? We also didn't even talk about the Ballmers' peak which is my personal favorite ;)
Back to all blog posts