Variables! — The building blocks of programming

To be able to make our game we need to be able to make our player do actions. These actions must be given names and identified within the script of our player. Anything in games is a sort of variable assigned to an element whether it is a skill or an attribute.

For example making our player move we had to decide how we declare the speed:

Here “speed” has been made as a Float variable, this means it is a decimal and the number must end with an f.

Ever variable has a name, data type, size and value

We can declare the name.

The main data types are Integer, Float, String and Boolean

Integer = being a whole number

Float = a number with a decimal point

String = a sequence of characters

Boolean = true or false



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store