Performance in 5.0 and possible solution

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Performance in 5.0 and possible solution

Post by Breakable »

Hello there,
I have been monitoring Vega Strike for quite some time now (from my dark and cold corner of the universe), and would like to congratulate the developers on great progress that is done in the 5.0 beta version.

The game is very playable right now, but some performance problems still prevent playing with lower-end video hardware which I have (Intel Corporation Mobile 915GM). It is really strange to me because the effects and graphics doesn't look very demanding.

I did some research and it seems I found one of the causes. It seems related to anti-aliasing.

As a linux developer I don't have a lot of experience, but I know that performance problems are best approached with a profiler. I tried using sysprof 1.0.8 on my machine, started the campaign from the beginning, enabled the profiler just before the launch, and this is what I discovered:
The DrawShield method takes almost 10% of total processor time. If you are wondering this method just draws the shield wirefreame on ship UI (about 16 curved lines that is). The result:
DrawShield Self 0.03 Cumulative 9.88

After that discovery I tried disabling the lines:
GFXEnable(SMOOTH)
GFXDisable(SMOOTH);

in DrawShield method. Recompiled the code and the result is:
DrawShield Self 0.03 Cumulative 0.12

It seems now the shield line are a little less smooth, but I don't mind that if the gaming experience is much better.

Well as being a noob in linux (and vega strike) development I would love someone to please comment on those numbers and experience - maybe nothing has changed at all? Just the performance problems moved somewhere? I am attaching compressed profiles of both modes (sysprof).

If am I right a possible solution would be to add an option for disabling anti aliasing in configuration file and vssetup.

PS:This could explain the warpgates drawing slowly.
You do not have the required permissions to view the files attached to this post.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Welcome Breakable thx for the profiles i'am not a dev but anti-aliasing has been mentioned as a culprit before especially with Intel GPU's :wink: compression support is also problematic.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

Thank you for your warm welcome, I hope my stay will last, but there are no guarantees with my unreliable Hiena ship :oops:

I disabled all the smoothing (antialiasing) in the source code I could find, and the playability is really good, and the looks seems not to suffer (at least on my mashine). I am attaching a simple patch for repeating my experience.

I wonder where could I learn more about vega strike texture compression(only source code)? Is it possible to uncompress textures on load? Maybe its not very hard to implement if not... :roll:

EDIT:Removed the attachment in favor of the one on 9'th post.
Last edited by Breakable on Thu Nov 22, 2007 10:03 pm, edited 1 time in total.
triato
Merchant
Merchant
Posts: 45
Joined: Tue May 23, 2006 6:29 pm

Post by triato »

How can I do that? I have the same problem you do. thanks in advance.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

There is a variable in the config file you might have a look at line 749 of the beta version's version

Code: Select all

<var name="smooth_lines" value="true"/>
this may all ready be set to false by the setup utility depending on your settings but may be a good starting point :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

I wonder where could I learn more about vega strike texture compression(only source code)? Is it possible to uncompress textures on load? Maybe its not very hard to implement if not... Rolling Eyes
there bog standard dds you can uncompress them with the photo-shop or gimp plug-ins this thread should give you the background on the whys and wherefores and some links to the tools that where used :wink: http://vegastrike.sourceforge.net/forum ... php?t=9132

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

loki1950 wrote:There is a variable in the config file you might have a look at line 749 of the beta version's version

Code: Select all

<var name="smooth_lines" value="true"/>
this may all ready be set to false by the setup utility depending on your settings but may be a good starting point :wink:

Enjoy the Choice :)
I took a look in the source code and it seems the smooth_points and smooth_lines variables from config file are not very much respected. They seem to be used for 3d drawing settings - only in this function:

Code: Select all

void GFXVertexList::Draw (enum POLYTYPE *mode,const INDEX index, const int numlists, const int *offsets)

But not for 2d. Like shield lines.

Well it might be that the warp point wireframes might not be affected after all, or I just need to understand more about the vega strike source code but somehow I am really happy with my current performance.
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

loki1950 wrote: there bog standard dds you can uncompress them with the photo-shop or gimp plug-ins this thread should give you the background on the whys and wherefores and some links to the tools that where used :wink: http://vegastrike.sourceforge.net/forum ... php?t=9132

Enjoy the Choice :)
It seems you are trying to scare me with a big-read-thread ;) . I might read it someday - but today its sleeping time already. Big tnx for the link.

As mentioned in that thread the DDS compression doesn't reduce file size too much, so it might be a good idea to keep them decompressed on low-end integrated video cards with plenty system memory, like mine (well almost plenty), so I might investigate it further.
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

triato wrote:How can I do that? I have the same problem you do. thanks in advance.
Well its not a very small job to do it. Basically what you have to do is:
a)Download the svn (if its playable?) or tarball (is it possible to patch this?) version of source code
b)Apply the patch using the svn client (or some other application i dont know that could work with tarball)
c)Download all required development libraries
d)Compile the source code

Each of these tasks isn't very simple and requires some patience. I would love to make you (and everybody else) a binary package, but I didn't learn how to do it yet - sorry.

You can start here. a)c)d) for linux
http://vegastrike.sourceforge.net/wiki/ ... e_from_SVN
http://vegastrike.sourceforge.net/wiki/ ... eckout_SVN

b):http://www.linuxhq.com/patch-howto.html
Normally all you need to do is simply issue the following command:

patch -p0 < patch-file-name-here

This should be done from the /usr/src directory.
This can be pretty tricky to perform for a first time...

I go to sleep now :arrow:
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

Just created a version of patch that I thin can qualify for svn inclusion. Now the settings smooth_lines and smooth_points will be more respected because depending on them the glDisable and glEnable functions will manage the GL_POINT_SMOOTH and GL_LINE_SMOOTH settings.

I am not experienced with open GL, so I hope before inclusion it will be reviewed of course.

EDIT:A small fix in the patch
You do not have the required permissions to view the files attached to this post.
Last edited by Breakable on Thu Nov 22, 2007 10:53 pm, edited 1 time in total.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Thx Breakable hopefully one of the devs has time to look over the boards :wink: soon.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Thanks, I applied your patch.
glut_support.cpp isn't used anymore but oh well.

Yeah it's bad to have huge performance problems like this.
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

ace123 wrote:Thanks, I applied your patch.
glut_support.cpp isn't used anymore but oh well.

Yeah it's bad to have huge performance problems like this.
Thank you for noticing it! I hope I will be able to help out with some performance, bugs, refactoring and cleanup as I learn and understand more about vega strike codebase.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Post by safemode »

we should make a list of all the files we dont actually use in VS anymore, and I or someone else can remove them after 0.5 is released. There are quite a few. This goes for data4.x and vs.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Post by safemode »

this does not fix the issue of framerates dropping when viewing planets/large units. though this patch obviously did the right thing.

so if any devs are keeping their eyes out, that issue is still open. framerate still goes from around 110fps to 40-50 etc.
Ed Sweetman endorses this message.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

As was brought up in the other thread:
http://vegastrike.sourceforge.net/forum ... 7&start=30
this patch is actually making things slower in certain cases (i.e. reversing it fixes problems)

I believe it is because it put if statements around some "glDisable(GL_POINT_SMOOTH)" lines... but it doesn't make sense that some glDisable()s fix the problem without corresponding glEnable()s.

My suspicion is that the patch caught the glDisable's for some things, but not their corresponding glEnable's. so the smooth flag is staying set during much of the draw phase or something of that sort.
Blazer_X
Star Pilot
Star Pilot
Posts: 5
Joined: Sun Aug 24, 2008 9:37 pm

hi...

Post by Blazer_X »

hi im new to vegastrike and im just annoyed by the fps drop, i have an iMac 2.16 intel dual core and my fps is usually around 60-70. but as soon as i get to a jumppoint it heads down to 5 and below (i once had it at 0) javascript:emoticon(':shock:')
So my question is how do i fix it, is there even a fix. im not a programer or anything... so help would be appreciated.
i just wanna play this awesome game to its fullest.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Welcome Blazer_X i believe that most of what is discussed in this thread has been applied to the current svn , it may just be a matter of a new binary but i image that you would also need the data side changes that have happened since release the game has always been slow at the jump points as that is where the next system is loaded i usually see a 20-30 second pause while the next system loads we do have a lot of things to load :wink: AS i said it will most likely be fixed but the binary currently available one is not fixed building for OSX is kinda tricky i gather so they are not updated very often there are also shder support stuff not there not in it .

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Blazer_X
Star Pilot
Star Pilot
Posts: 5
Joined: Sun Aug 24, 2008 9:37 pm

thanx

Post by Blazer_X »

thanks for the info, ill try to keep up to date... jumping to systems takes about less then 5 seconds for me...
Breakable
Hunter
Hunter
Posts: 95
Joined: Sun Nov 18, 2007 1:19 pm

Post by Breakable »

And of course you must set the configuration options for
smooth_lines and smooth_points to 0 in vs configuration file.
I dont think its off by default.
"Everything should be made as simple as possible, but not simpler."
Albert Einstein
Post Reply