You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? To move roughly 4000 visible bullets at once, without the server exploding.
-
What solutions have you tried so far? I’ve experimented with for loops, while loops, and tween service to handle bullet movement. I haven’t ran into a problem yet, but I’ve never really tested it above 10 bullets.
Before you even think “raycasting”, I’m not talking about gun bullets, I’m talking about bullets like in bullet-hell games, where they are visible, and look all sortsa ways. Or arrows, cannon balls etc etc, basically things that shouldn’t be done with raycasting.
Some things that I’ve thought of are:
-handle the bullet model on the clients side, having only one little cube on the server’s side to be the bullet.
-teleporting players to sub-places so there wouldn’t be as many bullets at once in a server, making boss fights etc much smoother.
Think of this post as a discussion rather than me having a problem, I believe discussing this could be useful for many developers, in present, and in the future as well.
The reason I’m even making a discussion, is because I’ve tested part-count lag alone, although on my old PC, and even 5000 anchored cubes were a problem.
So I just can’t really imagine 1000 parts moving, without extremely massive amounts of lag taking place.
It’s also a good question to answer, wether all bullets should have their separate thread (yes yes i know lua or roblox lua is single threaded, I’m of course talking about spawn() and coroutines), or be on the same thread.
To make it clear absolutely clear, I’m not asking for someone to make me some ultra super bullet system for free, but again, a discussion about handling large amounts of bullets that can’t be replaced by raycasting.
Another thing I thought of, is to have a single-sided triangle-plane instead of a cube as the server-sided bullet, that way it would have the bare minimum amount of tris (being 1).
But I mainly think that the problem will be with the movement of the bullets, especially when its not simply just moving forward, but using sine waves etc to move in a wavy pattern, or all sortsa crazy patterns, like wavy for 6 seconds, but then backwards straight for 4 seconds etc.
I’m not really sure if this is the right place to post it, but I do honestly think that this is a better place to do so than Development Discussion, may be wrong, can’t know.