Simple Light Client #334
Replies: 8 comments 6 replies
-
Hmm. Not really sure I'm all that interested in making the game that ugly, lol. And I don't know that a single error texture would work. For example, if the skybox and the planets used the same default texture, e.g. a black square, the planets would be invisible. If the skybox used a white square, then the sky would look awful. Partially transparent textures are another case that would look awful with default textures (nebulas, thruster exhaust, laser beams, torpedoes, planetary rings, explosion-sparks, lens flare, etc.) There are old videos before I used opengl... back when the game was kind of a 2D game that happened to have a 3D renderer... https://www.youtube.com/watch?v=KcEbCyKU0Qs Not sure I want to go back to that look. |
Beta Was this translation helpful? Give feedback.
-
Ah, ok, I see. Yeah, some of the stations ought to be able to run without textures. I'm a little busy this week, but I'll think about this, maybe I can get to it next week. |
Beta Was this translation helpful? Give feedback.
-
You can pass "--no-textures" to snis_client, or via snis_launcher, in the options menu there's an item to turn on the --no-textures flag. It does still load one small 128x128 texture that's a green grid on a black background that it uses for everything. |
Beta Was this translation helpful? Give feedback.
-
Taking a quick look at RESident memory usage with htop, using the --no-textures option drops the memory usage of snis_client from 699M to 295M on my system. |
Beta Was this translation helpful? Give feedback.
-
It does still load a texture to the GPU, the same 128x128 texture over and over. It could be made even smaller. There might be a further optimization to load the same texture once, and use the same texture ID everywhere, but I'm not sure how practical that is. The change I made is sort of the smallest change I could make that moves in the direction of not needing textures. It should load the same 128x128 texture 135 times by my count, counted via this patch. I expect it should take about 8Mb of GPU memory, plus space for mipmaps, so probably around 10-ish Mb. You could reduce it further by scaling small-green-grid.png down to 64x64 or 32x32 or 16x16 or maybe even down to 1x1, then it should be down into "few kilobytes" territory.
You should not have to run "make update-assets". The only PNG files it should look for are
And if it doesn't find the first one, it should continue anyway, because that's for the splash screen at the beginning which runs in a separate process and so it will either proceed without the image, or die, and it doesn't matter which happens, snis_client doesn't care if the splash screen process succeeds or fails. In theory, you don't ever have to run "make update-assets", there are supposed to be enough assets already in the git repo to get by, and "make update-assets" just downloads more and better assets. However, I have not run without doing "make update-assets" in a long long time, so it is quite possible, maybe even likely, that something is broken if you try skipping "make update-assets", but in theory it should work even without --no-textures, but it definitely should be ok to skip "make update-assets" with --no-textures. |
Beta Was this translation helpful? Give feedback.
-
Ok, I just tried a fresh clone of space-nerds-in-space and tried to run it without "make update-assets".
Oh yeah... Only the OpenSCAD models are in git, you still need the stl files to be generated... Hmm, "make assets" doesn't work (anymore?) Alright need to dig into this. |
Beta Was this translation helpful? Give feedback.
-
Oh, it's "make models", not "make assets". And this will run OpenSCAD a bunch of times on all the share/snis/models/*.scad file to produce all the share/snis/models/*.stl files, which takes forever (even worse on an old slow machine.) But, it does work, tried it both with and without --no-textures. |
Beta Was this translation helpful? Give feedback.
-
Committed the following:
|
Beta Was this translation helpful? Give feedback.
-
Considering my diagnostics in #333
My aged computer ran Space Nerds decently well on reduced textures, but suppose things were taken farther for computers with even less business running main screen/weapons. My suggestion is to modify the launcher to offer starting in a no-textures mode as opposed to insisting on downloading assets. Minimal models for making the screen and wireframe workstations are then loaded and everything else is either touched or linked to the same error texture.
Beta Was this translation helpful? Give feedback.
All reactions