Don’t you just hate getting stuck writing code? Seems pretty easy at first, just keep coding and iterating to get results. But, by the time you finally get your code working, you realize you’ve spent too much time on one thing.
That’s a beginner’s error.
Pseudo Code helps deconstruct functionality in your mind or a document (say a Game Designer hands you a document with a list of features that needs to be implemented), and translate it into lines of code.
I’ll give you an example:
We are working as a team. You are the lead programmer, and I am the lead game designer. I recently finished updating our Game Design Document (GDD), and you have a new feature to add to our game: Buttons!
To keep it simple, we want to prompt the player with an input (E key) if the player is near a button (player is within a minimum distance). If the player presses the button, it displays a message.
So, how would we go about this? By writing Pseudo Code.
The Pseudo Code is written. All is left to you to do is to replace it with real code!
Pseudo Code is extremely useful to remind you what you need to do, and to help you get results efficiently. Develop the habit of using it and commenting your code, and you’ll get far. Trust me.
That’s it for this article! If you enjoyed it, and want to see more of my articles, be sure to follow me on Medium!