Game Design Foundations (Wordware Game and Graphics Library)
|
|
Architects design plans, builders create blueprints, and engineers draw schematics. Computer engineers (including programmers) draw flowcharts to visually explain the system’s or module’s flow that they wish to design.
Let’s start with a few common computer programming terms.
Character or Char is an 8-bit (numbers from 0 to 127) storage location that is used for alphanumerics (numbers, letters A-Z, and symbols).
Boolean or Bool is an 8-bit storage location that is TRUE (non-zero) or FALSE (a zero value).
Integer or Int is a 16-bit storage location that is used for numbers –32767 to 32767.
Unsigned integer is a 16-bit storage location that is for positive-only integers or numbers 0 to 65,535.
Long is a 32-bit storage location that is used for numbers –2.1 billion to 2.1 billion.
Unsigned long is a 32-bit storage location that is for positive-only longs or numbers 0 to 4.2 billion.
Float is a 16-bit real number (decimal or fractions).
String is a group of characters (Char format) that are referenced by a common name and have a NULL (or zero)-ending delimiter.
Array is a group of common elements as an array of integers, an array of longs, or an array of strings.
Structure is a group of elements of various types. A structure wraps these elements together under one heading. A sample of a structure called “Employee” may contain the employee’s name (a string), the employee’s address (a string), the employee’s salary (a float), or the employee’s age (an integer).
Class is similar to a structure where various types of elements and functions related to these elements are combined. Similar to the “Employee” structure, we could have a class “Employee” that includes the employee’s name (a string), the employee’s address (a string), the employee’s salary (a float), the employee’s start date (a date structure, three integers defining the month, day, and year), and employee’s birth date (a date structure). The class “Employee” can also contain the function for the employee’s age (no longer an integer but a function based on today’s date and the employee’s birth date), a yearly salary review based on the employee’s start date, and a birthday e-mail function to send the employee an “E-card” on his birthday (based on the birthday variables).
ASCII stands for American Standard Code for Information Interchange.
|
|