Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the world #625

Open
JekSun97 opened this issue Apr 16, 2024 · 4 comments
Open

Save the world #625

JekSun97 opened this issue Apr 16, 2024 · 4 comments
Labels

Comments

@JekSun97
Copy link

I'm writing a game where you can move from one planet to another, but the movement occurs instantly, since there are no functions for generating planets in a spherical shape.
How can I save the generated world with all the buildings and changes, I’m new to Godot 3D functions, but not 2D, how can I save the world so that when I return to the planet everything will be the same?

@Zylann
Copy link
Owner

Zylann commented Apr 16, 2024

there are no functions for generating planets in a spherical shape.

This demo was made with this module: https://www.youtube.com/watch?v=uzjHcIbDXJQ
Generators can fill voxel chunks they are given in any way they like, including the use of a spherical SDF shape. Now obviously that might not work well for cubic voxels, but smooth voxels can handle that just fine (though that's still a non-negligible amount of work to get something like this going). If you are using cubic, then yeah, there is no magic to somehow project them spherically.

How can I save the generated world with all the buildings and changes

You attach a stream resource to the terrain and it will save asynchronously: https://voxel-tools.readthedocs.io/en/latest/streams/

I’m new to Godot 3D functions

Note that this module is a lot more complex than the average Godot 3D functions, so if you're new to Godot or even programming you might want to get some more experience before diving into it. Asynchronous processing, streaming and threads are involved.

@JekSun97
Copy link
Author

JekSun97 commented Apr 16, 2024

@Zylann Thanks for the information, no, I’m not new to programming, I have a good 2D/3D engine written in C++ and OpenGL 3+, but I haven’t studied Godot’s 3D functions yet, I only started thanks to your plugin :)

My world is cubic, but if I manage to do something, I will definitely share, you may have to use a matrix with shaders.

@JekSun97
Copy link
Author

And as for the demonstration of a spherical planet, it’s just super!

We need at least a similar example of such capabilities, this will open up a full-fledged new genre of games for such an engine as the Godot Engine!

@Zylann
Copy link
Owner

Zylann commented Apr 19, 2024

There is already an issue open for navigation: #610 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants