FPI

From GDWiki

Jump to: navigation, search

This is the EXTREMELY simple language used inside the First Person Shooter Creator.


[edit] What is it, exactly?

This is a very simple language made that is used inside FPSC. When a game made by the FPSC is loaded the FPI scripts are rapidly compiled to a very fast form of bytecode. These scripts are used in the replacement of any other language, they essentialy run the entire game. These scripts are just text files (.txt) that are saved as .fpi. There is a free FPI editor available, or you can use notepad.

[edit] The syntax

The syntax for these scripts is also fairly simple, as you can see below:

state=0,another condition:action,state=1

Each line begins with a : and : is also used to seperate the condition statements from the action statements. The state=x is a command and also a condition, depending on where it is located inside the line. If it is used as an action then the state variable is changed to whatever x is, in the case of the above example, 1. If used as a condition, FPSC will check and see if the state variable equals x. If it doesn't, or if another condition isn't met, then FPSC will not read any further on that line and will skip to the next, until all lines have been read. It will then repeat the script unless any commands are issued that change this.

Note: FPSC assumes for every script that state starts at 0. There is also another variable stored for the script inside of the game engine, one is assaigned to every script after they are compiled. This is whether the script is active or not. If this variable is set to 1 then the script will continue to run, other wise it will not until activated again.

Personal tools