In this blog post, I am going to explain some of the programming terms that we may use in several programming languages.
Declaration
A declaration is a fancy term for creating a class, variable or a function. A class is an object and a function is what that object does. If you declare something, you are creating something.
Operator
Operator’s in code are how we use math’s in code. These include various mathematical symbols that may include but not limited to ‘+, -, /, *, =, ==, +=, -=’. An example of using an operator could be if a player collects a this orb, it adds health to the player.
Class
A class is an object in a game. A class could be a player, a weapon, a car, can be pretty much anything.
Function
A function is a chunk of code that lives inside of a class, it essentially tells the computer what to do when this code is ran. An example of a function could be how the player moves.
Encapsulation
Encapsulation refers to how code is bundled within a script along with the functions that operate that data. This could be used for when a player picks up a weapon, the code would need to encapsulated with the player class for it to be operational.
Variable
A variable is something that comes in multiple forms, this could be a string, bool, char, int, float. A variable is declared by the Type of Variable, the name of the variable and the value of the variable. As an example if we have an Int named Health, that value would start at 100.
String
A string is a variable data-type that basically stores a piece of text. In a gaming example, this could be the players name.
Bool
A bool is a variable data-type that can only have a true or false value. This could be used in a game to see if the player has a certain item or level requirement to open a door.
Conditional
A conditional is a type of statement within some code, often perceived as an ‘if-statement’. Basically IF these requirements are met, then this happens.