Living World Productions
Video Game Blog

June 15, 2019

Found a bug or two that needed to fixed. In programming in C++, you have to make sure to ensure that you're protecting your data as in most cases it's easy to accidentally assign something because you used the wrong sequence of operators.

For instance...in the following line of code...

if (MyClassObject.IsItActive == true)... ;

Reads as...
"If the Object that is created using the MyClass, 'is active', then act upon that truth."

In the following line of code...notice the omission of one of the equal signs.

if (MyClassObject.IsItActive = true)... ;

This reads as...
"If, after assigning the value or 'true' to the variable 'IsItActive', is 'true', then act upon this assignment.

Number 1 problem, in such a case, the programmer should have made a Function that controls the assignment and retrieval of the data, and protected it behind its authority. This keeps other points in the software from assigning anything in an unprotected situation.

This is a very difficult bug to find as it's something you would not think would be there, as you're thinking you typed "==" instead of "=".

Needless to say the bug was found and eliminated, and the data type is still unprotected for now. Yes, I know...bad practice. I'll get to converted it to a more safe set of code after the nine month project time.

In the screen shot below, I am showcasing a new input screen that has its own set of parameters that is independent from everything else. Later I will be converting this into its own "Component" so that it can be used with anything that might need input.