Chapter 11: The Basics of Programming

Overview

Programming is like being a general in the military and giving absolute commands to your troops. You say “march” and 100 soldiers begin to move forward. You say “halt!” and they all stop immediately. This is programming. You tell a dumb machine it can only do a few things, such as add “one plus one” and answer the question “does one equal one?” Simplistic? Yes. Realistic? Yes.

Commands (or let’s call them “instructions”) are processed in order. Life is processed in order.

At 7:00 A.M.: You get up out of bed.
At 7:15 A.M.: You walk into the bathroom.
At 7:16 A.M.: You turn on the water in the shower.
At 7:17 A.M.: You get into the shower.
At 7:18 A.M.: You soap yourself.
At 7:19 A.M.: You rinse off.

Repeat three more times.

At 7:20 A.M.: You soap yourself.
At 7:21 A.M.: You rinse off.
At 7:22 A.M.: You soap yourself.
At 7:23 A.M.: You rinse off.
At 7:24 A.M.: You soap yourself.
At 7:25 A.M.: You rinse off.

(end of the loop or repeated commands)

At 7:26 A.M.: You exit the shower and dry off.

This is life, but it can also be looked at as a set of instructions (or programming).



Game Design Foundations
Game Design Foundations (Wordware Game and Graphics Library)
ISBN: 1556229739
EAN: 2147483647
Year: 2003
Pages: 179

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net