Noodleguitar
Admin
I recently got the crazy idea that it would be fun to try to create a 2D racing simulator and, because I'm crazy, that's exactly what I've started working on.
I made a general plan of how it should roughly turn out to look and work. My main idea is that the car should be controlled with a game pad (or a wheel) because I'm hoping to achieve at least somewhat decent physics.
I'm not sure if I will ever finish it and how much time I can invest in it, but I'll see how far I get.
The first step that I wanted to take was to create some simple tracks. Because I'm both shit at artwork and lazy I decided to go with procedural generation for tracks, which is what the following video shows (the early steps of it).
[video=youtube;p2Ez23q3GgQ]https://www.youtube.com/watch?v=p2Ez23q3GgQ[/video]
I generate some random points which I order based on the clockwise rotation and distance from the center of the screen. Then I move the points about a bit so that they're not too close together and that the angle between two points is not too small. Despite this there are still intersections sometimes and corners that are too tight, but I think I know a way to detect these.
The smoothing is done with a Catmull-Rom algorithm.
The next step would be to create a road surface with a certain width around the outline, which will be then be scaled up to provide the view while driving.
I made a general plan of how it should roughly turn out to look and work. My main idea is that the car should be controlled with a game pad (or a wheel) because I'm hoping to achieve at least somewhat decent physics.
I'm not sure if I will ever finish it and how much time I can invest in it, but I'll see how far I get.
The first step that I wanted to take was to create some simple tracks. Because I'm both shit at artwork and lazy I decided to go with procedural generation for tracks, which is what the following video shows (the early steps of it).
[video=youtube;p2Ez23q3GgQ]https://www.youtube.com/watch?v=p2Ez23q3GgQ[/video]
I generate some random points which I order based on the clockwise rotation and distance from the center of the screen. Then I move the points about a bit so that they're not too close together and that the angle between two points is not too small. Despite this there are still intersections sometimes and corners that are too tight, but I think I know a way to detect these.
The smoothing is done with a Catmull-Rom algorithm.
The next step would be to create a road surface with a certain width around the outline, which will be then be scaled up to provide the view while driving.