Slastraf Posted April 14, 2021 Share Posted April 14, 2021 View this video Description See utube desc for more. 2 Quote Link to comment Share on other sites More sharing options...
Rick Posted April 14, 2021 Share Posted April 14, 2021 Very nice. Are you able or willing to share the code for this? I always wanted something like this but couldn't get it to work. I want to store the data as it's being made in sqlite db so it's persistent. Quote Link to comment Share on other sites More sharing options...
Slastraf Posted April 14, 2021 Author Share Posted April 14, 2021 Yes I can share it, but with the seed you don't need to store it in a db because it will generate the same output every time. I will put it on in a bit. I want to add texture generation and make it more readable / stable. Its missing physics and textures basically. The player is moved by raycasts. Quote Link to comment Share on other sites More sharing options...
Rick Posted April 14, 2021 Share Posted April 14, 2021 2 minutes ago, Slastraf said: Yes I can share it, but with the seed you don't need to store it in a db because it will generate the same output every time. I will put it on in a bit. I want to add texture generation and make it more readable / stable. Its missing physics and textures basically. The player is moved by raycasts. Can you elaborate on the same output every time? Is each terrain tile the same? If not how would very terrain tile always be the same between runs if you can have infinite amount of them? Quote Link to comment Share on other sites More sharing options...
Slastraf Posted April 14, 2021 Author Share Posted April 14, 2021 1 minute ago, Rick said: Can you elaborate on the same output every time? Is each terrain tile the same? If not how would very terrain tile always be the same between runs if you can have infinite amount of them? All random number generators only produce pseudo random numbers and you can use it to your advantage because if you initialize it with a seed like "123" it will always generate the same infinite numbers for that seed. For the terrain height generation I use perlin noise which is like a controlled 2d fractal / noise. I used a cpp library for perlin noise as a height map to set the vertices height of the tiles. It can never be the same if the seed is always different for each new playtrough. But if you you use the same seed you can have the exact same world as someone else. Quote Link to comment Share on other sites More sharing options...
Rick Posted April 14, 2021 Share Posted April 14, 2021 Cool, I'm excited to try it out! Quote Link to comment Share on other sites More sharing options...
Slastraf Posted April 15, 2021 Author Share Posted April 15, 2021 I have uploaded a version in the downloads tab. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.