Next Page...

# Chapter 2 |  |
| # Project Files |

## Introduction to TNT Basic Project Files

The central part of your TNT Basic creation is your TNT Basic Project file. The project file contains everything that is used by your game, all the graphics, sounds, music and code needed to run your game.

A TNT Basic project file is divided into seven parts. These are:

- Info Section
- Code Section
- Graphics Section
- Sounds Section
- Music Section
- Maps Section
- Input Section

Some sections, such as the "Graphics", "Sounds", "Music", "Maps" and "Input" sections can contain multiple items, for example, multiple pictures in the graphics section, multiple sounds in the sounds section etc. Each item is called a "resource".

Resources
A resource is a piece of data in a TNT Basic project file. It is very much like a file on your hard disk, except that it is inside the TNT Basic project file. By copying all your graphics and sounds into a project files, you make your entire game into a single self contained file.

Resources have a type, a name and an ID number. The type is a four letter string describing the type of data, eg "PICT" for a picture, or "snd " for a sounds, or "TMAP" for a TNT Map. The resource type can be likened to the type of files on your hard disk, ie picture files, sounds files etc.

The ID of the resource is a number that is used to identify it. Each resource of a given type must have a unique ID within the project file. This means that you cannot have two picture resources with the same ID, but you can have a sound resource and a picture resource with the same ID without any problem.

Each resource also has a name. The name can be anything you want, it can be even left blank. Resource names do not have to be unique, and each resource could have the same name without any problems occuring. The name is soley for your use and is not important to either Hieroglyph or TNT Basic.

In summary, a TNT Basic project file is divided into seven parts. Some of these parts contain resources. A resource is like a file on your hard disk but is inside the TNT Basic project file. Resources have a type, a unique ID and an optional name.

Next Page...