Most effiecient way to simulate bullets

I am making a tower defense type of a game. For the game I made a turret(tower) by using the module Fast Cast to simulate the bullets shot out by a sentry. Once there is thirty or more sentry’s, the bullets seem to not be smooth and briefly pause, though thanks to fast cast, gets to it’s destination on time. I want at least 100 sentrys to be placed down, each shooting an average of 5 bullets a second.
I am looking for ways to simulate a bullet being shot through air, that is not just making an part and updating it. I noticed that Tower Defense Simulator seems to use beams to simulate bullets, though I would like feedback is that faster, or there any other methods?

Would they be using a ParticleEmitter and just using ParticleEmitter.Emit to show the bullet?
This way the Particle would be aimed toward the target, but if the player rotated it wouldn’t rotate with them.

TDS uses basic raycasting for fast towers like snipers or shooters, Fastcast for mortars/projectiles, and I assume RaycastHitbox for melee towers.

Most likely, what you’re doing wrong is you’re simulating the bullet model itself on the server. Don’t do that. You can do the bullet that does damage on the server, since TDS games are ultimately server-authoritative.

The one that does damage shouldn’t have a cosmetic bullet object. Instead, fire all clients when you fire the damaging bullet with the servers Fastcast info, then on the CLIENT you will do the cosmetics. Most likely, your issue is caused by server lag, from moving a PART hundreds of times really fast on the server. By moving the PART itself to the client (part does no damage), you remove that server lag.

Also, suphi kaner made a really nice video on TDS games, SEVEN hours long, covers everything you need to know, gives nice methods

1 Like

I look into it
Characters limit

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.