Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How i can i reduce the lag on a game that has a lot of bricks?

Asked by
NexeusX 137
7 years ago
Edited 7 years ago

I have a game where the map in generated by a script, it has a lot of bricks though. It is very laggy when i run it, to the point where i can't use tools/weapons. Ive seen plenty of other games that have tons of bricks, yet they run smoothly. For example the Quarry, it somehow generates maybe over a thousand bricks for mining and yet the lag does not seem to affect it very bad.

0
How many bricks are we talking here? Perci1 4988 — 7y
0
That is not how the quarry works, it simply generates points randomly. These points will only become visible when the player reached the depth meaning that part are made when they are needed. User#5423 17 — 7y
1
StreamingEnabled, if you don't know what it does, look it up. Scripting-wise, make sure you cut down on the loops, building wise, cut down on the quality and/or don't build in areas where the player isn't going to see anything. Async_io 908 — 7y
0
The Quarry only generates the top layer, and as a player mines, it generates bricks around it. Vrakos 109 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

Occlusion

If they can't see it, don't generate it. There's simply no point in making things which may even never get interacted with by the player. It keeps the RAM free, it makes sure that there's less for the GPU to worry about when rendering and working with its own occlusion (Note: Roblox occlusion is bad), and it frees up the CPU at the initial generation by reducing how much stuff is being done ahead of time by moving stuff to the run-time.

Ad

Answer this question