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

Sub-blocks / Micro-blocks #72

Open
tlf30 opened this issue Apr 25, 2023 · 3 comments
Open

Sub-blocks / Micro-blocks #72

tlf30 opened this issue Apr 25, 2023 · 3 comments

Comments

@tlf30
Copy link

tlf30 commented Apr 25, 2023

Hello,
Would it be possible to add micro-blocks, where a single block is made of other smaller blocks?

Thanks,
Trevor

@rvandoosselaer
Copy link
Owner

rvandoosselaer commented Apr 27, 2023

Hi Trevor,

I guess this would be possible. I need to think a bit how I would go about implementing this. Could you give an example how you would use this in a game scenario?
If you are looking to add a block breaking effect for example, I would use particles instead of actual 3D objects.

At the moment my full focus is on releasing Blocks 2.0, that will be a major overhaul of the current library. A lot is explained in this comment: #69 (comment)
Most of the open issues are also included in this version.

@tlf30
Copy link
Author

tlf30 commented Apr 27, 2023

I am planning to build an engineering type game, and would like the functionality of having things like cable and piping trays, where the user places the tray block, and then can place the pipes and cables in the tray bock. Also things like control cabinet blocks where the user will place things like relays, PLCs, and terminal blocks.

I was thinking each block that supported sub-blocks would define its own sub-grid size, and would probably need to be stored as its own chunk. This would enable the ability to have a block with, say, 8 sub-blocks, and another with say 64 sub-blocks.

@rvandoosselaer
Copy link
Owner

rvandoosselaer commented Apr 27, 2023

Thanks for the clarification. I'll need to think a bit about how to best approach this.

You could also think of a block as already a 'micro-block'. When your user places a normal block, he/she is actual placing a bigger block, containing for example 125 'micro-blocks' (5x5x5). You can add multiple blocks at once and only one render call will be made to update the chunk.

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

No branches or pull requests

2 participants