AFX+FPS+Vehicles screenshot and progress report
by Gibby · 12/30/2008 (5:06 pm) · 1 comments
Greetings and Felicitations...
...With the advent of TGEA 1.8, I'm currently in the process of updating my Macs to begin porting my project over. In the meantime, I thought I'd share what I've done so far. Below is a composite shot showing the AFX interface/spells grafted onto an FPS game:

Full shots can be seen on my tech blog here.
For those who have been trying something similar, let me share what I've done.
As Jeff Faust has stated numerous times, the AFX demo is extensively hard-wired as an RPG style game. 'Though it may look like starter.fps, the player, ai, GUIs and numerous other functions are so different as to make reverse-engineering too time consuming to be effective. Believe me I've spent many hours trying. Eventually I followed this path and managed to get it to work.
First I added Advanced Camera, aiGuard and aiPatrol, plus a few mods of my own to the TGE 152+AFX source code and compiled a new working binary, which was then tested on starter.fps. I then got vehicles and weapons to work the way I liked them by modifying the scripts. Once FPS play was working, I then copied the AFX assets to my FPS game and included the AFX-specific scripts. The time-consuming part of all this was going throught the AFX scripts and changing the path references so that the spell icons all worked. Once I worked all this out, I could access the AFX spellbook from within the FPS game and everything seemed to work.
Next I designed GUIs for each mode - FPS, vehicles and magic, each with it's own set of key bindings and mouse behavior, all called from script using the 'm' key, which in my design is referred to as 'Moda'. The player begins in FPS mode, and by pressing 'm', his weapon is stowed and a modified version of the AFX GUI is opened. In this mode the mouse is used to select items on the screen instead of navigation. Pressing 'm' again brings the player back to FPS mode. If a player mounts a vehicle, yet another GUI is called, this one using key commands to acquire the target. I adapted afxMagicMissile and afxMachineGun to become my guided weapons, and added a few new spells for foot-slogging players to defend themselves with.
For those endeavoring to try something similar, I found that afxCamera is coded to work with the player and bot spawning in the AFX demo and won't work in an FPS without major modification. I opted instead to use Advanced Camera, since afxCamera is based on it anyway. In the process, I lost the use of Reaper Madness and Rid of Habeas Corpus, but I'd added a half dozen of my own spells anyway so the trade off was fine for me. I may go back and write my own resurrection spell, but for now having a functional FPS magic system was more important.
So once I have my Macs ready for TGEA, I'll post back here with progress updates...
...Gibby
aka Gilberto 'Mago' Morales
...With the advent of TGEA 1.8, I'm currently in the process of updating my Macs to begin porting my project over. In the meantime, I thought I'd share what I've done so far. Below is a composite shot showing the AFX interface/spells grafted onto an FPS game:

Full shots can be seen on my tech blog here.
For those who have been trying something similar, let me share what I've done.
As Jeff Faust has stated numerous times, the AFX demo is extensively hard-wired as an RPG style game. 'Though it may look like starter.fps, the player, ai, GUIs and numerous other functions are so different as to make reverse-engineering too time consuming to be effective. Believe me I've spent many hours trying. Eventually I followed this path and managed to get it to work.
First I added Advanced Camera, aiGuard and aiPatrol, plus a few mods of my own to the TGE 152+AFX source code and compiled a new working binary, which was then tested on starter.fps. I then got vehicles and weapons to work the way I liked them by modifying the scripts. Once FPS play was working, I then copied the AFX assets to my FPS game and included the AFX-specific scripts. The time-consuming part of all this was going throught the AFX scripts and changing the path references so that the spell icons all worked. Once I worked all this out, I could access the AFX spellbook from within the FPS game and everything seemed to work.
Next I designed GUIs for each mode - FPS, vehicles and magic, each with it's own set of key bindings and mouse behavior, all called from script using the 'm' key, which in my design is referred to as 'Moda'. The player begins in FPS mode, and by pressing 'm', his weapon is stowed and a modified version of the AFX GUI is opened. In this mode the mouse is used to select items on the screen instead of navigation. Pressing 'm' again brings the player back to FPS mode. If a player mounts a vehicle, yet another GUI is called, this one using key commands to acquire the target. I adapted afxMagicMissile and afxMachineGun to become my guided weapons, and added a few new spells for foot-slogging players to defend themselves with.
For those endeavoring to try something similar, I found that afxCamera is coded to work with the player and bot spawning in the AFX demo and won't work in an FPS without major modification. I opted instead to use Advanced Camera, since afxCamera is based on it anyway. In the process, I lost the use of Reaper Madness and Rid of Habeas Corpus, but I'd added a half dozen of my own spells anyway so the trade off was fine for me. I may go back and write my own resurrection spell, but for now having a functional FPS magic system was more important.
So once I have my Macs ready for TGEA, I'll post back here with progress updates...
...Gibby
aka Gilberto 'Mago' Morales
Torque Owner Gibby
faderboy digital media
http://www.faderboy.com/news.html
tell 'em Gibby sent ya...