1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

The game engine just seems wasteful and inefficient

Discussion in 'Starbound Discussion' started by hakari, Dec 28, 2013.

  1. cyberspyXD

    cyberspyXD Tiy's Beard

    I think the reason your being attacked OP is because the post feels a bit condescending so people who do not understand what your talking about take it as a threat or something.

    The white knight brigade will always find legitimate threads like this to complain about.
     
  2. Thiez

    Thiez Void-Bound Voyager

    Having things like health and armor as floating point numbers is not going to make any difference at all. If you want to make a valid observation, try actually profiling the game. It's not that people attack you because they lack understanding, they attack because you lack understanding. Don't bother with micro-optimizations unless you've reached uniformly slow code.
     
    budsygus likes this.
  3. hakari

    hakari Subatomic Cosmonaut

    I'm just using these examples because I don't know the other inner workings of the engine, and I can only speculate based on these. It may not have any impact on performance even if all of what I listed are magically fixed.

    but what I do know, is that any modern 3D engine can spew out way more particles than this engine can draw sprites on screen, and have a million triangles with large textures, and have a bunch of post process effectsn, and run smoother.
     
    DeadlyLuvdisc, Pingeh and Luna like this.
  4. Archer

    Archer Spaceman Spiff

    Glad you made that comment dude, as you hit it right on the nail. That guy has been bullshitting everywhere like that, maybe to look cool or something.


    On-topic: I'm also having trouble with understanding how a game like this can be so taxing on modern machines in many ways (both servers and clients), but I'm also pretty sure this is something that will not go unnoticed by the devs.
     
    sρooκs likes this.
  5. TheSniperFan

    TheSniperFan Subatomic Cosmonaut

    I have to side with those who say that it won't help that much.
    Floating point calculations aren't slow enough to cause such performance problems. I don't know how many players and monsters would have to be on screen for it to become problematic.
    In a normal scenario these should be performance gains that your need a profiler for in order to see them.

    It's unnecessary to use floating point numbers for stuff like fuel though. No question.

    I'd say the biggest issue is the rendering itself. I can play modern AAA titles on my machine with all this fancy effects and this game still somehow starts to lag sometimes when it starts to rain.
    The guys from Project Zomboid ran into similar problems (and even wrote a blog post outlining the problem and their solution). Rendering 2D efficiently can be harder than it sounds.

    However, that's really stuff that is to be expected in this stage of the beta.
    Just give it time...
     
  6. choobski

    choobski Astral Cartographer

    Float/Double conversions are not very expensive.

    I will agree that storing the same things in memory multiple times is dangerous water to wade in. Not only is it increased overhead, you can create conflicting values for the same entity.
     
    Luna likes this.
  7. sil3nst

    sil3nst Void-Bound Voyager

    which im guessing is what leads to a majority of crashes/spikes people get?
     
  8. Heliostorm

    Heliostorm Phantasmal Quasar

    I'm surprised no one's pointed out yet that a big reason for why the game runs and loads slowly is because the .exe is packed full of debug tools that need to process and log everything to a text file. I'd expect a big performance increase just from removing the debug tools alone.
     
    Tarod, Aeon and Luna like this.
  9. TheSniperFan

    TheSniperFan Subatomic Cosmonaut

    Little question:
    Where are those logs saved to?
     
  10. Heliostorm

    Heliostorm Phantasmal Quasar

    Starbound.txt, located in the main folder.
     
  11. choobski

    choobski Astral Cartographer

    Potentially. I haven't looked at the error messages people get. Depending on what values get changed and what they were supposed to be, it might just be a quantitive bug that doesn't harm runtime, just creates more or less of something than there should be. If the value is out of range of what it should be entirely it could cause a fatal error.

    The other potential issue is if you store something in various places, overwrite one of them with something else, and then refer to that place anyways, you can create a type mismatch. That would most likely end in a crash.
     
  12. Joeydawg

    Joeydawg Poptop Tamer

    Good post OP. As a human trying to learn to code it's pretty helpful to see step by step break-downs of what causes things to become non-optimal.
     
  13. TheSniperFan

    TheSniperFan Subatomic Cosmonaut

    Don't care to much about such stiff though.
    Micro-optimizations are the root of all evil. :)
     
    Arehexes and Ashen like this.
  14. sil3nst

    sil3nst Void-Bound Voyager

    lol wtf else would you be?
     
  15. Joeydawg

    Joeydawg Poptop Tamer

    Uh, Floran. Duh. :p
     
    Tarod likes this.
  16. CrusaderDeleters

    CrusaderDeleters Void-Bound Voyager

    This. Here.

    The bad part about a Float when needed as non-precise is that you could be taking, say, pi/3, then dividing that by 3. (3.14...)/3 would equal to 1.0471975511. Of course, it would take its merry time in calculating that. Now, divide it by three yet again, and you'll be wasting double the time, especially if you aren't even in need of precision. That was just a simple example about how it would actually take time in calculating pi/3/3. If you kept every single little point, it would take even more time than to just take 3/3/3, because you'll end up with a number close to 3.14/3/3 anyways, close enough to have not mattered, and also taking loads of time off your hands.
     
  17. Thiez

    Thiez Void-Bound Voyager

    A modern cpu does NOT "take its merry time" when performing floating point operations. We measure performance in GFLOPS these days. Do you even realize what that means? That's a billion floating point calculations per second. These kinds of micro-"optimizations" are a complete waste of developer-time. Want to make a real difference? Do profiling. Learn about big-O and its implications. Learn about algorithms and datastructures. Perhaps explore concurrency. But don't burden the developers with pointless stuff like this. Changing health and armor to integers is not going to measurably affect performance.
     
    DeadlyLuvdisc, Tarod and Arehexes like this.
  18. Foxkoun

    Foxkoun Space Spelunker

    Also it seems there's some override. I get into situations that render my controls useless as my character acts on their own, often to the worst result.
     
  19. GSGregory

    GSGregory Ketchup Robot

    Think of a server though.

    Multi threading is a must as well. I could understand the lack of multi core support back when duos were standard and quads were still new, but it has been a few years and there is no reason a game should not be multi core by standard.
     
    sρooκs and sf2000 like this.
  20. MDK

    MDK Aquatic Astronaut

    This seems like a general problem with games these days. A lot of games including big tripleA ones seems to suffer from poor multithread support. I really hope the industry catches up at some point.
     

Share This Page