2D Area Coordinates
Area coordinates require you to specify two sets of coordinates. One coordinate represents the top/left of the area you wish to specify, and the second coordinate represents the bottom/right corner.
2D Collision
When two rectangular areas overlap each other, the two areas are said to be colliding.
2D Coordinates
Coordinates in 2D are represented by an X and Y value. Screen coordinates start at the top/left of the screen. The default screen size is 640 pixel wide and 480 pixel high. The first X value of the coordinate specifies a horizontal position that counts from left to right. The second Y value of the coordinate specifies a vertical position that counts from top to bottom.
3D Accelerator
A 3D Accelerator is a hardware device that will speed up your 3D rendering performance.
3D Coordinates
Coordinates in 3D are represented by an X, Y and Z value. This type of coordinate describes a point in 3D space. The X describes the horizontal value of the point, the Y describes the vertical value of the point and the Z describes how far into the distance the point is.
3D Object Animation
3D Objects can sometimes store animation data. 3D objects are animated by rotating, positioning and scaling the limbs. The animation data describes a sequence of changes that will be played on the 3D object. It is possible to append animation data to the end of an existing animation sequence.
3D Object Collision
When two 3D objects in 3D space overlap, they are said to be colliding. There are three types of collision a 3D object can use, and each depend on the shape of the area of collision. By default, objects use a collision area that is perfectly contoured to every polygon on the model, and represents the slowest form of collision. A spherical collision area can be wrapped around the object to provide the fastest collision detection and a rectangular bounding box is the third type of collision shape.
3D Object Interpolation
When a 3D object manually sets the new animation frame number, the visual alteration is instantaneous by default. It is possible, however, to slow down the rate at which the new frame is set. By slowing down the transition, you can create the effect of the model morphing seamlessly from one frame to another to smooth the joints between separate animation sequences.
3D Objects
Three dimensional models are rendered to the screen using 3D objects. The 3D objects carry all the information about the models position, rotation, scale, special effects, settings and collision detection.
3D Sound
Sounds data is universal, but the manner in which it can be played can vary tremendously. 3D sounds can be loaded from normal sound data and played as a 3D sound by adding information about the position of the sound and the position of the listener at the time the sound is played. This is all the information you are required to provide to create 3D sound.
3D Space
You can imagine 3D space as the infinite void of space. Imagine that you come into this universe at its very center. You are able to create and position objects within this 3D space to create absolutely anything you can imagine.
Ambient Light
Ambient light is the light that is automatically introduced into any 3D scene. The intensity of the light can be adjusted from its current high level to absolutely zero. A second light source positioned high like the sun provides directional light. 3D objects whose surfaces face this directional light will be brighter than the ambient light level. By reducing ambient light to zero, the directional light becomes very distinct.
Analogue Joystick
An analogue joystick is a device which allows you to read analogue data from a joystick. Analogue is better than digital because it returns precisely how far you have moved the joystick handle from the center position, whereas digital only returns either True or False for a particular direction.
Arrays
Arrays are areas of memory reserved for the storage of program data. They can be accessed using indexes, like a filing system, to allow the program to write out ordered data and retrieve it at any time.
ASCII Codes
ASCII codes are the values that represent the identities of the characters that make up the text you are reading now. There are 256 ASCII codes in the standard English character set, and most of them are hardly ever used. The most common ASCII codes are values 65-89 that represent the uppercase characters 'A' to 'Z' and values 48-58 that represent characters '0' to '9'.
AVI File Format
The Microsoft Video One file format is used to store compressed visual and audio data. Known more commonly as AVI files, they are one of the types of media files used to store video clips and animations.
Backdrop
The backdrop is an automatic backdrop system when using 3D objects. The backdrop can be any color, textured and even scrolled to create simple horizon, skyscape and star effects. The backdrop can even be used as a scrolling ground terrain for games that use a birds-eye perspective.
Bitmaps
A bitmap is an area in memory were pixel data is stored. This map of pixel data will make up a graphic image which can be then displayed on screen. Based on the pixel bit depth, a pixel can take anything from 8 to 32 bits to store the color.
Blitter Objects
To blit something is to paste an image to the screen. Blitter objects will repeatedly paste an image to the screen at a particular position. The advantage of using the blitter object is that you can move your image around your screen without disturbing the background. You can keep changing the image to create animation, or scale, stretch, flip and mirror the blitter object as you see fit. It is a fundamental ingredient to any 2D game.
BMP File Format
Bitmap files store a bitmap image of a particular width, height and depth. Bitmap files can either be saved as a bitmap block or compressed using run length encoding. Run length encoded bitmaps can only have 256 colors and are generally much smaller in size.
Camera
Even without using the camera, it is a critical ingredient to displaying any 3D on screen. You can imagine the camera as an invisible eye that peeks into your 3D world at a particular position. The camera can either be pointed to a coordinate in 3D space, or rotated to a specified angle.
Checklists
Checklists are an easy way to gather specific data. Each time you perform a checklist for particular data, it stores the results of the search in a list and numbers them incrementally. You can then get the size of the final list, and retrieve any item from the data you wish.
Color Bit Depth
A pixel can use 8, 16, 24 or 32 bits to store a color. A bit is a term used to describe the smallest piece of data you can store in memory. A screen that has a bit depth of 8 can only hold 256 different colors. A screen that has a bit depth of 16 can hold 32000 colors. A screen that has a bit depth of 32 can hold over 16 million different colors.
Color Values
Any commands that require a color value will only accept a single integer to specify the color. You must generate this color value using the RGB command that takes a Red, Green and Blue component to determine the final color.
Conditions
A condition is created when you compare two values using an operator. A condition will always be True or False. An operator can be Equal To, Greater Than, Less Than, Greater Or Equal to, Less Or Equal To or Not Equal To. You can add additional comparisons using the AND and OR statements. E.g.
IF A=10 THEN PRINT "VARIABLE A IS EQUAL TO TEN"
IF A>10 THEN PRINT "VARIABLE A IS GREATER THAN TEN"
IF A>10 AND B>20 THEN PRINT "A IS GREATER THAN TEN AND B GREATER THAN 20"
Control Devices
Control devices can range from Force Feedback joysticks to Head Mounted Virtual Reality Headsets. The different types of devices are incredible, but their use can be generalized into analogue data and button presses. Other devices can be issued commands through the force feedback commands.
Data Statements
To include data inside your program you can use the DATA commands. Data is compiled with your program and accessed internally removing the need for external data files. Data can be stored as integer numbers, real numbers and strings.
Data Types
There are three main types of data. Integer Numbers are whole numbers without a decimal point. Real Numbers use a decimal point. Strings are the third type of data and are used to store single characters and whole sentences.
Digital Joystick
A digital joystick is a device which allows you to read the direction when you move the joystick handle. Unlike analogue joysticks, digital joysticks do not tell you accurately how far the joystick handle has moved.
Display Modes
The choice of display modes is determined by the type of graphics card you have. The default display mode is 640x480x16 which creates a screen to that size and bit depth. Providing your card supports it, you can set the display mode to anything you wish. Eight bit display modes are not supported.
Executables
An executable, or standalone executable are programs that can run independently of the language editor. Standalone executables are often refered to by their file extension .EXE and can be run, or executed directly. Executables can be created using the BUILD EXE and BUILD FINAL options from the file menu of the editor.
Expressions
An expression is a mathematical calculation that evaluates to a value. An expression can be made up of commands that return a value, user functions that return a value, variables and immediate values. You can use brackets and mathematical operators on all values, providing the expression is calculable and makes sense.
File System
The file system is the part of the PC that handles the access, reading and writing of files on your drives. You should have some knowledge of drives, directories and files before using file system commands. You may accidentally delete something important.
First Person Perspective
The description given to the game genre is played through the eyes of the participating user. The player cannot see their body or other form, but may be able to see a sword or other weapon that they might be carrying.
Fogging
Most modern 3D cards have a fog feature that allows the world to be cloaked in a mist that obscures the scene the further away from the camera you look. Fog color and thickness can be controlled to create a variety of effects.
Fonts
A collection of text character sets with predefined typefaces. Two examples of fonts are Courier or Times New Roman. Fonts can also be altered in style, size, color and transparency.
Force Feedback
A type of control device that can provide force to the operator of a joystick. Force feedback can make a joystick move the stick in any direction and even create realistic tensions such as the mobility you might feel if wading through water.
Graphics Cards
A part of a PC that controls the screen display. Most PCs are fitted with 2D cards as standard, sufficient to operate Windows smoothly. Many games require a graphics card with 3D acceleration to handle the demands of modern software.
Hardware Acceleration
Hardware Acceleration can be achieved by fitting a 3D graphics card.
Images
Images are no more than graphic blocks that have been grabbed from a bitmap and stored in memory. Images are used for fast graphics pasting, but more often are used to provide the animations for sprites and the textures for 3D objects.
Includes
Includes are sub-programs that are linked with your main program and exist as part of the same project. The function declarations of these sub-programs can be used in the main program, allowing large projects to be divided into logical groupings of code. Subroutines and variables of 'included' sub-programs are ignored by the main program, with only the function declarations exposed. Sub-programs can also contain linked sub-programs of their own creating a nest of 'includes', but only 255 sub-programs can be included in total.
Integer Number
A whole number without a decimal point.
Jumps
When a program finds a jump command, it leaps to a new part of the program and continues running from its new location. GOSUB jumps allow the program to return to the point from which it jumped. GOTO jumps are permanent jumps and do not allow this. All jumps require a label in the program to jump to.
Keyboard
The keys on a keyboard can be divided into two types. Normal keys and control keys. Normal keys are the letters, numbers and symbols you associate with printable characters. Control keys are often indicated as the shaded keys on the keyboard. These keys use different commands to detect their use as very often control keys are used in combination with normal keys.
Label
A label is a plain english marker that is used by the program to make a jump. Labels are most often used to declare a subroutine that must always be headed by a label, or used to declare the start of a set of DATA statements.
Loading Media
Media files can be any of the BMP, AVI, WAV, MID, X or TXT type. Media files are often used to store data that has been retrieved or prepared externally and represents the visuals and audio of your software. When you load media files, an area of memory is used to store the data and it will remain their until you either quit the program or delete it.
Loops
A program is run by executing the first command in the program, then moving to the next one. This process repeats until there are no more commands to execute. A program loop takes this pointer and returns it to an earlier part of the program. When such a loop occurs, the program continually re-executes the same section of commands until the loop is broken. There are several types of program loop, but all share the same process of looping until the loop is broken.
Matrix Grids
A Matrix can be described as a grid of tiles that can be raised and lowered to create landscapes. You can also texture, rotate and scroll the matrix to create a variety of realistic landscape scenes and effects.
Meshes
A mesh is a wireframe description of a 3D shape.
MID File Format
MIDI is a format that allows a piece of music to be recorded and played back. The advantage of using MIDI is that all the instrument effects are stored on your sound card and so MIDI files are notoriously small.
Mouse Pointer
The arrow that moves around the screen when you move the mouse is the mouse pointer. You can retrieve the 2D coordinate of a mouse pointer and detect for mouse button clicks very easily.
Music
Music is played using the MIDI sequencer that takes advantage of any advanced sound card technology.
PC System
It is important to realize that if you wish your software to be used on other machines that your software will not fail. It is always important to check for the existence of a mode or device before presuming you can use it. Checking the memory of a machine can reveal how much media you can afford to load in at any one time.
Real Number
These numbers use decimal points to specify floating point values. Real variables are recognized for having a hash(#) as the last character.
Refreshing The Screen
Any real-time software requires a good screen refresh rate to present a smooth professional presentation. Screen refresh is handled automatically by default to give beginners as little to worry about as possible. Using the SYNC ON command however, the user can take control of updating the screen and increase the efficiency of the refresh.
Remarks
Remarks are used to make comments within the program, providing a plain english description of what a particular piece of code does. There are many ways to implement remarks, including the time honored REM statement.
Screens
A screen is defined by the current display mode. The default display mode is 640 pixels wide, 480 pixels high and has a bit depth of 16. This means your visible screen is 640x480. If you change the display mode you change the screen. The screen itself uses bitmap zero to draw to. Anything you draw to bitmap zero will appear on the visible screen. You only have one screen at any one time, but you are able to store bitmaps off-screen and use bitmap zero as the work area for your software.
Sounds
Sounds are played using WAV data. You are able to alter a sounds speed, volume and panning. Panning is the effect of moving a sound from one speaker to another. You can also generate true 3D sounds by providing 3D information for the sound. You are able to play many sounds simultaneously, but it is recommended to keep to 4-6 for performance reasons.
Strings
Strings are used to store single characters, words and whole sentences. They are recognized by enclosing the text you wish to treat as a string in speech marks. String variables are recognized for having a dollar($) sign as the last character.
System Memory
The main RAM chips plugged into your motherboard represent the total amount of system memory in your machine. Do not confuse this with available total memory which takes into account memory used by Windows, other applications and your software.
Text Settings
At any time, the text settings hold data that determines how text printed by the TEXT or CENTER TEXT commands will be output to the screen. Text settings hold typeface, style, size, color and transparency information.
Textures
Textures are used to paint the surfaces of 3D objects. You can apply your own texture to a 3D object by grabbing an image from a bitmap and simply texturing it. Textures cannot be greater than 256x256 is size. The texture size must be divisible by two. Some graphics cards will not render the texture if the width and height are different sizes.
Time Format
Commands that require a time value must be given a value measured in milliseconds where 1000 units represent 1 second of time.
Third Person Perspective
The description given to the game genre is played through the eyes of a remote camera that tracks and follows the participating user. The player can see their game persona as it moves around the game world, as though seen by a third person.
TXT File Format
A simple ASCII data file. You are able to load TXT files by declaring a single dimension string array and loading the TXT file as an array. You can then access the array to get at the text data.
User Defined Functions
In addition to the commands that are built into the language, you are able to add your own by declaring a function somewhere in your program. You can even build your own custom commands to speed up your developments even further.
Video Memory
The RAM built into your graphics card represent the total amount of video memory in your machine. It is not possible to determine how much video memory is being used at any one time due to the dynamic nature of Dark Basic.
Visible Screen
The visible screen uses the contents of bitmap zero as the work area. Drawing to bitmap zero, which is the default, is in effect drawing to the screen. Bitmap zero cannot be deleted. If the program switches the display mode, the screen also changes to the dimensions of the display mode.
WAV File Format
The WAV file format has been around for over a decade and is an uncompressed data sample of a sound effect. By playing the WAVE data through the sound card, the sound reproduced can be literally anything.
Wireframe
A wireframe is a method of displaying a shape, matrix or 3D object without filling it in with shades or textures. Wireframe displays are useful for measuring polygon complexity and a few parlor tricks. The downside to using wireframe is that the shapes are clipped when they leave the screen, allowing the user to see the triangle divisions taking place that may not be desirable in a finished piece of software.
X File Format
The XOF file format is the primary format used by DirectX developers to load 3D data quickly. It is not the most common file format amongst modelers and 3D animators, but converters are available to convert the more common 3DS, LWO and COB files over.