Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411280 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 06:04:38 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Generative race tracks - any algorithm?
Pages: 1 [2]
Print
Author Topic: Generative race tracks - any algorithm?  (Read 9966 times)
aDFP
Level 0
***



View Profile
« Reply #20 on: February 17, 2011, 09:59:07 AM »

I may do. I'm working on a procedural landscape routine for a city generator at the moment, and I've already thought of half a dozen ways I could use the blob thing.

That's in Unity, so I'll bung you my code if you like.
Logged
Glaiel-Gamer
Guest
« Reply #21 on: February 17, 2011, 02:50:28 PM »

Pick N random points, give each point a random slope vector, and then do a spline through each point?
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #22 on: February 17, 2011, 05:38:41 PM »

We may share code, Now we are using a bunch of free point we extrude using catmull curve. We also define a "cross section" as a series of linked point too.

Since the game is online we don't have hard-coded model tracks, we build it each time procedurally through a definition that take separately every element (material, texture, spline, cross section). It's like HTML but for racing Smiley
Logged

Georgebonbon
TIGBaby
*


View Profile
« Reply #23 on: November 14, 2019, 06:27:31 AM »

I wonder if it is possible to approach this from the point of view of the car?
Generate a course by driving a simulated car  around with random turns in a similar way to a driver (left and right turns for a random number of seconds and braking for a random number of seconds etc) and then generate the track around the path the car took. It must complete 360 degrees. The only problem will be in getting the car to return to the same place at the end of the loop. You could try to back track to the 270 degree point and then make adjustments from there until the car hit the right end of track.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #24 on: November 14, 2019, 08:14:10 PM »

That's a really cool way of solving the problem. Interesting approach Smiley
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #25 on: November 28, 2019, 06:17:09 AM »

A little late to the party but I thought of something, based on that aDFP idea.

Make the island, spread some numbered checkpoints randomly throughout the island, then let players playtest for a while. How many races should they playtest? I don't know, but while the playtesters are racing make a heat map of the cars path and use that to lay down roads.

I've seen this being used to lay down stone paths on gardens lol. First they put the grass, let people walk on it however they like, then put down stone paths where the grass died.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #26 on: November 29, 2019, 07:45:24 PM »

I wonder if it is possible to approach this from the point of view of the car?
Generate a course by driving a simulated car  around with random turns in a similar way to a driver (left and right turns for a random number of seconds and braking for a random number of seconds etc) and then generate the track around the path the car took. It must complete 360 degrees. The only problem will be in getting the car to return to the same place at the end of the loop. You could try to back track to the 270 degree point and then make adjustments from there until the car hit the right end of track.

I just realized this was this posters only post! That's too bad because that was a damn fine first post :D
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic