Pseudo-Code

Kenneth Skodje
1 min readMar 20, 2021

--

— A valuable tool in your arsenal

Using pseudo-code is a great way to plan out how your code should work. It can be used as a sort of make-shift blueprint. Using pseudo-code you work out the necessary steps for how your code should work, in plain language.

if player gets hit
check if it's hit by enemy laser
player takes damage
laser is destroyed

As you can see by the simple example above, it would be pretty easy to know what you need to work on to get the desired functionality.
I like to keep the structure similar to how the end result will look, to better visualize the ‘logical flow’ of how the code will look.

Instead of having to think of all the parts as variables and methods from the get-go, you can start with a big picture view of what needs to happen and work from there 😀
An added benefit is that if you, for whatever reason have been away from your project a while, having the pseudo-code shows what has been done, what needs to be done, and get you back into it faster!

The end result could end up looking like this, but there could be several steps in between. Most likely I would work my way from the outside and work inwards, replacing parts of the pseudo-code with actual code until completed.

--

--

No responses yet