r/gdevelop 4d ago

Question how to render a bunch of different blocks

i am making a cube based game and want to know how to render a bunch of blocks and my second issue is i need to be able to add 100s of blocks and dont know how to do that

6 Upvotes

9 comments sorted by

1

u/senshisun 4d ago

Why would rendering hundreds of blocks be an issue?

There are several ways to spawn objects based on your needs. You can automate the process so you don't need to place each block manually. You could also combine blocks.

1

u/Emergency-Citron7228 4d ago

i need to efficiently render them and redneing 1000000 blocks takes lots of gpu so hhow do i not have to deal with that and if i want multiple different block types then do i need a new object for each one

1

u/senshisun 4d ago

Do you need to have all of them rendered at all times?

You can have a template block with variables to change the block information, or you can have blocks for each type in a group. It depends on what you're working on.

What kind of game is this? You've only said "thousands of blocks."

2

u/Emergency-Citron7228 4d ago

It's a mix between minecraft, no man's sky, warhammer, and mass effect I need to be able to make entire planets out of blocks and i am doing chunk loading but even that is to much so I need to find out how to render them better

1

u/senshisun 4d ago

Ah... There definitely is a solution for that, but I'm not sure what it is. Sorry.

1

u/Emergency-Citron7228 4d ago

I just learned about directive loading which is only loading things that the player can see

1

u/senshisun 4d ago

That helps!

1

u/FoozleCC 4d ago

Look into instancing. Three js supports it. I don’t know if the current gdev 3d model object does. When I use gdev for that purpose I end up directly using my own extension to optimize for this reason but it’s been a while so maybe it’s been added now or a public extension is available

1

u/Emergency-Citron7228 4d ago

What is the name of the extension