[ANTI LAG SUGGESTION] Generate Sprites for Entities at long distances

    Joined
    May 3, 2016
    Messages
    107
    Reaction score
    23
    Now before you say to me "OMEHGAWD this will naht werk" please read the suggestion fully :P

    Anyways zorozeenee had this idea (I am posting on his behalf) where ships/stations at very long distances could be sprites instead of entities, they can still take block damage and this can be visible when the ships come closer (when they turn into entities instead of sprites) I know that games like Total War do this as an anti lag measure when a lot of entities are present, and I think this could work.

    Essentially when a ship is at a very long distance, instead of loading and functional entity it loads a static sprite of the ship.

    What do you guys think?
     
    • Like
    Reactions: Valiant70

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,115
    Reaction score
    1,229
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    You could try not bringing 30 AI frigates with you if you're having so much trouble loading things. ;)
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Now before you say to me "OMEHGAWD this will naht werk" please read the suggestion fully :p

    Anyways zorozeenee had this idea (I am posting on his behalf) where ships/stations at very long distances could be sprites instead of entities, they can still take block damage and this can be visible when the ships come closer (when they turn into entities instead of sprites) I know that games like Total War do this as an anti lag measure when a lot of entities are present, and I think this could work.

    Essentially when a ship is at a very long distance, instead of loading and functional entity it loads a static sprite of the ship.

    What do you guys think?
    This will address framerate issues, not serverside lag, as the server will still have to keep track of everything.
    If that is your intent, this suggestions will likely work perfectly fine, otherwise it will have no effect.
     
    • Like
    Reactions: HeartUponSleeve
    Joined
    Jun 17, 2015
    Messages
    300
    Reaction score
    90
    This could definitely work. If you have the blocks represent pixels in the sprite it should work quite well. I wouldn't be surprised if this was the end game for the LOD system.
     
    • Like
    Reactions: HeartUponSleeve

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    I propose that if this sprite suggestion were implemented, the ship blueprint carry the sprites, and that they are generated at build time, presumably when they can most-afford to be generated. At distance, you won't be able to tell damage anyway, unless the ship is mostly gone. But at a distance, you just need to know what kind of ship is there, not its damage, so a build-mode-time sprite should be good enough. A small sprite generated real-time, showing the current damage would not be very useful and would take up the computing power that you are trying to save.

    Sprite details: There should be 22 32x32 (maybe even just 16x16?) sprites generated at build time, generated from all cardinal and diagonal directions, using an orthogonal viewpoint. (6 cardinal directions + 8 corners + 8 tween-cardinal midpoints) That should be good enough. Then, depending on which direction the viewer is at in relation to the distant entity, one of the 22 sprites is shown, which is the best angle in relation to the viewer. So if you are viewing the entity from behind, even if you are a little off the axis, you'll be shown the rear-view sprite. If you are far enough up and to the side, you get shown a diagonal-view sprite instead.

    Maybe have a server setting that if the server resources are taxed, or just as a default, simply show the front view sprite at distance, regardless of bearing.
     

    Az14el

    Definitely not a skywanderers dev
    Joined
    Apr 25, 2015
    Messages
    848
    Reaction score
    325
    • Legacy Citizen 2
    • Purchased!
    • Community Content - Bronze 1
    This sort of thing would be great, and at least i think makes sense from a programmers stand point
    but at the least I would imagine it having to wait until AI processing while unloaded is a thing, as simulating all the blocks as sprites would essentially require the same thing
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    I'm sure the team is looking at ways for block/chunk/entity level LoD. I've even suggested a few methods to them myself. Enabling technologies like that would help the game as a whole. We'll see where they take it, but as much as I'd want to implement a system similar to this. The core of starmade's game play needs to be addressed first.

    There are also a lot of reasons you wouldn't want it to be sprites perse. While a sprite could be 2 planes with a rendered image, imagine 100 or 1000 different ones in an area. Each one of those textures needs to get sent and rendered separately. Even for small icons that starts to add up to a ton of VRAM used in the graphics card. I'd lob this guy under the suggested tag.
     

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,115
    Reaction score
    1,229
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    This will address framerate issues, not serverside lag, as the server will still have to keep track of everything.
    If that is your intent, this suggestions will likely work perfectly fine, otherwise it will have no effect.
    No, this will actually do VERY LITTLE to help with framerate issues. Most frame rate issues these days come from collision lag. 30 ships flying around will not cause much lag until they start passing through eachother's bounding boxes, at which point everything goes to shit.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    No, this will actually do VERY LITTLE to help with framerate issues. Most frame rate issues these days come from collision lag. 30 ships flying around will not cause much lag until they start passing through eachother's bounding boxes, at which point everything goes to shit.
    Sprites still cost less to draw than ships, meaning the effect will exist, the question is if it matters.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    It will matter a lot for low-end computers. In many cases this could make the difference between being unable to play and simply putting up with less than stellar visuals.
     
    • Like
    Reactions: silverfoe

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    It really matters a lot for big entities like planets and stations.
     
    • Like
    Reactions: silverfoe
    Joined
    May 3, 2016
    Messages
    107
    Reaction score
    23
    I'm sure the team is looking at ways for block/chunk/entity level LoD. I've even suggested a few methods to them myself. Enabling technologies like that would help the game as a whole. We'll see where they take it, but as much as I'd want to implement a system similar to this. The core of starmade's game play needs to be addressed first.

    There are also a lot of reasons you wouldn't want it to be sprites perse. While a sprite could be 2 planes with a rendered image, imagine 100 or 1000 different ones in an area. Each one of those textures needs to get sent and rendered separately. Even for small icons that starts to add up to a ton of VRAM used in the graphics card. I'd lob this guy under the suggested tag.
    Rendering 100 or 1000 different entities in an area would be much worse than sprites.
     
    Joined
    Feb 25, 2016
    Messages
    1,362
    Reaction score
    268
    Sprites as a way to reduce lag seems viable. It would work best, I'd assume, with things like stars and planets, wormholes, etc. These things always appear in the game, yet have definite shapes that are relative easy to change to sprites (They're all circles. A pixel-y circle would work for all of them. Just add color)
     
    Joined
    Sep 12, 2017
    Messages
    84
    Reaction score
    31
    (Found this by looking through reds ways to improve the game)

    I really hope this get implemented. As previously discussed, I could see this being useful for low end computers and big ships. It could get a bit complicated as nightrune said. I could see this being most useful for mega stations or more realistic sized planets.
     

    sayerulz

    Identifies as a T-34
    Joined
    Nov 16, 2013
    Messages
    616
    Reaction score
    179
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Well, that was right at the top of a google image search I did for "thread necro", so sure, steal it.