The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
August 20, 2019, 02:10:40 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Gas Giant color
« previous next »
Pages: [1] Print
Author Topic: Gas Giant color  (Read 2046 times)
Angelfish
Enlightened
*****
Offline Offline

Posts: 568



View Profile
Gas Giant color
« 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?
« Last Edit: October 07, 2009, 11:37:39 am by Angelfish » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Gas Giant color
« Reply #1 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.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Angelfish
Enlightened
*****
Offline Offline

Posts: 568



View Profile
Re: Gas Giant color
« Reply #2 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 Smiley
« Last Edit: October 08, 2009, 05:10:02 am by Angelfish » Logged
Angelfish
Enlightened
*****
Offline Offline

Posts: 568



View Profile
Re: Gas Giant color
« Reply #3 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.
« Last Edit: October 12, 2009, 08:18:43 am by Angelfish » Logged
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Gas Giant color
« Reply #4 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...
« Last Edit: October 12, 2009, 05:44:29 pm by Megagun » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Gas Giant color
« Reply #5 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()'.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Angelfish
Enlightened
*****
Offline Offline

Posts: 568



View Profile
Re: Gas Giant color
« Reply #6 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 Smiley.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Gas Giant color
« Reply #7 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.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!