Lightcycle Trails
by Michael Smith · in Torque 2D Beginner · 09/05/2014 (3:45 am) · 1 replies
I am toying with the idea of a lightcycle game and want opinions about how to implement the trails.
I figure to place a trail of either rectangular or line segment collision objects behind the cycle. I would use sprites that are a few meters long in engine terms so the trail would conceptually be like a series of dashes, ---------. My question is whether to generate the trail pieces on the fly or to create a huge pile of them ahead of time.
I know that for a turret it is recommended to create the ammo ahead and deactivate it when not in play. I can do the same for the walls but it could take thousands of sprites to do trails for several players zooming around.
If I had, say, ten thousand wall sprites piled in a corner somewhere would that be a problem for the engine? Or a worse problem than creating sprites on the fly?
I figure to place a trail of either rectangular or line segment collision objects behind the cycle. I would use sprites that are a few meters long in engine terms so the trail would conceptually be like a series of dashes, ---------. My question is whether to generate the trail pieces on the fly or to create a huge pile of them ahead of time.
I know that for a turret it is recommended to create the ammo ahead and deactivate it when not in play. I can do the same for the walls but it could take thousands of sprites to do trails for several players zooming around.
If I had, say, ten thousand wall sprites piled in a corner somewhere would that be a problem for the engine? Or a worse problem than creating sprites on the fly?
About the author
Bible translator by day-- game programmer by night
Torque Owner Richard Ranft
Roostertail Games
Some experimentation should show where the bottlenecks are, then optimize to taste.