jurchik / project6014

Automatically exported from code.google.com/p/project6014
0 stars 0 forks source link

Planet generation slow in 4x mode #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As reported by Jaakko in the message for r589.

Code to look at probably starts at sc2/src/sc2code/planets/plangen.c:1894.

Slowness is probably just a fact of the increase in number of pixels to 
generate, but we may be able to optimise it a bit.

Original issue reported on code.google.com by ejrh00@gmail.com on 18 Sep 2011 at 2:59

GoogleCodeExporter commented 8 years ago
I've devised a way to accelerate it about tenfold in UQM HD's revision r176, so 
this issue's virtually taken care of.
First plangen.c needs to be made up to date with uqm 0.7.0 by merging, then the 
code from HD can be merged too.

Original comment by ELhom...@gmail.com on 18 Sep 2011 at 12:51

GoogleCodeExporter commented 8 years ago
Sorry, last comment was supposed to be from me.

Original comment by benjamin...@free.fr on 18 Sep 2011 at 12:53

GoogleCodeExporter commented 8 years ago
Interesting.  Looks like the old code was rendering bits of it at a time 
(NUM_BATCH_POINTS) and you've changed it just to generate it all into a big 
array first, and then blit it in one go.  Good work.  (Makes me wonder why they 
went to all that trouble, all I can think of is saving memory...)

Original comment by ejrh00@gmail.com on 18 Sep 2011 at 9:50

GoogleCodeExporter commented 8 years ago
Yep, my current code is just a crude hack to enable testing 4x graphics on 
planetside. Benjamin's definitely done a better job :D

I bet memory saving is indeed the main aim of the original code. With the 640k 
max of DOS I guess they had to skimp on memory anywhere they just could.

Original comment by Jaakko.M...@gmail.com on 19 Sep 2011 at 7:31

GoogleCodeExporter commented 8 years ago
Solved in r1512. Could be optimized a tad more, ideally.

Original comment by benjamin...@free.fr on 1 Dec 2011 at 11:03