A Game from Start to Finish

03:Programming

The design of fun
Programming

Programming is essential for making the game move.
What a program does is give commands to the machine.
Though they seem difficult when you first look at them, you could say that these commands are only simple things that get understood and done in a certain order.
First of all, the game characters are all displayed in order.
Then, let’s say you give one character the command “walk”, then the order is carried out, and the character walks.
However, this doesn’t show right away. Maybe there’s a wall or an enemy in the way, making the character unable to proceed.
In this case, there’s a collision, so before the walking animation displays, your character is returned back to its spawn point.
Once everyone’s position is figured out, all the characters are displayed again. In a really basic way, all games are just this process repeated over and over again.
Though each command is one simple order, when you start combining them all together, you can make anything possible.

What’s needed for programming

For example, when setting positions, what happens when you give the command for all the characters to move down a little bit? In the next display, all of them will have fallen together.
One of the interesting things about programming is how one little command can make a huge difference.

However, if all you do is repeat this command, the characters will just flow down like falling rain, and it would look as if gravity didn’t exist.
What happens when you drop something in real life? As it drops, it goes faster and faster, right?

That means that in the next timing moment, you’d try a command like, “Fall twice the distance you did last time”. You do that, and then…? Well, that really is one of the fascinating things about programming – just like the example above, you think, find a rule, try it out, and as a result things start moving how you want them to.

How to build up programming skills

Work hard at arithmetic

In arithmetic and math, you study what the world is like by using formulas, which is the only thing that computers can understand. Especially when programming games, you’ll put to use all of your arithmetic and math knowledge. Keep on studying and get used to working with formulas. Studying like that is sure to come in handy when programming.