First off, apologies if this is the wrong category, felt like this was the appropriate place given it’s a game mechanic.
Anyway, I am working on an obby game that contains a progress system. Problem is that I am not sure how i would go about creating this progress system. I was thinking I could make a physical path, each adding x amount to a progress bar using .Touched event, then adding that player to a table specific to that part, however this contains a lot of instances and I’m worried about performance. What would you recommend?
Ok, what you could do is have a part at each bend/turn and then continuously measure the distance between the player’s character and the part, after the player passes the part (could be checked with a .Touched and placing the instance in a dictionary/array so that it is only passed once) it looks for the next part and displays the previous path length + the current length. To convert this to progress you would need to add all the distances between the parts together, so if part A is 10 studs away from part B and part C is 15 studs away from part B, the total length would be 25 studs.
You would then do the previous path length+the current length / total length of path
The issue is that the players’ progress is going to be shown on their screen, and if I only had turns at every part, it would be a bit choppy. Also, if the player misses a part, the next part won’t be able to register the .Touched event, which can also be an issue. I could try using Region3 but once again, that leaves me worried about performance.
You could make the parts at a 5 or 10 stud interval or as long/short as you like, the parts also would need to span the entire length of where the player can walk in that area