News for hackers. Stuff that matters.
Re:CityBound – An open source city simulation game in Rust by pault on Friday April 05, 2019 @02:07PM (#19585382)
Can you talk about the road building engine? Are you using splines to generate the smooth curves? This is a really amazing project, I can tell you have put a ton of work into it.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @02:48PM (#19585784)
There's a lot of interesting stuff going on in there. First, for the curves itself, it does a kind of naive approximation optimisation and builds a curve out of line and arc segments that tries to follow the control points as closely as possible. Then it does an intersection step between all roads and procedurally generates correct connections between all incoming and outgoing lanes of each intersection, including (somewhat) reasonable traffic light timings for each "turn group"