I want to make a game that is kind of like an endless runner (actually more of a procedurally generated race), except, you won't be running, you'll be flying through pipes/tubes and stuff. So my question is: How? The way I'm thinking is that I:
So does this look good? Is using the Touched event the best way to detect when players are not in a section? Because I hear things like RayCasting and Region3 thrown around so I'm not sure.
tl;dr The main concept or game loop behind endless runners/procedurally generated tracks
You can do something like this
local sections = 0 local maxsection = 8 --Amount of sections until end while sections < maxsection do --Randomly spawned tube code here sections = sections + 1 if sections == maxsection then break end end
That can start it off, then just use math.random() to either pick a random position to spawn a tube, or to spawn a random cloned tube from your game.
(This probably might not help, you might already know this :( )