Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 12 13 [14] 15 16 ... 90

Author Topic: Starsector 0.7a (Released) Patch Notes  (Read 578169 times)

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #195 on: July 02, 2015, 05:58:32 AM »

The biggest CPU hog is the rendering engine.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #196 on: July 02, 2015, 07:43:36 AM »

The biggest CPU hog is the rendering engine.
Yep.  The biggest CPU items, assuming you have ShaderLib turned up to full blast are:

1. Rendering overhead
2. Ship/Weapon/Admiral AI (total)
3. ShaderLib
Logged

orost

  • Captain
  • ****
  • Posts: 436
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #197 on: July 02, 2015, 08:03:56 AM »

AFAIK, SS uses legacy fixed-function, immediate-mode OpenGL which is... inefficient, to put it mildly. Lots and lots of API calls and GPU <-> CPU data traffic that could be completely avoided with more modern techniques. This causes a lot of overhead even with relatively simple 2D graphics.

On the other hand, modern OpenGL is hugely demanding in terms of development time and very specific skills, so it was probably a good decision to not use it. I'd rather have a game about whose performance I can complain than no game at all because the highly complex engine required for modern graphics APIs got stuck in development hell.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #198 on: July 02, 2015, 09:18:23 AM »

AFAIK, SS uses legacy fixed-function, immediate-mode OpenGL which is... inefficient, to put it mildly. Lots and lots of API calls and GPU <-> CPU data traffic that could be completely avoided with more modern techniques. This causes a lot of overhead even with relatively simple 2D graphics.

On the other hand, modern OpenGL is hugely demanding in terms of development time and very specific skills, so it was probably a good decision to not use it. I'd rather have a game about whose performance I can complain than no game at all because the highly complex engine required for modern graphics APIs got stuck in development hell.

(Just as a side note (and in my defense!), SS also uses vertex arrays and such in some performance-critical places. Where not a lot of vertices are involved (i.e. rendering simple sprites) immediate mode doesn't seem to do any worse. Stuff with more vertices (such as ship damage decals) it does make a big difference to use vertex arrays. And shaders... you can do neat stuff that you can't with fixed-function, but can you do the basics like rendering sprites faster? You'd still have to send the same vertex data over to the GPU, so I'm not sure where the speed improvement would happen.

But, yeah, as you say, it's just one of those things where going with what I know how to do just made sense.)
Logged

orost

  • Captain
  • ****
  • Posts: 436
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #199 on: July 02, 2015, 10:29:49 AM »

Client vertex arrays (which I assume you meant, it's a bit ambiguous with unrelated Vertex Array Objects also existing), while a whole lot better than direct vertex specification, are actually also immediate mode and very slow in comparison to retained-mode buffer objects. The difference being that with vertex arrays, you re-send the data every time you draw it, while with buffer objects you send it once and then refer to it via a handle. It's a huge PITA to set up and manage, but the performance gains are stunning - draw commands are just a tiny handful of bytes and are fully asynchronous. For example, the very basic integrated Intel graphics card in my laptop can easily draw 5 million triangles at 60 frames per second if they're all in one retained buffer.

Shaders by themselves are not inherently faster than fixed-function (although more flexibility always means more space for optimization tricks) but I mentioned them because retained-mode requires them, it doesn't work with fixed-function.
« Last Edit: July 02, 2015, 10:35:37 AM by orost »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #200 on: July 02, 2015, 11:04:36 AM »

Client vertex arrays (which I assume you meant, it's a bit ambiguous with unrelated Vertex Array Objects also existing), while a whole lot better than direct vertex specification, are actually also immediate mode and very slow in comparison to retained-mode buffer objects. The difference being that with vertex arrays, you re-send the data every time you draw it, while with buffer objects you send it once and then refer to it via a handle. It's a huge PITA to set up and manage, but the performance gains are stunning - draw commands are just a tiny handful of bytes and are fully asynchronous. For example, the very basic integrated Intel graphics card in my laptop can easily draw 5 million triangles at 60 frames per second if they're all in one retained buffer.

Yeah, I meant client-side, not VBOs (didn't realize that was also called immediate mode, thanks for pointing that out!). I did actually try VBOs for some things - the speed was very similar to client-side arrays, though I suspect it's the sort of thing where it can start to matter more when you scale up. (Actually had an issue with VBO with some graphics drivers (on a Mac) where it was literally 100x slower than straight glVertex2f calls, though I'd hope that's fixed by now.)

The bigger problem with VBO usefulness is having to stick with a single texture. A VBO with 4 vertices in it isn't really worth it, performance-wise. Those 5 million triangles wouldn't render so quickly if they were split into 2.5 million VBOs, you know? :) And that's kind of what you're stuck with, in sprite land. You could create a sprite sheet/atlas and batch things up that way, but that's 1) a big pain content-creation-wise and 2) makes things much harder to make mod-friendly. Imagine if all the weapons were in a sheet - they'd certainly fit, and it could make the "draw all weapons" part of ship rendering faster (heck, even without VBO use - just not having to bind new textures all the time would be a savings), but how would you go about mods adding new weapons in a setup like that?

Hmm. I guess you'd create a new texture with all the weapons at load-time, so that's doable, even if the problem of laying them out in the new texture ranges from "hard" to "NP-hard", depending on how efficient you need to be with the space. If weapon rendering was a big issue, then that might be worthwhile (but very time-consuming) optimization to make. It gets messier when you need things rendered in a particular order, though... like, for weapons, you've got the weapon sprites in a specific order, but then you've also got damage decals interleaved if there's damage.

... all of which, I suppose, falls right under "It's a huge PITA to set up and manage" :)
Logged

orost

  • Captain
  • ****
  • Posts: 436
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #201 on: July 02, 2015, 11:25:12 AM »

Yeah, you're absolutely right. Texture atlasing, even dynamic, can definitely be done successfully (have you played Supreme Commander? all of its UI is drawn with a single draw call!) but it's probably way outside of what a single-person project can afford to spend time on.

I'm absolutely not criticizing you for using older graphics techniques, it's still a very valid choice for 2D, I just wanted to explain to others why graphics may be significant to Starsector's performance even though it's 2D and not nearly as visually complex as modern 3D games - because those 3D games have dozens of programmers working on them and can afford to do things in a much, much more complex way.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #202 on: July 02, 2015, 11:46:49 AM »

Yeah, you're absolutely right. Texture atlasing, even dynamic, can definitely be done successfully (have you played Supreme Commander? all of its UI is drawn with a single draw call!) but it's probably way outside of what a single-person project can afford to spend time on.

Whoa, that's impressive!

I'm absolutely not criticizing you for using older graphics techniques, it's still a very valid choice for 2D, I just wanted to explain to others why graphics may be significant to Starsector's performance even though it's 2D and not nearly as visually complex as modern 3D games - because those 3D games have dozens of programmers working on them and can afford to do things in a much, much more complex way.

Right, definitely didn't take it in a negative way, and besides, criticism is a positive thing if it's constructive. Learned a couple of things, and just wanted to chime in with some related stuff :) And yeah, I think 2D has a reputation for being easy on the GPU which really isn't warranted, especially with how the GPU is going to be optimized to handle higher-poly 3D stuff. Then (as you've pretty much exactly said) it's like, well, can I afford to make something literally 10x more complex in dev-time to get a bit more performance out of it? Considering how often I'm coding up random little things using OpenGL to make this or that look a specific way, that'd be untenable.


Speaking of coding up random things using OpenGL, something I'm working on now:
Spoiler
[close]

Still experimental/a work in progress.
« Last Edit: July 02, 2015, 11:50:10 AM by Alex »
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #203 on: July 02, 2015, 11:51:00 AM »

Oooh, hyperspace currents?  That seems useful!  ...And dangerous, of course.
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #204 on: July 02, 2015, 11:55:14 AM »

That's a pretty good guess! Curious, did you read it as going up, or sideways? Looking at it again, it kind of looks like a tube, which is interesting, but different than the idea, which is something like a wavefront.

A more recent (as of about 2 minutes ago) version, with a bit of a wake to hopefully sell what's going on better:

Spoiler
[close]
Logged

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #205 on: July 02, 2015, 12:10:34 PM »

Yeah, the first one seemed to be revolving, this one is much more like a wave. Instantly reminds me of the Klingon moon explosion from Star Trek VI: .

But yours looks prettier. Can you use it to travel? While trying not to die? That would be awesome :)
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #206 on: July 02, 2015, 12:16:09 PM »

That's a pretty good guess! Curious, did you read it as going up, or sideways? Looking at it again, it kind of looks like a tube, which is interesting, but different than the idea, which is something like a wavefront.
I read it as a tube that was going up, a sort of a moving hyperstring thing that one could try to hitch a ride on.
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #207 on: July 02, 2015, 12:18:34 PM »

But yours looks prettier. Can you use it to travel? While trying not to die? That would be awesome :)

That's actually the point of the wavefront, but shhh, don't tell anyone! Wouldn't want someone to be disappointed if it didn't pan out. Trying to get new gameplay to feel right is tricky, and I haven't even gotten to that point yet - still ironing out some visual bugs.

Plus it might end up looking totally different, depending on if David wants to take an axe to it or not.


I read it as a tube that was going up, a sort of a moving hyperstring thing that one could try to hitch a ride on.

Ah, cool - so not too far off from what was intended.
Logged

arcibalde

  • Admiral
  • *****
  • Posts: 1730
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #208 on: July 02, 2015, 01:01:12 PM »

Gif2 looks like bigger tube that revolves slower and leaves stuff behind :)
Logged
Creator of:
Relics MOD - vanilla balanced - Campaign integrated
Vanilla addon MOD - vanilla balanced - Campaign integrated
Project ONI MOD - mission only

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: Starsector 0.7a (In Development) Patch Notes
« Reply #209 on: July 02, 2015, 01:12:50 PM »

Gif2 looks like bigger tube that revolves slower and leaves stuff behind :)

"Dang it! We fell out of the tube again!" -starship captain
Logged
Pages: 1 ... 12 13 [14] 15 16 ... 90