Game Development Community

dev|Pro Game Development Curriculum

Flight Game Example for TGE(A) - OUT NOW!

by Martin Schultz · 06/21/2007 (7:18 am) · 76 comments

(continued from my previous blog)

After several months of development, improvement and bugfixing the Flight Game Example has been completed and is available for 30 US$ as electronic download. You can get it right here on the Decane website or from the Plimus store.

The Flight Game Example (FGE) shows how to make a flying game with Torque and includes the complete script sources and the source art in Photoshop and 3DS Max 7, .X and FBX format. Beside that it includes a detailed documentation with general explanations, a script walkthrough, a merger guide as well as tips & tricks. A set of custom C++ classes have been developed to enable AI flying vehicle movement. Those classes are published as public resource on the GarageGames site (to be conform with the TGE(A) EULA) and include a detailed walkthrough of all the necessary engine changes required to get the 2 space ship classes working. The first class is used for a fighter class space ship and the second class is used to steer a mothership kind of space ship and has in difference a trigger that can be sync'ed together with the space ship to allow script-side custom trigger operations (like healing other ships or re-arming). The FGE contains also a complete working demo with pre-compiled Windows binaries of TGE 1.4.2, TGE 1.5.2 and TGEA 1.0.1. Additionally a Mac TGE 1.4.2 universal binary is also included.

Please see here a list of features of the FGE:
- Complete flying game example with a "game" and "common" directory ready to be used.
- 3 different game modes supplied:
- Bot Carnage. Useful for debugging AI. Humans spawn as camera, bots as ships.
- Deathmatch. Classic deathmatch style dogfight game.
- Team Deathmatch inclusive different team skins and team score displays.
- Game-type aware end game screen.
- 2 primary weapons (Blaster, Pulsar) and 2 secondary weapons (MFRL, Sidewinder)
- Player spawns directly as vehicle and not as a player like Kork (so no need to mount a flying vehicle)
- Scout flying vehicle shape with all necessary nodes.
- Repairship flying vehicle shape with all necessary nodes.
- Seperate Scout and Repairship debris shape files provided when the ship blows up.
- Full set of datablocks for the flying vehicle with:
- forward/backward/downward afterburners (booster)
- 2-level damage smoke emitters
- contrails
- ship explosion with debris trails
- Water splash
- Complete source art except the palm tree. Shapes / debris are delivered as Max 7 files, HUD as Photohop PSD files. Please note (and excuse) that the art (except the palm tree) was made by a programmer, not by an artist! ;-)
- Client side HUD with displays for the selected weapons, ammo, afterburner status and ship health as well as a score displays and a radar screen. In team deathmatch mode additional team scores are displayed.
- Homing missile support. The patch for the projectile class allows to have homing missiles called Sidewinder in the demo game. Targets for the missiles can be set via script.
- Further enhancements like auto-explode for the projectile class after a given time is over without having hit something.
- Ability to let explode projectiles by script at any time.
- Direct support for the aiFlyingVehicle and aiRepairshipFlyingVehicle C++ classes from this resource on the GarageGames.com site. Put those files directly into the engine to archive simple AI flying vehicles like shown in the demo.
- An AI state machine purely in TorqueScript to apply some basic behaviour to the AI vehicles featuring:
- "Brains" for the bots. Features a dumb brain and a predator brain.
- Flying to a destination location.
- Randomly flying around.
- Hunt and shoot other flying vehicles.
- Automatic weapon selection with auto-switch over if ammo is empty.
- Automatically search and fly out to re-fill the weapons if they're empty.
- Can have multiple ammo boxes and ship will auto-pickup one of them for re-filling.
- Automatically fly out to pick up health patches if the health of the ship is below 20% or flying to one of the repairships to get healed by the "nano repair bots" the repairships spawn out when flying right behind.
- Auto-usage of the afterburner if target is too far away.
- State machine is easy to extend for your own actions.
- AI Control GUI dialog to have a control over the bots in-game (via CTRL+B). Mainly serves for debugging the bots in the game.
- Mission-area aware ships. Script is set up that ships get damage-over-time as long as they stay out of the mission area. Additionally a bitmap is displayed to human connected players and a warning sound is played back if the player is out of the mission area.
- Demo mission that shows a battle of the bots.
- Pre-compiled Windows and (universal) Mac binary executables to quickly test the complete kit (only need to apply the script changes, not the engine changes).
- 3+1 royalty-free techno-stlye music tracks (complete Decane Music Pack 3 from Decane Music) as 192 kbps Ogg Vorbis files.
- Detailed documentation


Well, I hope you guys like this pack. I put a lot of effort into it and hope to see now some decent flying vehicles in your games! :-)
I should further mention that all future updates to the FGE are free of charge. So if for example bugs are found or I develop new features for it, you will be notified automatically as soon as a new version is available for download. I created a question & answer thread in the TGE private discussions forum if you have any questions.

Finally I would like to thank very much the following people (in an unsorted order):
Thomas "Man of Ice" Lund, Andrew "Ando" McElvenny, Thomas "Alienforce" Alenfors, Tom Vogt, James "Burning" Laker, Thor Zollinger, Matt Webster, Chris "C2" Byars, Stefan Lundmark, Derk Adams, Robert Geiman, Sickhead Games, my wife, the GG community and for sure the guys at GarageGames: James Wiley, Tim Aste, Stephen Zepp & Joshua Dallmann.

Have fun with the FGE and thanks for reading.

Martin :-)

Here is a screenshot medley of the TGEA version of the Flight Game Example:

www.decane.net/images/DecaneGames/FGE/screenshot_fge.jpg
#41
06/22/2007 (8:31 am)
Looks great. Looks like it's got lot of feature I need and will save me time.

When's Subsonic coming out?
#42
06/22/2007 (8:33 am)
Yes, indy license is restricted to making games only. And then "only" up to 250 k$. Over that -> commercial. Other than games -> commercial + OK from GG. It's a bit "tricky" to read that out of the EULA, but if you compare both EULA's you quickly see the difference. I think I'm breathing now the GG EULAs :-)
#43
06/22/2007 (8:34 am)
Oh, and thanks for all the warm comments! :-)

@Andy: Hmm, good question with Subsonic. I mean a lot of stuff is there now that the FGE is out, but I somehow don't get that Subsonic beast completed. Working on that since 2003 and still not finished. Maybe one day... :-)
#44
06/22/2007 (11:59 am)
Here's a new video I made about playing with the AI Control dialog:

Playing with the AI Control (~39.2 MByte)

(Video recorded with the TGE 1.5.2 version of the FGE)
#45
06/22/2007 (1:03 pm)
does the TGEA version have to extract to a special path or something. it is crashing every time I start it.
#46
06/22/2007 (1:27 pm)
No, no special path setup needed. James, what does the console log say? Could you send it to me? To the TGE version work?
#47
06/22/2007 (1:42 pm)
Check u'r mail and yeah TGE version works fine and other TGEA stuff works just not this
#48
06/22/2007 (7:08 pm)
I noticed that the sources are in Photoshop and Max 7. As most indie developers can't afford either, I guess Photoshop can be read with Gimp, but can you export the Max objects to Obj so the texturing and nodes remain intact please?
#49
06/23/2007 (1:29 am)
@Andy: Will try that this weekend. I'm not the biggest Max expert, but will try to see if that works.
#50
06/23/2007 (10:29 am)
I just bought this and can't wait to try it out and see how you made those plane bots fly so well. I tried to make a game like this, but ran into too many issues, which you seem to have solved! I'm looking forward to your write-up!! Congrats Martin. Excellent.
#51
06/23/2007 (2:51 pm)
The FGE owner's page has been launched and offers the current downloads and access to all future updates. Access is granted by a pin code that has been sent right now to all existing owners. New customers get this pin code together with the order confirmation mail from Plimus. Hope that solves the issues some guys had with the short availability of the download links that Plimus offers. Now you have an unlimited download support! :-)
That makes it also easier for me to offer additional downloads like for example .obj exports of the graphics like Andy Hawkins suggested.
#52
06/23/2007 (2:56 pm)
Doh! I forgot the most important thing: I test another e-commerce vendor called Share-it (element5) and they have the same issue with freemail accounts like Plimus has, so it wouldn't bring any benefit to add ShareIt. Instead, I added a direct PayPal support so that one can directly pay through PayPal, but with the drawback that it is a complete manual task to activate then the download for the customer. But I thought it's better than not beeing able to offer the FGE at all to users of freemail services.
#53
06/23/2007 (3:22 pm)
@Andy: I tried to export the source art to .obj files, but they completely loose the material settings and the naming scheme gets lost which is fatal for the Torque exports. So, maybe it's because I'm not a super 3DS Max export, so if anyone knows better, let me know and I put those files into the FGE owners area.
#54
06/23/2007 (5:12 pm)
So I think this is a common issue (converting file formats) so I've started a thread here for people to explain how they get from one format to the other with texture UV's and materials intact.

The Definitive Pipeline Guide
#55
06/24/2007 (1:21 am)
@Martin

I have the same issue as James: TGEA version crash, while TGE work perfectly, maybe I do something wrong ?
And there is a forum where to post such bugs instead to bug spam this blog ?

Ohps... Forgot to comments TGE version:

Vote: 5 Stars
#56
06/24/2007 (1:52 am)
@Gianfranco: I'm now able to reproduce this error. The only machine I did not test it on was the office PC of my wife and there it crashes too. I have a suspicion that it is the verison of the DirectX sdk. I used the very latest DX SDK to compile the TGEA version and and my wife's computer has the "default" DX 9.0c that comes with the Windows update service. Maybe it's that. Will investigate in this on the afternoon.

Yes, there is a forum thread for this located here: Flight Game Example - Q & A.
#57
06/24/2007 (3:40 am)
@Martin - got it!.... Export as DirectX and sell that with the pack. Anyone who wants to port to their own package can import via Blender and export to the version they want.
#58
06/24/2007 (4:00 am)
Super, thanks, will export all source art also as DirectX X-files.
#59
06/24/2007 (9:01 am)
If need me I can convert The assets to another form like .obj or .blend
I have access to the following at work.
Maya 8.5
Max 9
LW 9.2
blender 2.44
#60
06/24/2007 (10:42 am)
Thanks, sounds good. I get back to you if people demand the other file formats. Thx! :-)