Title: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 07, 2012, 07:53:21 pm Here's something I've been working on for a while: a Star Control 2 starmap, rendered and searchable in the browser!
You can try it out here (http://mooses.nl/uqm/wip/js-starmap/). The project is also on GitHub here (https://github.com/jorisvddonk/StarmapJS). Everything should be pretty self-explanatory. Use the search box to search for alien homeworlds, stars, or the location of devices. Click on a star to display some additional data about the planets orbiting that star (courtesy of Elestan's planetary database). Several star highlighters are available that highlight stars with a neat pulsating animation. Enjoy! Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: meep-eep on April 07, 2012, 08:23:56 pm Nice. Also the message for IE users. :P
(It works fine on Opera, btw.) Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Dezeer on April 08, 2012, 01:33:31 pm You should bring Vela in front of Zeeman.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 08, 2012, 11:01:24 pm You should bring Vela in front of Zeeman. Fixed.I've just made some updates that allow users to pan and zoom the starmap, like on Google Maps. Also added some performance improvements so that stuff doesn't have to be recomputed when recoloring the stars or showing/hiding sets of Spheres of Influence. Unfortunately, the panning doesn't appear to work on Firefox and Safari. Probably has to do with the way I load SVGPan. This change however means that IE8 and below are completely unsupported now. I recommend Chrome over FF as it seems to be quite a lot faster. Haven't tried Opera yet. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 09, 2012, 03:23:45 am I recommend Chrome Eww, Chrome. Chromium with bonus Google spyware, in other words. Nah, I think I'd rather use plain old Chromium. :P Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Elestan on April 09, 2012, 04:08:51 pm I've just made some updates that allow users to pan and zoom the starmap, like on Google Maps. I would suggest that when zooming, the size of the stars should remain constant, and just the distance between them should change. That way, you can zoom into tightly packed star clusters like Vulpeculae to see the individual stars more easily. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Valos Cor on April 10, 2012, 05:53:48 am I recommend Chrome Eww, Chrome. Chromium with bonus Google spyware, in other words. Nah, I think I'd rather use plain old Chromium. :P Megagun, you are awesome! The highlight feature is very useful. Coloring the stars by the amount of mineral or biodata? Very neat, thank you! Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 10, 2012, 05:09:06 pm I first downloaded Chrome when it was released. It has absolutely nothing except the browser and favorites (that's what it seemed like). Chrome was completely boring. Is it still like that? Chrome is really just Chromium repackaged with some tracking and built-in Flash. I'm not sure what you mean by "boring", though. Compared to Firefox, the only thing Chromium lacks (that I can think of) is the metric ton of add-ons Firefox has. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Lukipela on April 10, 2012, 07:28:17 pm As a firefox user I can't pan or zoom or anything, but I do think it is a very pretty map and nice work.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 10, 2012, 08:23:38 pm Just found a mistake on the map. It lists Beta Vulpeculae II as the Androsynth homeworld. The actual Androsynth homeworld is Eta Vulpeculae I.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: oldlaptop on April 10, 2012, 10:02:55 pm I'm not sure what you mean by "boring", though. Compared to Firefox, the only thing Chromium lacks (that I can think of) is the metric ton of add-ons Firefox has. This makes it boring. :P Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Defender on April 11, 2012, 05:28:22 pm How do I download this for offline use without a browser?
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 11, 2012, 07:25:23 pm How do I download this for offline use without a browser? I don't know about "without a browser", but you ought to be able to use it offline with a browser by just downloading the web page. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 11, 2012, 10:26:15 pm I would suggest that when zooming, the size of the stars should remain constant, and just the distance between them should change. That way, you can zoom into tightly packed star clusters like Vulpeculae to see the individual stars more easily. Good idea. I'll keep that in mind, but I'll probably do it in such a way that stars will still get bigger as you zoom in, only the rate at which they get bigger when you zoom in gets lower the more zoomed-in you are.As a firefox user I can't pan or zoom or anything, but I do think it is a very pretty map and nice work. Yep, that was a known issue. It has also been fixed.Just found a mistake on the map. It lists Beta Vulpeculae II as the Androsynth homeworld. The actual Androsynth homeworld is Eta Vulpeculae I. Whoops. Fixed.How do I download this for offline use without a browser? Grab a .zip off of the GitHub (https://github.com/jorisvddonk/StarmapJS) page or clone my repo, then open index.html in your favorite browser. This currently works just fine, because I don't make any XHR calls and all starmap data is static. I can't however guarantee that this method will continue to work in the future.EDIT: if you actually meant "without a browser": you can't. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Defender on April 12, 2012, 12:26:06 am I'm no that familiar with java, but I have a couple programs written in it that do not require a "browser" to work. They can be executed offline. Can this be adapted to this map so that it could be ran offline? A executable .jar file is what they are.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 12, 2012, 01:07:16 am I'm no that familiar with java, but I have a couple programs written in it that do not require a "browser" to work. They can be executed offline. Can this be adapted to this map so that it could be ran offline? A executable .jar file is what they are. It's in Javascript, not Java. The two are unrelated. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Defender on April 12, 2012, 02:11:46 am I see...oh well.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Death 999 on April 13, 2012, 04:50:20 am It's in Javascript, not Java. The two are unrelated. The family of programming languages is small and extremely incestuous, so that seems dubious. They are definitely not in the same nuclear family. I tried to form an analogy, but could not without descending into vulgarity. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 13, 2012, 05:05:16 am It's in Javascript, not Java. The two are unrelated. The family of programming languages is small and extremely incestuous, so that seems dubious. They are definitely not in the same nuclear family. I tried to form an analogy, but could not without descending into vulgarity. Well, that really depends on how you define "related". If you want to be extremely technical, you're related to the rats crawling around in New York by virtue of being a mammal, but that doesn't really say anything useful. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 13, 2012, 07:19:34 pm I would suggest that when zooming, the size of the stars should remain constant, and just the distance between them should change. That way, you can zoom into tightly packed star clusters like Vulpeculae to see the individual stars more easily. There, it should be easier now to zoom into tightly packed star clusters. The size doesn't exactly remain constant, though, because that just looks a tad too odd at extreme zoom levels.Also moved some of the styling out of the code and into CSS. Currently, only Spheres of Influence can be altered this way, though, but my eventual goal is to be able to style the complete starmap via CSS. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Death 999 on April 13, 2012, 09:03:18 pm Well, that really depends on how you define "related". If you want to be extremely technical, you're related to the rats crawling around in New York by virtue of being a mammal, but that doesn't really say anything useful. Oh, it's a good bit more related than THAT, though only syntactically. You can look at code segments and be able to rule out all languages except javascript and java. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 13, 2012, 09:40:18 pm Oh, it's a good bit more related than THAT, though only syntactically. You can look at code segments and be able to rule out all languages except javascript and java. Unfortunately, I have very little knowledge in Javascript and incomplete knowledge of Java, so I don't have a whole lot of ammunition to argue. However, since you're arguing syntax (which, sure, is kind of similar), let me point out that, just as both of these have syntax kind of similar to C, Game Maker's GML does too, but you wouldn't say GML is "related" to C, would you? Heck, GML also supports Pascal-like syntax, so is it "related" to Pascal, too? Just because a certain code segment can look identical in two languages doesn't mean the languages are similar at all, especially when you're talking about such a popular style of syntax as C-style. Of course, there's nothing inherently wrong about using syntax as a basis for how "related" two languages are, but how useful is it, really, when GML, a duck-typed, interpreted scripting language, can be called "related" to C++, a statically typed, compiled general-purpose language? Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 13, 2012, 10:44:33 pm Say, does anyone know how I could get a Project 6014-version of the Planetary Database? I'm assuming that it's an automated process largely based off of the game code, but I'm not awesome enough with C to be able to pull it off myself without pulling my hairs out a few times. Can anyone (Elestan?) enlighten me on this subject? It could make p6014-development a lot easier.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Death 999 on April 14, 2012, 01:24:00 am Okay. More to the point, Javascript's syntax was consciously modeled on Java, and not C... hence the name.
Maybe it would be fair to say that Javascript is Java's adopted kid, or something. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 14, 2012, 05:55:40 am Okay. More to the point, Javascript's syntax was consciously modeled on Java, and not C... hence the name. Well, GML's syntax was consciously modeled on both C and Pascal. Anyway, I'm not going to keep arguing over how the word "related" should be used, because it really is just a matter of perspective. But I don't think it was very wrong of me to call Java and Javascript "unrelated", because functionally, they really have absolutely nothing to do with one another (as you know). ;) Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Elestan on April 14, 2012, 05:57:10 am Say, does anyone know how I could get a Project 6014-version of the Planetary Database? I'm assuming that it's an automated process largely based off of the game code, but I'm not awesome enough with C to be able to pull it off myself without pulling my hairs out a few times. Can anyone (Elestan?) enlighten me on this subject? It could make p6014-development a lot easier. I can point you in the right direction, but I've got a bit too much going on right now to take it on myself. Take a look at the file uqmdebug.c. It's already got code in it to output a lot of the planetary data; I generated the database on the wiki by modding those routines to output CSV, and adding code to do a few more calculations. To trigger the data dump, you need to run a debug version of UQM, enable the magic debug key, and configure uqmdebug.c to do the dump when the debug key is pressed. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: storyyeller on April 15, 2012, 08:31:05 am What parts of the planet generation code did P6014 modify? If it's just the seed, then it might be worthwhile to rewrite the planet generation in Python or something. That way you can play with different seeds and see the results, without having to recompile UQM every time.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Quinarbre on April 15, 2012, 04:53:10 pm Say, does anyone know how I could get a Project 6014-version of the Planetary Database? I'm assuming that it's an automated process largely based off of the game code, but I'm not awesome enough with C to be able to pull it off myself without pulling my hairs out a few times. Can anyone (Elestan?) enlighten me on this subject? It could make p6014-development a lot easier. Elestan pretty much said it all. Watch your mail too, I'm going to post something that should answer both your and Cap. Trivates' queries. Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 15, 2012, 05:43:47 pm Hmm. I've tried getting a standard PlanetInfo file by making the debugHook point to DumpUniverseToFile, but whenever I press the Debug key the DumpUniverseToFile function doesn't get called at all, even though the other stuff that I have assigned to the Debug key does happen (I get new ships, see all Spheres of Influence, etc). I don't see anything related to the DumpUniverse thing at all either in stderr or stdout. With some printing to stderr/stdout I've determined that debugHook isn't ever not NULL (in starcon.c) but I don't know how to solve that little problem.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Elestan on April 15, 2012, 06:48:37 pm IIRC, threading issues require the dump to be delayed until your next hyperspace transition. Try hitting the debug key, and then leaving the star system.
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: Megagun on April 15, 2012, 06:59:42 pm Ah, that's it. Thanks. :)
Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: CelticMinstrel on April 17, 2012, 10:33:30 pm I'm not sure what you mean by "boring", though. Compared to Firefox, the only thing Chromium lacks (that I can think of) is the metric ton of add-ons Firefox has. That said, Chrome does have a lot of add-ons. :PYou can look at code segments and be able to rule out all languages except javascript and java. Eh... that seems kinda unlikely. Java and Javascript may have syntactic similarities, but unless the code segment is very simple it should generally be pretty obvious whether it's Java or Javascript.Title: Re: StarmapJS: an interactive Star Control 2 starmap. Post by: onpon4 on April 17, 2012, 11:01:20 pm That said, Chrome does have a lot of add-ons. :P Of course, since Chromium is literally exactly the same thing, all of these add-ons should work on Chromium as well. ;) |