Slastraf Posted April 14, 2021 Posted April 14, 2021 View this video Description See utube desc for more. 2 Quote
Rick Posted April 14, 2021 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
Slastraf Posted April 14, 2021 Author 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
Rick Posted April 14, 2021 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
Slastraf Posted April 14, 2021 Author 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
Slastraf Posted April 15, 2021 Author Posted April 15, 2021 I have uploaded a version in the downloads tab. 1 Quote
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.