Program Types

Before you begin developing your first program for the Pandora Engine, it is important to recognise that there are a number of ways that you can go about this depending on the type of program that you are going to write. On most competing platforms this boils down to choosing a language that suits your requirements and compiling the program down to an executable. However, in Pandora's case, when it is combined with Athene they offer a second option in the form of object scripting. In this section we look at executable and scripted programming in detail.

Executable Programs

If you are serious about developing Pandora based applications within Athene then we recommend that you avoid executable development if you can help it - for reasons that you will see in the next section. If you are using the SDK outside of Athene then your options will be heavily restricted, leaving you little choice in this context. Admittedly, writing an executable program is perhaps the easiest way to use the Pandora Engine as it will function like a normal API, something which is familiar to all programmers. The main disadvantage is that you will miss out on the extra features gained from scripted programming, and this can be a hindrance if you wish to develop more advanced applications.

Currently only C and C++ are officially supported languages for writing Pandora based programs, but there is nothing to prevent you from using it with others. If you cannot find third party support for a particular language that you wish to use, your main obstacle is converting the include and header files from C to the format accepted by your chosen language. This may take a few days, plus you will have to keep the files up-to-date when you download new versions of the Pandora Engine. If you wish, you can submit translated files to us and we will keep them current for you and the rest of the development community.

When using the Pandora Engine in executable programs it is highly recommended that you link to the main library (also known as the object kernel) at run-time. Compiling the object kernel into your main binary is bad form - it will only increase the size of your program and cause grief for the user when he or she discovers that upgrades to the kernel have no affect on your software. To see how you should link to the object kernel, refer to the makefiles' that are included with the example programs distributed with the Pandora SDK.

To see an example of a working executable program written using the Pandora Engine, refer to the Hello World section of the manual.

Scripted Programs

If you've already used Athene then you may have an idea of what a scripted program is - anything written in DML is a valid example. However, the script itself is simply the glue which ties all the program components together. To write a unique program using scripts you will need to develop your own object classes first, then use one or more scripts to bring them together into a the final product. Developing programs in this way will not only save you a phenomenal amount of time in the long run, but also give you an end result that will out-perform executable programs in a number of areas. Here are a few major advantages:

If your program script requires the addition of functionality that is not provided in the default set of object classes, you will need to write one or more object classes to suit your requirements. The bigger your program, the more likely it is that you will have to write extra code to 'fill in the gaps'. When choosing a language to develop an object class, your choices are severely limited if you want to achieve maximum portability. The key issue here is that the language that you wish to use must support two important features - 1. Must be widespread enough to support a number of platforms and processors, and 2. Must be able to compile 'library code' that is compatible with C and be flexible enough to support the library standards across different platforms. Our recommendation is that you use standard C for the development of object classes. This will give you fewer headaches in the long run, and is the only reasonable choice if you intend to distribute your code publicly. C++ can also be used, but it can cause problems when porting to platforms that do not support the language (e.g. embedded systems). For these reasons, Rocklyte Systems can only endorse third party classes when they have been written in standard C, so if official endorsement is important to you, make the right choice early on.

For further information on the development of object classes for use in your scripts, refer to the Class Development Tutorial.

Next: Module Interfaces


Copyright (c) 2000-2001 Rocklyte Systems. All rights reserved. Contact us at feedback@rocklyte.com.