Previous Blog Next Blog
Prev/Next Blog
by date

Super simple script based name generator + Air Ace bomber

Super simple script based name generator + Air Ace bomber
Name:Thomas \"Man of Ice\" Lund
Date Posted:Jan 22, 2007
Rating:4.5 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Thomas \"Man of Ice\" Lund

Blog post
I wrote this yesterday as I was in need of AI pilot names for our game Air Ace Online www.airaceonline.com

Its so super simple that it hurts, but works fine for my usage. So why not share it with you.

The basis is to use a list of first names and combine randomly with a list of surnames.

For Air Ace in version 1 we have British and German pilots, so I fetched a little list of those.

To get some good names I went to
en.wikipedia.org/wiki/Surnames
and
en.wikipedia.org/wiki/First_name

In the bottom they have lists for common names for various countries.

Then I fixed this little code snippet and thats it. Enjoy!


// Random Name Generator
// Made by Thomas Lund
//
// Creates a random name from name lists
// per team/country

function NameGenerator::getRandomTeamName(%team)
{
return NameGenerator::getFirstName(%team) SPC NameGenerator::getSurName(%team);
}

$NameDB::UK_first = "James Benjamin Joshua Ryan John Patrick Samuel William Jack Thomas Daniel Matthew Jacob Ethan Ronald Michael Richard Jonathan Joseph Oliver Harry Charlie Sean Jack Conor Adam James Daniel Luke Michael Aaron Jack Matthew Adam James Ryan Joshua Conor Ben Daniel Dylan Lewis Jack Callum James Ryan Cameron Kyle Jamie Daniel Matthew Peter";
$NameDB::GE_first = "Alexander Maximilian Leon Lukas Lucas Luca Paul Jonas Felix Tim David Jens Joachim Johan Heinrich Hugo Hubert Xaver Wilmar Wolfgang Waldmar Uwe Udo Ulrich Theo Thorsten Sven Sigfried Rubens Rudi Niklas Otto Max Manfred Leopold Guido Gunther Friedrich Fritz Frank Frans Eckard Erich Diedrich Dietrich Diether Bernard Bodo Aldo Arnold August Arne";

function NameGenerator::getFirstName(%team)
{
if (%team $= "UK") {
%index = getRandom(0, getWordCount($NameDB::UK_first)-1);
return getWord($NameDB::UK_first, %index);

} else if (%team $= "GE") {
%index = getRandom(0, getWordCount($NameDB::GE_first)-1);
return getWord($NameDB::GE_first, %index);

} else {
error("Get first name - unknown team " @ %team);
return "Unknown";
}
}

$NameDB::UK_sur = "Anderson Brown Byrne Campbell Clark Davies Doyle Edwards Evans Gallagher Green Hall Harris Hughes Jackson Johnson Jones Kelly Kennedy Lewis Lynch Macdonald Martin McCarthy Mitchell Moore Morison Morris Murphy Murray O'Brien O'Connor O'Doherty O'Neill O'Reilly O'Sullivan Patel Paterson Quinn Reid Roberts Ross Ryan Scott Smith Stewart Taylor Thomas Thomson Walker Walsh Watson White Williams Wilson Wright Young";
$NameDB::GE_sur = "Altenstein Altmann Bach Becker Berger Brand Denke Dunkel Eisner Engels Feuerbach Fischer Fuchs Geissler Grass Hahn Hankel Heilmann Hoffmann Huber Hueber Jost Kirchner Klein Krause List Lorenz Mann Meyer Moltke Mueller Obenauer Reich Reuter Sachs Schanze Schindler Schmidt Schneider Schulze Simmel Sommer Spitz Thiele Volkmann Wagner Weber";
function NameGenerator::getSurName(%team)
{
if (%team $= "UK") {
%index = getRandom(0, getWordCount($NameDB::UK_sur)-1);
return getWord($NameDB::UK_sur, %index);

} else if (%team $= "GE") {
%index = getRandom(0, getWordCount($NameDB::GE_sur)-1);
return getWord($NameDB::GE_sur, %index);

} else {
error("Get first name - unknown team " @ %team);
return "Unknown";
}
}



Edit - damn. Almost forgot rule #1. No blog without images.

So hopefully Phil didnt post this one yet.

We recently got this baby into the engine - B17. First a render shot, and then a shot from ingame (glass material still being worked upon)






Edit 2

Ahh what the hell. Here is a little movie I made yesterday too. The first shot at the bomber AI controlled:

airaceonline.arcadersplanet.com/movies/AIBomberTest1.wmv

I was going to save that one for a different blog, but in the end I dont have much time currently. So feel free to read more about the AI here:

www.airacepilots.com/viewtopic.php?t=244

Recent Blog Posts
List:01/22/07 - Super simple script based name generator + Air Ace bomber
09/28/06 - Air Ace ready for alpha testing
09/05/06 - Adventures under a blood red sky (clouds)
06/17/06 - Air Ace Update Server + Launcher
03/26/06 - Air Ace Clouds!
03/05/06 - "I'll be back" and here I am - Air Ace update too!
12/17/05 - Going down....
07/23/05 - Been offline - status

Submit ResourceSubmit your own resources!

Vashner   (Jan 22, 2007 at 23:10 GMT)   Resource Rating: 5
Awesome. BTW the glass, you should be able to just make it transparent with a shader material no?

Frank Carney   (Jan 23, 2007 at 00:13 GMT)
Very cool video. Are you going to have the bomber break up instead of just puffing out of existence?

Tom Eastman (Eastbeast314)   (Jan 23, 2007 at 00:13 GMT)
Sweet stuff!

Tom Bentz   (Jan 23, 2007 at 00:56 GMT)
Looking awesome! Cant wait to play it!

Phil Carlisle   (Jan 23, 2007 at 01:08 GMT)
Frank: yeah, the bomber shape debris isnt defined yet.. of course it'll have damage smoke trails too, but we didnt put that in yet..

James Laker (BurNinG)   (Jan 23, 2007 at 05:27 GMT)
Oh my wooord.... it's so pretty!
Awesome work guys!

EDIT: Hope you guys (1. or GG) are planning on adding Antialiasing later (1. to TSE)
EDIT: Reading your forums, I notice you do talk about Antialiasing not working everywhere.
Edited on Jan 23, 2007 05:56 GMT

Thomas \"Man of Ice\" Lund   (Jan 23, 2007 at 07:13 GMT)
Thanks guys. Was originally going to post this as a resource, but couldnt find a way to do that anymore. Seems to be disabled, or hidden away. *shrugs* So thats why it suddenly turned into a semi-blog

@Vashner - yes. We do have glass on the canopy of the spitfire, so it should be possible. Having some trouble with the environment mappings though. Solvable - once Phil does it ;-) *poke* *poke*

@Frank - as Phil says, yeah. We want to have nice large explosions when you hit the planes. Possibly with debris falling off. And once you kill it, we need a real debris shape. Just hasnt happened yet.

@James - no AA support yet. I spend an hour or so trying to force my AA settings onto TGEA, but it just totally ignored my nvidia settings. The bomber image is also taken on Phils sucky machine in 800x600 ;-) On a real machine (*pokes Phil even harder*) it looks much better with the texture too.

(Phil has already ordered a new machine to take better screenshots. So you will have to excuse him, hehehehe)

Alan H   (Jan 23, 2007 at 16:51 GMT)
Man this is looking so good. I can't wait to play and shoot down those pretty bombers. heh heh heh.

Vashner   (Jan 23, 2007 at 22:35 GMT)   Resource Rating: 5
Let me bend your ear on this question. Not too off topic. On aircraft models, are any protected IP property? Like F35 etc. Can you model them and use them in a game royalty free?

I figure the older aircraft models are not an issue. I was thinking about doing some F35, F16 block 50, 60's, Mig 27 etc.


Kevin Dahlhausen   (Sep 20, 2008 at 16:17 GMT)
Your game looks great, but both sites listed are down. What's the story?

You must be a member and be logged in to either append comments or rate this resource.