How I got OpenRA to run on a very old GPU

Discussion about the game and its default mods.
Post Reply
lucassss
Posts: 144
Joined: Mon Jan 04, 2016 1:55 pm

How I got OpenRA to run on a very old GPU

Post by lucassss »

As some of you may have seen, I had to switch to a really old computer for a while. At first, I noticed that this computer takes too long to render. After some hacking in the source code, I managed to implement a "low-detail" mode for OpenRA. In case you are wondering, this is how it looks:

Image

To any developers out there, I have to ask, why does rendering terrain takes so long?[/url]

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Could be worse!

Always a little jealous of people who know what they're doing when it comes to computers. I mean real understanding of the hardware and the way software works.
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

lucassss
Posts: 144
Joined: Mon Jan 04, 2016 1:55 pm

Post by lucassss »

Actually in this case, I can explain the change quite easily. I began by using the debug display to find out that the thing takes long is "render" and not "tick".
"render" is drawing things to the screen while "tick" is game logic. After that, I modified openra code to display times for different parts of "render".
This showed me several points of slowness, I removed each one of them from the code and saw what graphical glitches appear and how render time improves.
Eventually, I found out that the slowest point that remained and couldn't be removed was terrain rendering, so I got rid of all the sprite related code,
and instead wrote my own rendering code which simply draws a square for each tile, selecting the square color according to the terrain type.
Ore terrain and clear terrain are both black, since for ore terrain I left the original ore rendering code since it did not take long and it helped for clearer rendering of ore.
Also, if I render ore tiles using squares, I get the ore radar bug on the actual map, which would be a cheat, which is a big no-no.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Nice approach, kind of understand what you did with your description. Thanks :)
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

Matt
Posts: 1156
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

The terrain rendering bottleneck is even worse for next gen mods: https://github.com/OpenRA/ra2/issues/273

Post Reply