God Mode

There are few things that excite the lazy geek, and quite close to the top of that list is the ability to create programs without having to go through the tedium of actually learning a programming language. For those who have ever wanted to make their own game without having to deal with the (many) intricacies of game programming, FPS Creator is a godsend. It makes creating your own first-person shooter (FPS) a simple matter of drag-and-drop-draw environments, place enemies and weapons, and start playing!

You’ll find the demo of FPS Creator on this month’s DVD-it lets you test games, but not make standalone EXEs out of them. The full version is a remarkably reasonable $49.99 (Rs 2,300), and lets you create standalone EXE files for your games, and even sell them royalty-free. The system requirements aren’t too heavy-most half-decent PCs should be able to handle FPS Creator and its games.

Starting out with FPS Creator is quite easy, and the manual it comes with is quite comprehensive and more than enough to help get your first game off the ground.

One drawback, of course, is that all the games you create will end up looking factory-made-the same sounds, similar textures, same old AI-and if you’ve used the program even once, you can easily tell whether a game was made using FPS Creator (FPSC). If you want your game to be unique, you’ll need to brave the dark underworld of AI scripts and 3D models. Read on for what you need, but remember-you’re not going to create the next F.E.A.R. anytime soon with FPSC, and certainly not without serious programming skills.

Finally, we advise that you keep FPS Creator open while you read this.

Creating Your FPS

The program starts with the Prefab (a pre-made environment) tab open. Just click Add New Prefab, select the one you want, and use the mouse to place it

You can now add to this Prefab by using segments from the Segments Tab. Click to add, and right-click to subtract. To edit the other floors (levels) of your environment, use the ” ” and “-” keys

We actually prefer using segments to Prefabs-there’s more freedom there. Here’s the result of our tinkerings

From the Entity tab, select your enemy. Place them in the room, and right-click to get the view you see here
Use the entity tab again to place the weapons you’re going to let the player use
Finally, from the Markers Tab, place the Player Start marker where you want your player to, well, start

Lock and load!

Die, foul vixen!

Now Hack It

To change your game, you’ll need to edit the files that FPS Creator packs into it-you’ll find these under Program FilesThe Game CreatorsFPS Creator DemoFiles. The first (and easiest) thing you’ll want to do with your game is to change the way it looks and sounds. Little of the rest is easy, and some parts profoundly bizarre. Depending on how deep you want to go, you’ll need basic knowledge of image editing and 3D concepts, and some programming knowledge wouldn’t hurt, either.

Hear Me
Once you’ve navigated to the Files folder, you will find the game sounds in the audiobank folder. The organisation is quite simple and self-explanatory, and all you have to do is replace the existing sounds with the ones you really want, or just edit them in an audio-editing program. Our recommendation: first attack the player’s extremely annoying jump grunt-audiobankvoicesplayerleap.wav.

FPSC also lets you customise the way your footsteps and gunshots sound when walking on / shooting at different materials. You’ll find them in the audiobankmaterials folder. You will find sounds suffixed with either S, I, D, or nothing. The ones without the suffix are files that will be played when you walk on that material.

The “S” sounds are played when something scrapes against the material, “I” for impact sounds like falls, and “D” when the object is destroyed. You’ll find these details in materialdefault.txt right there, along with another parameter called matdecal-this is the decal (an animated visual) that shows up every time the sound is played. For example, if you shoot into the ground, you’ll hear the impact sound, and the dust decal plays, showing you dust rising from the gunshot.

See Me
We’ve just talked about decals, so let’s start with those. Strictly speaking, a decal is a picture or design applied to a surface. Here, the surface in question is a 3D model-mostly a particle system. FPSC uses the DDS (DirectDrawSurface) file format for all its textures and decals-it occupies very little space in your GPU’s memory, because it remains compressed there as well, unlike other formats that uncompress into memory. To view DDS files, all you need to do is download a plugin for IrfanView. To edit them, you will need to download NVIDIA’s DDS plugin for Photoshop from http://developer.nvidia.com/object/photoshop_dds_plugins.html. If you don’t use Photoshop, you can get DDS Converter from http://eliteforce2.filefront.com/file/DDS_Converter;29412, which converts from most popular formats to DDS. You will find FPS Creator’s decals under gamecoredecals. Each decal is in a folder of its own, with a file called decalspec.txt, which contains this:

;decal spec

;DECAL
across     = 4
down       = 4
offsety        = 50

The first two lines are just comments; the remaining is what matters. If you open up the decal, you’ll see it divided into sixteen squares-one for each frame of the animation. “across” and “down” are the number of squares that you’ve drawn in those directions, and “offsety” is how much the decal should be raised above the ground. If you set it to zero for the fire decal, for example, you would end up seeing the top of the fire just brushing the floor surface. Getting it right is a matter of trial and error. The black part of the decal is actually the Alpha channel, which determines what parts of the decal are transparent. Naturally, you’ll need an image editor that supports alpha channels-this applies for all the DDS files in your game.

If you’ve made a new decal and want to incorporate it into the game, you also need to enter it into the entity bank. Go into the entitybankgenericdecals folder, make a copy of one of the .fpe files there, and give it the name you want to give your decal. Open it up and you’ll see this:

;header
desc    = {put a one-word description for your decal here}

;ai
aiinit     = repeatsound.fpi {if you don’t want a sound to play around the decal, use appear.fpi}
aimain          = decal.fpi
aidestroy     = disappear1.fpi

;orientation
model         = particles.x
textured      = particles_d.tga
transparency  = 0
defaultheight = 0.5
soundset      = {point to the sound you want played around the decal. For example, audiobankmysoundsmydecal.wav}

;identity details
strength      = 0
isimmobile    = 1
ismarker      = 4

;decals
decalmax      = 1
decal0        = {give your decal a name}

In the gamecoredecals folder, create a folder with the exact same name that you gave for decal0 above. A quick solution now is to copy the files from one of the other decals and paste them here, and then edit them. Don’t forget the Alpha channel!

This was just decals-kid stuff when you compare it to what else you can do to the look of the game. You can also modify textures (they’re in the texturebank folder) the same way, and with some knowledge of 3D, even add new guns!

Get Smart
FPS Creator uses its own FPI scripting language for all the AI in your games, and learning it is quite intuitive. It hides the more low-level AI away from you, but gives you control over the actions that entities take when faced with a condition. You’ll find these scripts in the scriptbank folder, and they’ll open in either Notepad or WordPad. Your typical FPI line looks like this:

:condition1,
(condition2)…: action1,
(action2)….

The literal translation would be thus: If condition1, condition2, etc. are all satisfied, perform action1, action2, and the rest. You will find the whole list of conditions and actions in the FPS Creator manual-there are an obscene number of them to choose from. Let’s start with a basic tutorial-a light that turns on when you’re near it, and off when you go far. In the scriptbankuser folder, create a new script called myscript.fpi, open it in Notepad, and add this:

;Artificial Intelligence Script

;Header

desc    = proximity light

;Triggers

:state=0,plrdistfurther=100:lightoff=1,state=1
:state=1,plrdistwithin=100:lighton=1,state=0

;End of Script

The lines that begin with a semicolon are comments, and standard to every script. The “state” variable is what FPS Creator uses to distinguish between different states of the entity; otherwise all the actions would be taking place at once. When you’re writing more complex scripts, always make sure you have distinct states for each set of actions-ignoring them could cause your game to crash. Now to use this script in your game.

Start a new project in FPS creator, put in a prefab, and from the Markers, choose one of the lights. Place it anywhere in the scene. Now right-click on it, and you’ll be taken to an editing screen which shows you a 3D view of the light, and a configuration panel on the left. In the configuration, change Static Mode to No, and under AI Scripts, point the Main script to the one you just created. Click Apply Changes.

When you run the game and walk towards the light now, it should turn on in response to your proximity. Remember, you won’t see a 3D model for the light-it will appear as if from nowhere.

This is very basic behaviour, but as you can see, FPI scripting is quite simple and the best way to understand more is to simply read the scripts in the script bank and keep the manual handy.

Boss Battle
If we were to demystify FPS Creator for you, we’d probably end up filling up most of this issue. However, the developers have made it easy for us-the files in FPS Creator are organised so as to be easy to fathom for the inquisitive mind: getting used to the scripts and other files took less than a week for us. In essence, if you’ve got the itch, the scratch isn’t far.  


Team Digit

Team Digit

Team Digit is made up of some of the most experienced and geekiest technology editors in India! View Full Profile

Digit.in
Logo
Digit.in
Logo