Game Development Community

Crowds in TGE

by Santosh Pillai · in Technical Issues · 04/24/2008 (3:16 am) · 2 replies

Has anyone implemented crowds in TGE? If yes then how? And also I wanted to make my characters move on splines. How do I export my spline made in 3ds MAX and use it in TGE? Are there any tutorials for making bots move on splines? Is the concept of splines and markers the same?

#1
04/24/2008 (9:51 am)
Think you want to create a path. In its most basic sense you place a series of "path marker objects" all contained in a simgroup then add the path object to the simgroup. This will create a "spline path". Look up path markers and path objects to get all the details. As for crowds, it's possible but not with a single "make a crowd" button or anything. You could look up "swarms" or something similar to find some more details concerning how that is done. Hope this helps a bit.
#2
04/24/2008 (4:28 pm)
For implementing crowds, look up swarming and flocking. I'll give you a few links to start researching. Most aren't that hard to implement and are just based upon units following others.

Depening on how large you want the crowd to be there are several different options.
One classic one is Boids. You can use the code for movement and advance it for your purpose, such as squads of soldiers for an FPS. Psuedocode

In this white paper about RTS AI DaAnde talks about simple swarms. It's use can be found in Section 4.22, Tactics- Pathfinding, page 15 and the algorithm in the Appendix, section 6.20, page 35.

For much larger crowds, I haven't finished reading this paper (.pdf) but it's pretty interesting, and relevant so far.

If you're a TGE SDK owner you should read this thread.

I hope this helps with your problem about crowds. Oh, also I found this page while getting the links, and thought it was pretty cool, source code is included as a zip. They are a bit glitchy if obstacles are set up in a circular pattern however.

About Splines, well Ron pretty much got that.