i love that in block game i'm agonizing about giving a stick a few more triangles when meanwhile minecraft is over here like "we're going to render dropped items using a 16x16 grid of tiny cubes :)"

i dunno if this has changed but last i checked every item slot in minecraft's GUI was also rendering one of these 3D items except that they're rotated so they look like 2D images and as far as i know there's no caching going on

meanwhile block game just caches 2d images to use as an icon for every item in the game at startup because uhh, hello?? why wouldn't you do that???

before i started block game there were lots of things in minecraft that made me go "that's weird why wouldn't they do it this better way? i guess the microsoft funded multi billion dollar studio must have a good reason for it"

and now that i've been making block game i am starting to strongly suspect they do not, in fact, have a good reason for it

@eniko I think this is a common thing! Developing software at scale necessitates streamlining, and the best way to streamline is to commodify the software process: remove custom code, cleverness, optimisation tricks, etc. and just rely more on brute force / volume when it's even slightly cost effective to do so.

Most for-profit software is unimaginably bad in ways you can only begin to imagine that just wouldn't fly if developed by individuals or in community settings.

@jsbarretto yeah. im pretty sure they just did this so that they have one render path where everything is a 3d model, whether its a 2d item or a block rendered in the inventory. all standardized, no exceptions, no complications in the content pipeline, much easier to avoid bugs when adding new stuff

and that's why my old laptop can't run minecraft anymore

@eniko Would not be surprised at all! I don't want to make too many assumptions about Minecraft's team in particular, but in a modern gamedev house, almost nobody has the sort of 'birds-eye' view and authority to make a decision like "hey, lets spin up an alternative render pipeline to make this one thing slightly faster" because doing so necessitates communication with so many people, and communication is highly expensive.
@eniko You know how an O(K^N) algorithm is fine if N is really small but murders your entire game if it jumps even a little bit? Well, communication between humans has similar algorithmic complexity. It's why small teams of clever people that care about their work will always be the ones to break the ice and do something innovative, clever, or outside established workflows.

@jsbarretto yeah

on the other hand, in block game i've decided that every item is a 3d model, and ergo on startup i just render them once and then cache them as an icon

and i just use the icon to render the item. so it's not like this is *actually* noticably more complex for anyone involved (leaving aside that obviously it's just me atm)

@eniko We do something very similar, although in our case we end up using software rendering to generate the icon: no need to dispatch a thousand tiny GPU events (surprisingly, this overhead does end up mattering soon after startup when nothing is in cache so every frame you're needing to do a tonne of extra irregular work).
@jsbarretto that's very interesting. what do you use for software rendering?

@eniko So... as luck would have it, I ended up writing a software rendering library a few years ago as a weekend learning project. I was already familiar with the API (because I'd built it, ofc), and it was 10x simpler to integrate than actually telling the GPU to do something, so I just threw it in: https://github.com/zesterer/euc

Before that we only had extremely simple top-down icon images, but now we have nice isometric renderings of tools, armour, food, etc. that look much nicer.

GitHub - zesterer/euc: A software rendering crate that lets you write shaders with Rust

A software rendering crate that lets you write shaders with Rust - zesterer/euc

GitHub
@eniko Laziness is a superpower
@eniko Out of interest, how many items do you plan to have in block game? Might change whether your strategy is 'pre-render' or 'cache on the fly'
@jsbarretto dunno, to be honest. probably a lot. we'll see how things shake out, i can always switch later
@eniko I look forward to seeing the updates!
@eniko @jsbarretto even minecraft is < 2k items, which isn't so bad to blast through and render into a big texture. especially if you do it asynchronously with the rest of loading. i think it only starts to get real tricky if you have combinatorial variations.