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

Using a resource for block faces #1

Open
OneginIII opened this issue Nov 3, 2022 · 2 comments
Open

Using a resource for block faces #1

OneginIII opened this issue Nov 3, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@OneginIII
Copy link
Contributor

My idea is that instead of having the direction_face values directly on the node, the data would be stored in a resource instead. This resource could then be swapped out to update the look of the block, and could be copied over to other blocks too. The node could even contain an array of style resources that could be changed in code. The resource could also contain the material, texture and texture size to be used, acting as a sort of a "theme" for the block.

Pros:

  • Quickly and easily toggle between styles, instead of changing 6 separate values.
  • Copy styles from one block to another. Good for level editing too.
  • Could be saved to disk, acting as materials to be used by the blocks.

Cons:

  • Complicates block data structure.
  • Juggling a bunch of resources around can be cumbersome.
@OneginIII OneginIII added the enhancement New feature or request label Nov 3, 2022
@dcrawl
Copy link

dcrawl commented Mar 4, 2023

How about having a second level block that extends the first one to add in these features? With the idea of being able to customize the textures, what about being able to customize the mesh by applying resources? The block would probably have to assume that the mesh is the correct size and its center point is defined properly in the model and then just rotate it into place. It would allow you to create wall buttons, torches and so on.

@OneginIII
Copy link
Contributor Author

Working on more features for the plugin is probably on hold until the plugin is ported for Godot 4 at some point. Making a separate advanced version of the node seems like something I might look into too. I would want to maintain at least the option of a simple data structure for the block.

As for the custom model suggestion. It would complicate things quite a bit. The models would have to have a specific UV layout, which would need to be modified for the mapping of different textures to work. Right now the block node just generates simple square UV's to be used for the blocks faces. I feel like using custom meshes would work better by just creating your own nodes for buttons, doors and other objects mixed in with level blocks. This way you could easily add in more complex behaviors, like animations and interacting. Other option would be to use some kind of voxel plugin for Godot.

I unfortunately don't have time to work on this plugin more right now. Thanks for your suggestions anyway!

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

No branches or pull requests

2 participants