Comment on I am working on a turn-based wargame, influenced by the old Win3.x era WinWar 2 game
electric@lemmy.world 18 hours ago
Not my cup of tea but pretty cool. And nice thinking with using SVGs for scaling.
Comment on I am working on a turn-based wargame, influenced by the old Win3.x era WinWar 2 game
electric@lemmy.world 18 hours ago
Not my cup of tea but pretty cool. And nice thinking with using SVGs for scaling.
Lembot_0004@discuss.online 18 hours ago
Just some fun information: most modern engines hate SVG. They just render them to the raster and then manipulate them like any other bitmap, making everything extremely slow and blurry. If that is mostly ok with small pictogram-tier images, it is completely unacceptable for big map-tier images. My map is tens thousand of pixels in size while at the lowest scale. Bitmap would be a few TiB of RAM. So I actually parse the SVG to get the vectors and draw them, omitting the rasterization.
afaix@lemmy.world 6 hours ago
So are you basically making a more modern flash game? I think all flash graphics were vector and that gave them a really cool look
JustARaccoon@lemmy.world 15 hours ago
Does that lead to any performance hiccups with very detailed svgs? The benefit of raster is you can mipmap them, so you don’t need to see how super detailed the coast of a country is like when it’s only a few pixels on screen. I suppose you could fake mipmaps by having different levels of detail for svgs that get swapped between, as long as any other changes you make to the svg are simple colour changes?
Lembot_0004@discuss.online 14 hours ago
It might. But I can’t imagine how detailed should SVG be to be more problematic than bitmap during rescale.
JustARaccoon@lemmy.world 13 hours ago
Well, say, country-size :D