The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => General UQM Discussion => Topic started by: Sage on September 17, 2003, 11:11:45 pm



Title: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on September 17, 2003, 11:11:45 pm
That's right, an image map (http://www.customc.net/staff/sage/starmap). For what purpose? Maybe to link up to the existing star info database? Maybe to create a database of my own? I'm not sure yet. I'll know when I get there.

The image in question is made of 16 4x zooms pasted together. I would have created this at 2x (which I actually have an image (http://www.customc.net/staff/sage/starmap/hyperspace.gif) of still), but many stars were obscured or not visible at all. Even at 4x I can't make out Vela, but that can be worked around. I've also input the data for the first column of stars. Hovering over a star will display its name, and link you to whatever it is I intend to do later.

20 tiles down, 380 to go.

Random Ideas for what could potentially be included:
- Overlays for spheres of influence, quasispace portals, rainbow worlds, collectible items, homeworlds, etc.
- Planetary database?
- Old spheres of influence from the paper hyperspace map?
- Constellation images?
- Anything else?

Errors? Questions? Comments? Ideas? Have I lost my mind? Post away!


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Spurk on September 17, 2003, 11:24:10 pm
Quote
- Old spheres of influence from color hyperspace map?

Ah, that's why you didn't just use the old one, right? I was trying to figure out why you did all those screen shots when there's already one up at PNF.

Anyway, neat idea. The HTML nerd in me would want to make the whole thing Javascript so when you moved your mouse over various planets or whatever it would pop up the information in a window or something. But it's probably better not to do that.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on September 18, 2003, 01:20:26 am
Doesn't seem to work in Mozilla 1.4;  IE might be fixing a syntactical error in your code when you test it (it's been known to do that)...


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Spurk on September 18, 2003, 02:06:07 am
^ yeah, for Mozilla support, you need to put title="Vega" (or whatever) as well as alt="Vega"


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 18, 2003, 07:40:41 am
I've already converted the offline version to titles instead of alts, as per an Opera user's request. As a benefit to this method I also discovered how to do line breaks within the titles, so now I can probably put in star coordinates and other data in those tooltips.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on September 20, 2003, 04:52:04 am
Wow, this looks really great Sage;  I bet Starcontrol RPG will want to take a look at this image map for their games (with a little css magic, you'd have dynamic circles of influence and everything)...


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: umgahbob on September 20, 2003, 04:01:28 pm
That's a good start sage. One of your ideas, the planetary database, would this include minerals, and biologicals? That'd be one hell of an undertaking if so. I like the idea of the constellation overlay, that'd probably stop people from asking about the whereabouts of the Vux beast.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 20, 2003, 08:31:37 pm
200 tiles down, 200 to go.

umgahbob: My whole idea with the constellations was to solve just that problem. Though I've always thought that the constellation looked more like a hat. Ah well.

As for a planetary database, yeah it might be done. On that note...

Culture20: Do you perchance have any of this CSS on hand that I might be able to make use of?

Also:

I searched the forums and discovered that you were looking for/into the planet generation code, and considering the possibility of building a database on this. Did you ever get anywhere with this? And if you did, think we could share some data or collaborate on this?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: PsychicKiller on September 20, 2003, 09:08:41 pm
200 tiles to go? Great going man! You probably know everything alot better than I do about planets, but I can give you some quick info about planets... when I get my icq working again. :-/


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: umgahbob on September 21, 2003, 07:56:14 am
Quote
umgahbob: My whole idea with the constellations was to solve just that problem. Though I've always thought that the constellation looked more like a hat. Ah well.



I never thought it looked much like a snake either. It kinda does look like a hat though.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Krulle on September 22, 2003, 04:48:46 pm
Quote
I never thought it looked much like a snake either. It kinda does look like a hat though.

A snake has swallowed an mamooth:


      MM
____MM______/
/


Well, yes, that does resemble a hat....

It never had to be specific for me. To be honest, the first 4 or 5 times i played tha game, i never found the beast, therefor i never did the sidequest of reviving the Shofixti and the Yehatrebellion and the rejoining with the Pkunk.
Until now, i never had a Pkunk to fight the Sa-Matra (and i do not have time to try it the next few months).


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Death 999 on September 22, 2003, 07:46:44 pm
Clearly the VUX got this tip from the Little Prince.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on September 23, 2003, 12:53:25 am
Quote
Culture20: Do you perchance have any of this CSS on hand that I might be able to make use of?

Cascading  Style Sheets are what you want to look for.  You can assign layers to objects (including pngs of circles with transparent backgrounds).  I don't know if you can get the images to be transparent to the mouse cursor though (so that the mouse could click through a circle-image onto your starmap background)... It's been years since I've written a decent webpage.
Quote
I searched the forums and discovered that you were looking for/into the planet generation code, and considering the possibility of building a database on this. Did you ever get anywhere with this? And if you did, think we could share some data or collaborate on this?

I started looking through the code and decided that my idea wasn't worth the hassle of tracing where things where stored.  I figured I'd wait until there was better documentation.

Edit: by "things" I meant which variables store what information.  Each solar system is created on the fly based on their coordinates; change a star's coordinates slightly, and the whole solar system changes.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 23, 2003, 01:41:13 am
About the CSS: Simple solution for that...since the stars on the map appear above the circles anyhow, I can simply put the spheres of influence beneath the star layer but above the grid layer. Though obviously there are no such layers yet, that can change in time.

About generation code: Sensible, but troublesome. I also went looking in PNF's news archive for the planetary database I read about when I first got linked to this community via Penny Arcade. Sadly this database seems to no longer exist, and there appears to be a robots.txt preventing the Web Archive from indexing copies of it. Very annoying. So it looks like I'll have to archive the data myself, with PsychicKiller's help (and pretty much anyone else that's willing) if he'll do it.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on September 23, 2003, 02:58:40 am
Another good reason to use CSS:
You could use a black background with or without the grid, then use little star images for each star, but they could be placed exactly where you want them to go (maybe use some JavaScript to zoom in-out (space the stars/grid by a factor)).  This would make the page load faster (not downloading a gigantic gif file).  The circles of influence would still be big (at least for the two Ur-quan species), but the biggest file would be broken down into a few tiny files.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 23, 2003, 08:10:31 am
You, my friend, are a genius and an inspiration. After taking your comments and using the data McMartin provided, as well as a formula or two from f0ssil, I managed to generate a new hyperspace map (http://www.customc.net/staff/sage/starmap/) from the UQM source. This version has much smaller filesize than the original, and measures at a perfect 2000x2000.

Perl is my bestest friend! ^_^


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Paxtez on September 23, 2003, 09:54:41 am
Cool.  Any chance on making it zoomable or adding a search function?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: J on September 23, 2003, 01:10:12 pm
I have a database of all the stars in SC2 which I use to render the SC2 map in realtime.

What I really need to complete it is the colour and size of each star so that I can render cool lighting effects


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 23, 2003, 01:17:13 pm
Update: Spheres of inflence have been added. I am aware that the "corners" of the sphere images will cause a popup to activate. It will be addressed at a later point (in other words, I've worked on this for too long today and am tired of it for now).

Zooming is questionable at this point...it would be possible, but might not be feasible the way this has been coded together. Plus I'd have to find some way to generate dynamic circles. Searching is much more feasible and something I'll look into when/if I get to the database part of this project.

As for the colors of the stars, this (http://www.customc.net/staff/sage/star_data.txt) might be of some use to you. It's a quick and dirty file I generated with my star script, and yes it's not formatted well, but it has all the information you'd need.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Death 999 on September 23, 2003, 08:56:29 pm
This is pretty cool! It works on Safari, but not on iCab.

Furthermore, you could in the future expand it so each star linked to a page that was the map of its solar system... but that would require either tons of grunt work, or extracting the solar system-generating code into a drawing program.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Chrispy on September 24, 2003, 02:09:30 am
what are all the diff symbols.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on September 24, 2003, 02:41:16 am
Ooo!  You've got little circles for plot-related stars, rainbow worlds, and home-worlds.  If by "diff symbols" chrispy means the [][] (box characters) in the titles, I think that they are CR/LF being read incorrectly by mozilla/netscape (I get two boxes instead of a newline).


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 24, 2003, 07:17:51 am
White: Rainbow Worlds
Green: Homeworlds
Red: Something of importance, usually an item.

Sol is marked for the moonbase, and the Sa-Matra world is marked just because it was in the game's star generation code. I wonder if I should count the Slylandro destruct code as an item on this map? Or should I count the Burvixese homeworld as a homeworld? Note that I did so for the Androsynth.

I did end up removing a few useless entries from this, however. Namely Vela (since the circle makes hovering over Zeeman impossible), and Organon (since you never actually have to go there anyhow).

Originally I had all three circles flashing in such a way that you'd always be able to see one type, but never the other two. This was quickly changed to the current patterns due to some lag caused by all the animations at once. After all, rainbow worlds never have anything else on them, and only a few homeworlds have items to speak of.

Note to self: Add entry for Umgah Caster's location.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Death 999 on September 24, 2003, 07:27:30 pm
You haven't listed the egg cases as items... wait a moment... there they are!
Why do you still have some of the items blinking?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 24, 2003, 08:16:34 pm
All the item locations blink. I did that because items tend to be at homeworlds, and I wouldn't want to obscure homeworld locations.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Death 999 on September 24, 2003, 09:33:12 pm
The blinking just acted weird some of the time, on Safari, that's all.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on September 25, 2003, 01:56:14 am
Update: Quasispace exits have been added. I've also framed the map and put toggle controls for every object on the map except stars. Every "type" of object has a checkbox to make all of that type visible, and you can individually toggle spheres of influence.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Chrispy on September 25, 2003, 02:02:38 am
nice. i like how u got it to flash between appropriate colors (item, homeworld)


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 03, 2003, 06:54:24 pm
*bump*

After a bit of a hiatus from this, I found some random inspiration. Using the script I built to generate the static hyperspace.html, I made a zoomable starmap. Once I can figure on a way to get it into the framed layout and be able to adjust the zoom, this map will be compatible with all the togglable images set for it except the spheres of influence.

On that note, I'd like to know if any of you know of a way to generate circles via javascript or some other method I can use in a webpage. If I cannot find a way at this, I'll just have to make circle images for every zoom level I intend to use. Obviously this is a pain, but one I'm willing to work with if necessary.

http://www.customc.net/cgi-bin/starmap.cgi?factor=2

The "factor=2" in the URL sets this to the size I had it when it was originally generated as html. This value can conceivably be set as high or as low as you like (use decimals, not fractions). Play with that variable and see what happens.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Spurk on October 03, 2003, 07:24:25 pm
Quote
On that note, I'd like to know if any of you know of a way to generate circles via javascript or some other method I can use in a webpage. If I cannot find a way at this, I'll just have to make circle images for every zoom level I intend to use. Obviously this is a pain, but one I'm willing to work with if necessary.

Using Javascript, you can scale an image quite easily. Just multiply the image width and height by whatever factor is necessary.

But I can't think of a way to do Javascript drawing like you describe.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on October 03, 2003, 08:21:50 pm
Maybe using vector graphics, but that would require people getting a plugin from adobe.  Probably better to resize images like Spurk suggests (although the images will be very grainy on high res).  

Flash of insight: You said you're using a perl script to generate an image... Is it possible to have each sphere of influence generated by the a script (it draws a basic gif of a circle, whose radius and color are determined by the URL parameters), and then use the perl script URL in the img tags?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 04, 2003, 12:02:31 am
I ended up using Javascript to at least generate circles. I even worked in a way to have the circles be dynamically created to the proper size and coordinates. When I invoke the circle drawing functions for each one within the page itself, it works fine and dandy. However if I try to get the checkboxes in the other frame to call those functions, it wipes out the entire map to draw the circle. (See index.html (http://www.customc.net/staff/sage/starmap/), using the Arilou checkbox)

So basically I'm stuck... :/


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Chrispy on October 04, 2003, 04:37:12 am
unless u fix it


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on October 04, 2003, 04:55:32 am
I seem to recall there being a way to force changes to a page using javascript.  I think the trick was to create the page from another frame but not to close() it.  Since it's technically still open, you can apply changes to the page without creating a new one.  I don't know how modern browsers would like this hack though (I remember it from the days of Netscape 3.x/4.x).


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: J on October 04, 2003, 06:29:02 pm
Excellent.
Thanks sage, that list of star types and colours is just what I needed.
Now hopefully I can get the SC2 map rendering in OpenGL :D

Should look fairly pretty with all the right colours in there.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 07, 2003, 12:21:33 pm
I have a complete database of mineral, biological and planetary data available, generated from the UQM source.  Let me know if you're interested.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Michael Martin on October 08, 2003, 12:27:14 am
Quote
I have a complete database of mineral, biological and planetary data available, generated from the UQM source.  Let me know if you're interested.


I wouldn't mind having them, but I'm more interested in how it was extracted from the source, and which parts of the source are responsible for which things.  It would make a good text file for our doc/devel tree.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Culture20 on October 08, 2003, 12:43:40 am
I'd be interested in seeing your changes to the source too.  I tried doing something similar earlier, but quickly gave up after looking through several source files.  I'm interested in making similar databases for alternate universes (different offsets for the star coordinates/ random seeds), and using the data from the "normal" universe to specify living conditions for the biologicals/creatures.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 08, 2003, 06:35:41 am
Culture20:  There were no changes to the source as such, just that the source was used to generate the planetary database.

Michael:  If you can point me to some other examples of your code documentation, I'll try and slap something together this weekend.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Michael Martin on October 08, 2003, 07:44:40 am
Quote
Michael:  If you can point me to some other examples of your code documentation, I'll try and slap something together this weekend.


http://cvs.sourceforge.net/viewcvs.py/sc2/sc2/doc/devel/ has our notes so far.

As you can see, they're pretty incomplete; we haven't been good about documenting stuff.

The graphics library (http://cvs.sourceforge.net/viewcvs.py/sc2/sc2/doc/devel/gfxlib?rev=1.3&content-type=text/vnd.viewcvs-markup) documentation is an example of more complete specs; the planet rotation code (http://cvs.sourceforge.net/viewcvs.py/sc2/sc2/doc/devel/planetrotate?rev=1.1&content-type=text/vnd.viewcvs-markup) is a much higher level of abstraction and thus shorter and easier to wrap one's mind around.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 08, 2003, 09:17:47 am
Interested indeed. Please email or link me at sage@customc.net.

I noticed there's a protected folder on your site called "uqm". Would that happen to be the location of the planetary database?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 11:04:43 am
Yep, both the database and the app that uses it, as posted in the discussion forum way back.  Never got any feedback on it so I discontinued development:

http://uqm.stack.nl/cgi-bin/yabb/YaBB.pl?board=Gendiscuss;action=display;num=1041003529;start=0#0


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 11:46:03 am
The database is now available in XML form at:

http://uqm.chumbucket.org/uqm_plandata.zip

The XML is basically a raw dump of the in-memory objects that calculate and store the planetery data.  As such, they're not easily human readable.

Good luck.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 11:49:08 am
Oh yeah, exceptional worlds (Rainbow Worlds, Homeworlds, Artifact Worlds, Shattered Worlds, etc), will not contain the correct planetary data.

This should be relatively simple to implement to whomever intends taking ownership of the database from this point on.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 09, 2003, 02:49:03 pm
Some errors I've noticed in this sheet. I checked Vega 1's entry against what was in the game, and here is what I found.

Mathematical Errors:
According to game, density = 1.32 (earth scale as I recall). This data says density = 105. If this is intended to be actual density, I could correct this if I knew what Earth's was.
Techtonics is 2 in sheet, and 3 in game.
Rotation period is 251 in sheet, and 1.60 in game.
Axial Tilt was a negative (though otherwise correct) value on Vega 2.

Missing Data:
All planets are listed as "BLUE_BODY"
Length of day
Planet type: Even having a number that references a table of types would be useful.

Unimportant Errors:
DistanceFromSun and DistanceFromParent are the same value. Not a big deal.
Density would be more correctly referred to as "Mass", but this is lkewise not a big deal, as I can label it as such when the time comes.

Most of the mathematical errors might be easy to fix with a script, which is how I intend to process this sheet anyhow. That is assuming I'm able to find the correlation between the correct values and the ones given in this sheet.

So, yeah...this is enough for me to be able to build a script to interpret and generate the planet data, at least, but I'll still need the missing data


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 03:28:09 pm
Quote
Some errors I've noticed in this sheet. I checked Vega 1's entry against what was in the game, and here is what I found.


Responses are from memory, so bear with me...

Quote
According to game, density = 1.32 (earth scale as I recall). This data says density = 105. If this is intended to be actual density, I could correct this if I knew what Earth's was.

The displayed density is vastly different to that which is used in the mineral/bio calc, and is largely meaningless.  The calc for the value can be found in scan.c

Quote
Techtonics is 2 in sheet, and 3 in game.

Tectonics, Weather and maybe a couple of other things are zero-based in the code, and one-based when displayed on the screen.  Essentially, add one to the value in the database.

Quote
Rotation period is 251 in sheet, and 1.60 in game.

Rotation period is displayed differently to the way it's calculated internally.  See scan.c for more detail.


Quote
Axial Tilt was a negative (though otherwise correct) value on Vega 2.

Axial Tilt is always displayed as an absolute value on the screen, but can be a negative in the code.

Quote
All planets are listed as "BLUE_BODY"

er, dunno.

Quote
Length of day

Again, this is calculated at the time it's displayed on screen, and is largely meaningless.  Calc can be found in scan.c

Quote
Planet type: Even having a number that references a table of types would be useful.

That should be there, as it's essential for determining minerals.  I'll check that and get back to you.

Quote
DistanceFromSun and DistanceFromParent are the same value. Not a big deal.

This is by design.  They're the same because the parent of a planet IS it's sun.  For a moon, DistanceFromParent will be a different value to DistanceFromSun.

Quote
Density would be more correctly referred to as "Mass", but this is lkewise not a big deal, as I can label it as such when the time comes.

*shrug* it's Density in the code, so it's Density in the database.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Krulle on October 09, 2003, 04:19:27 pm
Quote
Density would be more correctly referred to as "Mass", but this is lkewise not a big deal, as I can label it as such when the time comes.
As technician I must say that there is a big difference between mass and density.

Mass [kg] = Density [kg/(m^3)] * Volume(Size) [m^3]

The density is important to decide wether it is a gas-giant (like Jupiter, Saturn, Source, ...) or a (possibly very large) planet with a solid surface...

Edit: added units


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 04:39:46 pm
Sage: there's a new version of the database on my site that fixes the BLUE_BODY problem and includes the world type for each planet/moon.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 09, 2003, 05:04:40 pm
Weather and Techtonics may be zero based, but any time either of these should be 0 or 1 in the game, the value is put down here as 0, making it impossible for me to tell which it is supposed to be.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 05:10:49 pm
Use the source, Sage.  It's all there in scan.c

Tectonics is listed on the screen as "none" if the planet is a gas giant, otherwise it's the internal tectonics + 1.

If you find an exception to this rule, I'd be interested in hearing about it.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 09, 2003, 05:51:34 pm
Alright I see your point now.

Get this: Alpha Antilae 4c is listed in this data as a Pellucid World (purple), but in the game it's really a Treasure World (yellow). All the other information on it (with the exception of the minerals) is still accurate though.

If we're going to keep doing this we may want to establish real-time communications. If you like, grab one of my instant messenger screennames from my profile. I'd use the IRC channel for this purpose, but for some reason every IRC client I have refuses to work.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 09, 2003, 06:53:22 pm
Well spotted.

Another new version of the database has been uploaded to the site, fixing the bug that caused the anomaly.


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Michael Martin on October 10, 2003, 01:34:12 am
Special system data is added "by hand" in planets/gen*.c, based on flags in the starmap data (e.g., RAINBOW_DEFINED.)


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: meep-eep on October 10, 2003, 04:46:50 am
Not only added, also changed in some cases. For example the Slylandro home world: a planet is changed into a gas giant and then it is marked to have one moon, thereby changing the next planet into a moon (I think).


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Bwahaha on October 10, 2003, 08:11:52 am
Yep, and that's the main reason I didn't support it in the first iteration of the planetary database.  All of the special types are defined in code, rather than in an external configuration file.  
Makes it a pain in the bejesus to extract out.

I'd read somewhere that you're planning to externalise a lot of that type of data into XML files for 0.4.  Is that still on the cards?


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Michael Martin on October 10, 2003, 08:31:49 am
Quote
I'd read somewhere that you're planning to externalise a lot of that type of data into XML files for 0.4.  Is that still on the cards?


I don't know about for 0.4, but it's something we've kind of been looking at.  It's at about the lowest priority that still has a chance of being done...

If we don't do it by 1.0, it's one of the extensions that will probably be "inevitable" - but then, if we don't do it by 1.0, it's very likely that 1.0 will be a frozen version of the codebase that doesn't include code refactoring to make extensions possible - the proverbial "straight port".


Title: Re: Insane Undertaking: Hyperspace Image Map
Post by: Sage on October 15, 2003, 09:51:55 pm
Though I've remained quiet, I've done a lot of changing to this starmap. As of a few days ago I switched the output of my script to SVG, which will require a plugin (http://www.adobe.com/svg/viewer/install/main.html) from Adobe to view. This change has reaped some benefits and drawbacks.

Benefits:
Much smaller output file = faster download/rendering.
A much more "elegant" (as Bwahaha put it) interface.
Not so much clunky and slow javascript interfering with load times. In particular I now no longer need an image preloader script in this version.

Drawbacks:
Scrollbars are nonfunctional. Best bet is to "pan" the image, the method for which relies on which platform you're on.
Some browsers don't know what to do with this plugin (I'm aware that Opera doesn't at least, there's likely more). It's safe to assume this plugin will work for "major" browsers best.
It seems that I can't call javascript in an embedded svg file from across frames. This can potentially be fixed but it will take time.

My server is unable to parse svg output, but thanks to Bwahaha's help, I was able to secure some webspace to host this project on. The starmap (sans frames) can be viewed at http://uqm.chumbucket.org/starmap.cgi.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on November 01, 2003, 02:30:24 pm
Update: I've squashed a bug that displayed the map incorrectly (without the working controls). So now all the nifty stuff like the fuel calculator and sphere of influence controls are now showing. I've also put together a very alpha solar system viewer. To activate it, double click on any star, then from there follow the links to see planet data.

It should be known that in it's current incarnation there is some mismatched data (like a Gas Giant with a tectonics rating, among many others), and almost all planets orbitting a supergiant star will have several incorrect values. These of course will be addressed as I begin work on the graphical version of the solar system viewer.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Chad on November 03, 2003, 07:25:32 pm
Sage-  That is totally awesome!   :o  Please finish this!


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Bwahaha on November 04, 2003, 06:53:06 pm
As a result of Sage's feedback (and constant pestering), the planetary database that serves as the source for the online starmap has gone through quite a few revisions, including the fixing of the supergiant bug mentioned a couple of posts above.

While the exceptional data (rainbow worlds, etc) STILL hasn't been included, thanks to my lazy efforts, the data is now in pretty good shape.  Anybody who's interested can grab the latest XML version (in all it's 670k-zipped, 14mb-when-uncompressed glory) at:

http://uqm.chumbucket.org/uqm_plandata.zip

There's also a cut-down CSV version available, that doesn't go into quite as much detail and is significantly easier to parse:

http://uqm.chumbucket.org/uqm_csv.zip


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Culture20 on November 04, 2003, 07:45:44 pm
I finally downloaded an SVG viewer for a windows box and your map looks great!.  Unfortunately, there aren't any SVG viewers that work with up to date linux browsers (mozilla's built in SVG is a little unusable, and adobe's SVG viewer only seems to work in pre-1.3 mozilla).


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on November 08, 2003, 06:36:45 pm
Yet another update: I've added in a Quasispace fuel calculation and portal display. My brain's a bit mucked up from all the coding I just did, so instead of explaining what it does, I'll give a step by step on how to use it.

1) Load the map (http://uqm.chumbucket.org/).
2) Activate the checkbox toward the bottom right labelled "Use Quasispace".
3) Click on any star. This will set that as your starting point.
4) Move your mouse to another star or any point in space.

As you are moving you'll see a fuel and distance indicator from the star you're at to wherever the cursor is. When it becomes cheaper to use quasispace to reach the destination, these numbers will turn green, and a minimap will appear showing the nearest portal to your destination. There will also be another course path in green layed out from the portal exit to your destination

This is essentially how the fuel calculation has always worked, save for the second step. Hopefully people will find this function useful.

There's also been a significant refinement to the planetary database. All the generated data (not the special worlds, though) that I'm aware of is accurate.

EDIT: Hence forth, every stable version of the starmap will be compressed. This compressed version (http://uqm.chumbucket.org/) is a mere 29k (259k uncompressed), so it should make the load for dialuppers that much lighter.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Rib Rdb on November 09, 2003, 12:36:40 am
Quote
Yet another update: I've added in a Quasispace fuel calculation and portal display.


I've been thinking that it would be cool to add something like this to the game, maybe a new tech item you can buy from the Melnorme. It could keep track of which portals you've been through, then have the autopilot automatically choose the fastest route.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Bwahaha on November 09, 2003, 10:38:42 am
I've already written one of these, albeit as something you "automagically" get, but was waiting for the 1.0 release before distributing it.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Death 999 on November 10, 2003, 08:33:00 pm
One slight gap is that you can't calculate the distance between arbitrary points -- it has to be star to star. No prob, just noting it.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: JSB on November 25, 2003, 06:30:12 pm
Hey Sage, the map displays all the numbers to me in a font that highly resembles the old Scandinavian runic alphabet.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on November 26, 2003, 12:31:44 am
That's possibly due to the fact that I have no font specified in this version. When I get the fonts from UQM itself figured out I'm going to replace the text with some UQM fonts. That should keep everything in it nice and consistant.

Update: The solar system viewer now displays planets, orbital paths, and (uncolored) suns. There is some zooming functionality as well but it does not zoom in as far as being able to see moons (yet). Data for individual planets won't show up again until a later revision, though at the rate I'm working it shouldn't take too long to get there.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on December 09, 2003, 05:39:25 pm
Update: Solar system and planet/moon displays are complete. There are temporary controls in place on the solar system view to zoom in/out as appropriate. In an effort to save a little work, I'm not writing an svg planet data display. And no, still no special worlds, but it's very close now.

The next big step will be to write a search function, as well as set all of this in a functional layout. Then I'll be done! Woohoo!

Wish me luck.

EDIT: Upon entering the front page of the site, a script will run checking for the presence of the SVG plugin. If it is absent, you will be prompted to install it. Once installation is complete you will be taken back to the front page.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Bwahaha on December 10, 2003, 04:19:45 pm
Actually, as I'm officially on holidays from Friday, and the laptop is *not* coming with me, the special world data won't be appearing now until late January.

The data is there, but not really useable.  If anybody wants to volunteer for transforming it from it's current, very raw form to something Sage can work with, PM me and we can work something out.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on March 17, 2004, 06:09:04 pm
Several updates to report:

- The most significant change comes in the form of an extreme overhaul and unification of all these scripts. Originally, this database was built on several interlinked scripts. Now I've converted it into a single script with a modular design (much like YaBB) allowing me a lot more flexibility (since I can use the same variables and functions in all of these scripts). Everything* that you see coming from the database is generated in by a single unified script.
- A navigation frame has been added, which should make getting out of a star system a lot simpler.
· I've added a rudimentary search function. Currently it allows you to specify a star (note: using a built-in autocomplete, to simplify matters) and a distance, and it will display the names of (and links to) every star within that radius. This feature will be expanded soon to include some extensive searching options.

Much of this is merely backend stuff, but now that I have things a bit better organized it'll be a lot easier to add new features.

* The one notable exception to "everything" is the compressed hyperspace map, which is viewed by default.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on August 07, 2005, 09:51:31 am
It's been a long time since I've done anything with this project. Sometime recently I was (somehow) inspired to work on this after so long. I've managed to make a few significant improvements to it.

Recent Changes:
 - Migrating several of the statistics and controls from the SVG map to the HTML frames (which are much easier to program and modify than SVG)
 - The Sphere of Influence controls now include a mouseover feature. Hovering over a checkbox for a race will highlight that race's sphere on the starmap, to increase visiblity of certain insignificant spheres.
 - A frame on the bottom which shows relevant math data for a given selection. (Star location, distance, fuel use, etc.)

Planned Features:
 - Completely removing the need for the blue bar to the right of the SVG starmap. This will become feasible once I can fix the Quasispace Display function to work with the new HTML interface.
 - A way to input star name/coordinates to highlight that location (or a course) on a map.
 - Updating the searching feature with something similar to the above.
 - Somehow figuring out a way to generate the proper data for the special worlds so that I can have a complete database!

Note: I know this is techinically double posting, but it has been over a year since the last addition to this thread! :P


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: meep-eep on August 07, 2005, 02:48:55 pm
- Somehow figuring out a way to generate the proper data for the special worlds so that I can have a complete database!
What data are you looking for exactly? I've recently improved the planet dumping functionality in UQM which should make it really easy to get whatever you want. As a test, I've got here a list of the value of the Mineral and Bio per planet/moon. If you really wanted to, you could even have the size of each deposit.

Btw, has anyone been able to get this to work on Linux (with Opera)? I get a black popup from the Adobe SVG viewer with a title "Adobe SVG Viewer End User License Agreement", but there's nothing in the popup (no text, no "I agree" button), and the plugin space itself remains equally black.



Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on August 08, 2005, 06:01:42 am
The data I have on planets was generated for me, and as such I have no real idea of how to go about generating them myself. The information I have is formatted like so:

Code:
I,Planets,CONSTELLATIONINDEX,PREFIXNAMEINDEX,XPOSITION,YPOSITION,BODYCOLOR,PLANETNUMBER,MOONNUMBER,WORLDTYPE,DISTANCEFROMSUN,
DISTANCEFROMPARENT,SURFACETEMPERATURE,DENSITY,PLANETRADIUS,ROTATIONPERIOD,SURFACEGRAVITY,AXIALTILT,TECTONICS,WEATHER,
ATMOSPHERICDENSITY,LIFECHANCE,SATELLITEBIO,SATELLITEMINERAL,MINERALCOMMON,MINERALCORROSIVE,MINERALBASEMETAL,MINERALNOBLE,
MINERALRAREEARTH,MINERALPRECIOUS,MINERALRADIOACTIVE,MINERALEXOTIC

Note: The first two values ("I" and "Planets") serve no function to my code.

Here are the values I have for Beta Lyrae:

Code:
D,Planets,93,2,-675,-675,Green,1,0,Iodine World,954,954,-212,63,93,257,58,-26,5,2,12,-40,0,126,0,63,0,0,0,0,0,0
D,Planets,93,2,-813,-1520,Blue,2,0,Gas Giant,1723,1723,-228,21,910,103,191,8,2,7,65535,-1,0,0,0,0,0,0,0,0,0,0
D,Planets,93,2,-2316,-703,Green,3,0,Gas Giant,2420,2420,-235,21,1029,151,216,37,1,7,65535,-1,0,0,0,0,0,0,0,0,0,0
D,Planets,93,2,2494,1666,Purple,4,0,Super Dense World,3000,3000,-239,197,34,173,66,-19,6,2,75,60,0,78,0,0,26,0,0,0,0,0
D,Planets,93,2,-5576,1691,Red,5,0,Ruby World,5827,5827,-249,58,96,221,55,23,0,0,0,-1040,0,850,0,0,0,0,0,0,0,34
D,Planets,93,2,-7,34,Purple,2,1,Purple World,1723,35,-228,59,33,272,19,25,1,0,0,-1100,0,0,0,0,0,0,0,0,0,0
D,Planets,93,2,54,-6,Red,2,2,Dust World,1723,55,-228,61,33,209,20,-10,1,1,10,-10,0,120,0,0,40,0,0,0,0,0
D,Planets,93,2,-8,-75,Purple,2,3,Chrondite World,1723,75,-228,103,28,224,28,-9,4,0,0,-1145,0,74,74,0,0,0,0,0,0,0
D,Planets,93,2,-53,-79,Purple,2,4,Super Dense World,1723,95,-228,206,32,213,65,-4,7,2,97,60,0,144,0,0,48,0,0,0,0,0
D,Planets,93,2,-55,5,Purple,3,1,Purple World,2420,55,-235,61,27,255,16,5,1,0,0,-1100,0,204,0,0,68,0,0,0,0,0
D,Planets,93,2,47,57,White,3,2,Selenic World,2420,75,-235,60,26,266,15,-2,1,0,0,-1100,0,159,0,0,53,0,0,0,0,0
D,Planets,93,2,93,-19,Orange,3,3,Metal World,2420,95,-235,143,36,265,51,11,3,2,109,60,0,676,0,31,152,0,0,9,13,0

While it would certainly be nice to have the exact locations of the minerals on a given planet, I really think that doing such a thing might be more work than I could handle. The perfectionist in me would also want to try replicating the planet spinning view, despite the fact that I don't have an inkling of how I could accomplish it.

Edited on 08-12-05 for readability.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: meep-eep on August 10, 2005, 06:48:03 pm
Mineral locations is not as constant as the other variables. They depend on the size of the planet surface window. Iirc, in UQM it is the same as on the PC version, while it it different on the 3DO.
If we have graphics packs, they may be different again.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: meep-eep on August 13, 2005, 07:12:17 pm
Apparently Opera itself is able to display SVG, without plugins. The problem is that you're using the non-standard "<embed>" tag.
The standard defined alternative for that is "<object>".
If you were to replace your '<embed src="file.svg">' by '<object data="file.svg>"', then it should work on Opera, while it should still work with other standard-complient browsers.
(The standard I'm talking about is HTML 4.01 btw).

Edit: apparently <embed> has been deprecated since HTML 4.0.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: HaJo on February 27, 2006, 12:54:28 am
Yet another update: I've added in a Quasispace fuel calculation and portal display
1) Load the map (http://uqm.chumbucket.org/).
Hence forth, every stable version of the starmap will be compressed.
This compressed version (http://uqm.chumbucket.org/) is a mere 29k

The download-link does not work, and the map-CGI gives errors, like
* "XML Parsing Error: not well-formed  Location: http://uqm.chumbucket.org/image/starmap.svgz"
* Error: Star name not found!

Has this project been moved / archived somewhere else ?

-HaJo


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: JHGuitarFreak on February 27, 2006, 02:44:36 am
You might wanna get the adobe SVG viewer...

nice revive by the way  ;)


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: JHGuitarFreak on February 28, 2006, 12:02:39 am
is there any way to download this so i can use it offline?

i've tried a web spider, but it aint catching everything  :-\

theres gotta be more than 50 meg's of data for that thing, unless all those pics are really compressed good.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on September 26, 2006, 05:44:14 am
Kohr-Ah Death: Sorry for the slow response. I've not checked this forum in some time. The pages that display all the planet views are generated at the time you request the page. The only preset graphics are those that I didn't make myself (basically anything from SC2 itself). I wouldn't even want to contemplate how big these would be if they were in a static JPG or GIF format. But science fiction has taught me that the answer is probably 42.

Since I'm writing a message here anyhow, I thought I'd just mention that I've taken a copy of the current codebase to my personal machine. The "stable" version of the database will remain where it is, but I have a "current" version availible on http://seijin.ath.cx, with updates on an irregular basis.

One thing I'm taking a long hard look at is making this compatible with as many browsers as possible. Unfortunately this will require redoing the vast majority of the JavaScript currently in use. I now understand the wisdom of a sane, logical order and standards compliance when doing any sort of programming, and this entire project has shown me just how much of a pain it is to redo code because of short-sightedness.


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: stshores24 on September 28, 2006, 09:07:33 pm
Wow. I just discovered your map and am suitably impressed. I wish Adobe would support Firefox with it, but I can gladly jump over the IE (shudder) for such a wonderful tool. Thanks!  ;D


Title: Re: UQM Hyperspace Map/Planetary Database Project
Post by: Sage on September 29, 2006, 04:16:21 am
The bleeding edge version at http://seijin.ath.cx/cgi-bin/uqm/ is actually making decent progress at compatibility with Firefox and Opera. So far I've managed to at least display the SVG elements, though the Javascript itself is working only partially in either of these browsers.

I've also figured out a way to output the normally SVG parts as either GIF or PNG (I could do JPEG too, but the quality loss is too horrible to bear). The current version will only do this for the Hyperspace map. I just have to get around to making this for the Quasispace and Interplanetary views. My plan for this is to have a "backup" interface in case someone's browser is unable to render SVG. I have yet to implement this fully, but you can have a look at the hyperspace map at these two links:

PNG: http://seijin.ath.cx/cgi-bin/uqm/?cmd=hyperspace&type=png&zoom=.5&sphere=1&rainbow=1&quasi=1&homeworld=1&quest=1&quasi_map=1
GIF: http://seijin.ath.cx/cgi-bin/uqm/?cmd=hyperspace&type=gif&zoom=.5&sphere=1&rainbow=1&quasi=1&homeworld=1&quest=1&quasi_map=1

The value set by "zoom=" can be adjusted to anything between .5 and 8.

All the parameters set to 1 can technically be set to anything, but removing them will cause the indicated aspect of the map to vanish. Later on I'll be making individually toggled spheres; this is just a temporary solution while I try to tackle more important matters with this script.

Again, there is no interface to make this "easy" to use yet. That is for future upgrades. Right now my highest priority is reorganizing and cleaning up this mess I've made.