Game Development Community

NPC class

by Guy Allard · in Torque Game Engine · 02/15/2008 (8:19 am) · 1 replies

Hi all,

I was wondering what most people are basing their NPC classes on. At the moment I'm using AIPlayers, but these are way too heavyweight for simple NPC's with fairly limited behaviours.

Obviously, the best solution would be the creation a new shapebase derived class for the NPC's - has anyone got any tips on doing this?

Cheers

#1
02/15/2008 (9:00 am)
You can base the subclass off of the Player class, and rip out all the stuff you don't need. One example (given to me by a GG employee whose identity I forget), was to look at the unit class from the RTS pack- though you would need to buy a license of it to do that, but if you do some searching along those lines, you might find some info on what can be stripped out of the player class to get bare-minimum functionality, and they go from there.