#How would i go about instancing blocks upon them being revieled, similar to minecraft?

1 messages · Page 1 of 1 (latest)

young hawk
#

in minecraft, blocks are only visible if one of their faces are visible, i.e. blocks are not rendered unless it is required that they are rendered. I want to make a game which has a similar dig mechanics to the game "Treasure Hunt Simulator" on roblox, but my only idea on how to do this sort of optimization would be to clone the block that was mined, and set the position of the exposed block(s) to where they should be, but how would i go about checking if there is a block on the SIDES of the mined block already?

I hope my phrasing was not too confusing

severe grove
#

Maybe

young hawk
#

this server sucks as brah sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k sob2k

woeful valveBOT
#

studio** You are now Level 4! **studio

young hawk
#

😭😭😭😭😭😭😭😭😭😭😭😭

lyric kite
#

optimize what?

#

you don't have a game yet

lyric kite
#

for all you know, you're optimizing a problem that may never actually end up being a problem

#

meaning this is just a massive waste of time and effort on your part and anyone elses who tries to "help" you with this thing you don't need.

young hawk
#

this is so embarrassing for you bro just delete this 😭

#

but anyways

#

i already have the game

#

the game is about mining deep into a cave, breaking the blocks that are in the way.

#

i think its incredibly obvious that rendering Thousands and thousands of blocks is a complete waste of computing power, so it'd be more resource-efficient to only render/instance the blocks that are visible and accessible

#

i already solved it myself either way

whole pagoda
#

you can use ray tracing for the camera

lyric kite
# young hawk i already have the game

oh you'd be surprised how often people ask about optimizing something before they have made their first working proof-of-concept prototype, how you phrased suggest to me you hadn't started yet. Still, by the time you're actually able to make a working proof-of-concept prototype of something like this, you no doubt would have already figured out the means and methods of spawning interactable parts in a grid, it's just a matter of fetching the neighbors and generating the newly visible parts in your case i think, fairly trivial with a functional and reasonably modular grid-block system, it just takes a while to make

lyric kite
lyric kite
lyric kite
young hawk
#

either hilarious ragebait or you have autism lol

lyric kite
lyric kite
young hawk
#

honestly most hilarious discussion ive ever gotten out of a question