Post B0babtj8kic6En5Xea by copygirl@fedi.anarchy.moe
 (DIR) More posts by copygirl@fedi.anarchy.moe
 (DIR) Post #B0babtj8kic6En5Xea by copygirl@fedi.anarchy.moe
       2025-11-25T13:27:27.874371Z
       
       0 likes, 0 repeats
       
       I haven’t yet implemented different types of blocks in my bloxel game, but as I was experimenting with hot-reloading block definitions, I realized it only affected newly placed blocks.
       
 (DIR) Post #B0bmHdT0hFrtSweGJ6 by Miaourt@raru.re
       2025-11-25T14:15:39Z
       
       0 likes, 0 repeats
       
       @copygirl you create a new block on gpu and instantiate it ?
       
 (DIR) Post #B0bmHekluhfbSJxxdA by copygirl@fedi.anarchy.moe
       2025-11-25T15:38:13.216673Z
       
       0 likes, 0 repeats
       
       @Miaourt Well, most of the difficult stuff is done by Bevy. When you load an asset you get a Handle<T> while the engine loads the data from disk / network and uploads it to the GPU. It’s ref-counted or so, so once nobody needs it anymore, it gets cleared out. But the procedural material I created stuck around on the old blocks. (The data behind a Handle can be replaced on the fly but it didn’t do that here until I fixed the code.)
       
 (DIR) Post #B0bmcj4n2JgWwbNO9Q by copygirl@fedi.anarchy.moe
       2025-11-25T15:42:05.906264Z
       
       0 likes, 0 repeats
       
       @Miaourt I dunno if Bevy does instancing with entities that have the same mesh+material by default, if that’s what you’re asking.(I’m deliberately keeping things simple until I can get some gameplay working because I’ve done chunk/voxel meshing a couple of times now so I know how to do that, but I want to focus on the other stuff first. It won’t be very fast with hundreds or thousands of blocks at the moment.)
       
 (DIR) Post #B0bnnQJrDMiZuU5Yrg by Miaourt@raru.re
       2025-11-25T15:54:35Z
       
       1 likes, 0 repeats
       
       @copygirl ah wasn't clear, I wanted to find a reason on why it only affected new placed blocks, maybe the hotreload was registering a new block with the new color and only spawned it, thus why only the new ones had the new datas :blobcatEyesPout:
       
 (DIR) Post #B0bnnXSGgUba2b4sRk by Miaourt@raru.re
       2025-11-25T15:55:04Z
       
       0 likes, 0 repeats
       
       @copygirl (tunneler momento eheh)