The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Angelfish on October 07, 2009, 11:30:53 am



Title: Gas Giant color
Post by: Angelfish on October 07, 2009, 11:30:53 am
As some of you may know, recently i've been busy re-emulating the SC2 universe in a clone that I'm developing.

Currently, I'm able to load the SC2 universe from an XML file and display its planets in a correct way using the colormaps and height translation files that came with SC2.

However, it seems that the data that UQM is generating doesn't specify the color of the gas giants. As a planet type it  just says 'Gas Giant' without any specification of the color. Thusly, the planet generator doesn't know which colormap to use.

Ofcourse, it's possible to pseudo-randomly determine a color by using a fixed seed, but I'm trying to keep the universe as close to SC2 as possible, especially in the case of Sol where jupiter is supposed to be red and uranus is supposed to be blue, aswell as the Slylandro homeworld which is supposed to be red (as it is in the comm screen too), so it'd be nice to know how UQM determines the color of the gas giants. Does anyone know this? Or is the logging function in UQM not generating the correct/complete data?


Title: Re: Gas Giant color
Post by: meep-eep on October 07, 2009, 06:31:36 pm
The dump generated by UQM includes the planet colour. But I understand that you used data from a different source.


Title: Re: Gas Giant color
Post by: Angelfish on October 08, 2009, 04:00:53 am
The dump generated by UQM includes the planet colour. But I understand that you used data from a different source.


I think I used an older version from such a dump, yes, since I didn't want to bother with doing the actual dump myself.
For example, the one you have in your user directory doesn't have that data either. http://www.stack.nl/~svdb/sc2/PlanetInfo.zip
I guess I'll just have to dump it for myself :)


Title: Re: Gas Giant color
Post by: Angelfish on October 12, 2009, 07:43:35 am
Okay, after 4 hours of trying to build a working uqm-debug.exe with MinGW i've given up. I think the problem lies in the fact that somehow the config utility can't find zlib (yes, I stored it as libzdll.a), no matter what I do , and after that the resulting binary can't load the resources.
I guess for now this is taking me too much time, and I'll just put in the plot relevant gas giants by hand and have the rest be determined pseudo-randomly with a fixed seed.


Title: Re: Gas Giant color
Post by: Megagun on October 12, 2009, 05:06:17 pm
Follow http://koti.mbnet.fi/lonnberg/MinGWUQM.txt instead of the official MinGW compilation guide, and instead of building 0.6.2, build a snapshot of SVN (http://uqm.stack.nl/files/snapshots/)
The .txt file might have some errors in there somewhere (I had troubles a few days ago, too), but if you hop onto IRC, I'm fairly certain we could be able to figure out how to get it to co-operate...

(Alternatively, I'd be willing to generate the data if someone gives me a few pointers as to how to actually generate it; I'm not that familiar with the sourcecode...)
EDIT: http://mooses.nl/temp/Planetinfo.zip (generated from a fairly recent snapshot of SVN), but either I am blind, or it doesn't anywhere display the color of gas giants...


Title: Re: Gas Giant color
Post by: meep-eep on October 12, 2009, 06:59:07 pm
It appears that the colour of a planet actually isn't directly part of the planet's specification. It's entirely determined by the planet type.
The properties of planet types (including colour) can be dumped by the function 'dumpPlanetTypes()'.


Title: Re: Gas Giant color
Post by: Angelfish on October 12, 2009, 08:13:24 pm
Ofcourse, I know that the body color of a red gas giant should be red, and of a green gas giant should be green.. however, the game somehow determines each color of the gas giants in a system in a fixed way.. and I'm curious to finding out how it is determined :).


Title: Re: Gas Giant color
Post by: meep-eep on October 12, 2009, 09:33:41 pm
The colour is determined pseudo-randomly, with a fixed seed (which is dependent on the position of the star). See planets/orbits.c:FillOrbits() for details. Look for 'data_index'.
The exception are certain systems which are manually generated (like Sol), or generated and then slightly modified (like some other alien home systems).

The generated list of planet types can be found at http://www.stack.nl/~svdb/sc2/PlanetTypes.txt (http://www.stack.nl/~svdb/sc2/PlanetTypes.txt).