Programming Terms – 29/01/21

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.

Ratchet & Clank (2002 video game) - Wikiwand
Health += 25

Class

A class is an object in a game. A class could be a player, a weapon, a car, can be pretty much anything.

GTA V: Get in your car - Orcz.com, The Video Games Wiki

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.

9 Insane Tricks Used By Mario 64 Speedrunners - IGN

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.

Best wall weapons to use in Black Ops Cold War Zombies | Charlie INTEL

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.

Fortnite | Health And Shields - GameWith

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.

The Legend of Zelda: Links Awakening DX

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.

Mario has > 3 Stars = True

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.

Image titled Beat the Third Bowser in Super Mario 64 Step 1
If Mario has 80 Stars then run the code for door to open.

Leave a comment