top of page

DevBlog 9: On The Rails

Week 2 of keeping up with #screenshotsaturday ! No too much development this week, largely just placing of and testing new level assets. Notably bringing in visible rail components and telephone/power posts/poles. Faye is now clearly grinding on rails and not just a row of capsules!

Presently the way this is achieved is by arranging the pieces of rail in the level, then tracing this path using a spline. The spline then creates meshless transforms to be lerped to. This system works. That needs to be said. However, it could deffinitely be more efficient. It would be preferable to have the objects instantiated be the rail components themselves. This method of laying out each individual piece of rail and then tracing is simply too time consuming.

Presently, the bezier spline is starts of with a start point, and end point, and two handle points for controlling the curvature. The spline could then be extended by a new point and two new handle points. This process is repeated to get the result as depicted above. Each addition then being a new "curve" on the spline. It is notable however, that our rail instantiator, or spline decorator, only adds X many objects per curve. This is to say that even if you can shape a single curve to cover a long area, it should be broken up to allow for more points. As these points are what are understood to move towards, it's important to have enough to giive the illusion of really following the curve. The Ideal system then, would be one that creates a rail post at each curves start point, letting you then control the curve between each rail post, and then rendering the bezier itself with a line renderer that is effected by light. The level builder (in this case myself) would then be able to lay out the rails to be instantiated using the rail posts themselves as markers, and get to shape the rail itself ergonomically. With any luck, this will be my focus for the coming week and the result will be as described.


bottom of page