logoalt Hacker News

katzenq • today at 5:01 PM • 2 replies • view on HN

Do they really load so many spirites into memory it's heavier than 3D?


Replies

Sohcahtoa82 • today at 5:27 PM

There are assumptions being made about texture resolution.

The high quality sprites are 64 pixels across per tile. With each tile being 1 meter, 1 pixel is 1.56 cm (About 0.63 inches) across. By today's standards, that's a very low texture resolution, though they can get away with it when your camera is so far away.

But if the game was 3D, you could expect players to put the camera closer to your objects. You'd need significantly higher texture resolutions. And you'd need a texture for each part of the object.

Meanwhile, consider a 3x3 object. That's 192x192 = 36,864 pixels. Assume it has a 60 fps, 2-second animation loop. That's 4,423,680 pixels. With 8 bytes per channel and 4 channels (RGBA), that's about 17.7 MB, which allows you to store 56 objects per GB.

Which doesn't sound like a lot, but we're making some huge assumptions. Not all objects are 3x3 tiles. Most don't have 120 frames of animation.

And as I mentioned in another comment, you don't need to store ALL the game's art in VRAM at once. Only what's on the screen. And you can certainly fit an entire screen's worth of animations in a 2 GB GPU.

➕ show 1 reply
mitxela • today at 5:30 PM

Yes. Several GB. I had to enable half resolution to play modded Space Age.

➕ show 1 reply