The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 06:05:29 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  UQM stars/races relocation mod?
« previous next »
Pages: 1 2 3 [4] Print
Author Topic: UQM stars/races relocation mod?  (Read 17411 times)
logarithm
Zebranky food
*
Offline Offline

Gender: Male
Posts: 32



View Profile
Re: UQM stars/races relocation mod?
« Reply #45 on: December 27, 2015, 10:31:45 pm »

Integrated tools for solving collisions of stars/constellations (while making layout). Finished layouting for 4 steps: fleets, important stars, important constellations, semi-important stars. As layouting may fail in some very rare random cases, introduced fail-tolerance and reset-retry logics. Added some more benchmarking tools.
Although I tried to be careful with memory allocation (malloc/free), benchmark showed a memory leak, and on Windows I can't localize it. The tools below conflicts with src/libs/compiler.h and other libs.
Code:
#include <windows.h>
#include <psapi.h>

size_t getPeakRSS() {
    PROCESS_MEMORY_COUNTERS info;
GetProcessMemoryInfo( GetCurrentProcess( ), &info, sizeof(info) );
size_t peak = (size_t)info.PeakWorkingSetSize;
}
size_t getCurrentRSS(){
    PROCESS_MEMORY_COUNTERS info;
GetProcessMemoryInfo( GetCurrentProcess( ), &info, sizeof(info) );
return (size_t)info.WorkingSetSize;
}
The failed benchmark consists of 1000 attempts to layout 4 steps: fleets, important stars, important constellations, semi-important stars. It fails on 350th-400th step with out-of-memory.
Otherwise works pretty fine - reset-retry frequency is near 0.1%, average generation time is below 1 second. I'll leave it like that for now, as I don't think it will ever cause any problem to gamer - the starmap generation is a very rare thing gamer will do.

Next tasks are
(A) generation of non-important constellations
(B) generation of non-important solo-stars and constellation-stars
(C) random distribution of names to constellations/stars

For (A) and (B) the main challenge will be to make distribution even. Probably gonna reuse layouting-via-springs, but under different sauce now. Another idea was to separate starmap into big amount of overlapping windows, and to solve distribution-evenness problem in scope of each window. It's like an indexing strategy (one of), used in some DBs.
As for pretty constellation patterns... well, I would do that if someone cooperated, and made a simple txt file containing all constellations profiles. Each profile should contain a bunch of coordinates for each star in it, centered on constellation centre as (0,0). Quite easy to do programmatically btw, - even Excel would be enough to do it... Otherwise, I don't think I'll bother with that, until first complete version of fully working relocation mod is released.
« Last Edit: December 27, 2015, 10:47:41 pm by logarithm » Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3872


We did. You did. Yes we can. No.


View Profile
Re: UQM stars/races relocation mod?
« Reply #46 on: December 28, 2015, 05:25:36 pm »

One put the Syreen homeworld on top of the Burvix, which seems a little odd. I guess that's just a matter of adding a new but very loose constraint.
Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #47 on: December 28, 2015, 08:38:52 pm »

For #9, just force the Syreen location to be named Betelgeuse regardless of where it ends up being placed.

For #10, in theory you can probably just force the constellation containing the beast to have the same name as in the original game. I don't recall if the constellation actually formed a snake-beast-like shape though.
Logged
logarithm
Zebranky food
*
Offline Offline

Gender: Male
Posts: 32



View Profile
Re: UQM stars/races relocation mod?
« Reply #48 on: December 29, 2015, 10:54:10 pm »

One put the Syreen homeworld on top of the Burvix, which seems a little odd. I guess that's just a matter of adding a new but very loose constraint.
Chronology:
(1) Burvix lives in Arcturus, communicates with Druuge and Utwig.
(2) Syreen lives in Beta Copernicus I.
(3) Syreen homeworld got destroyed by Mycon.
(4) Burvix got destroyed by Kohrah.
(5) Syreen submits to Ur-Quan, in exchange they find a world where Syreen can live - Betelgeuse.

Thus there's almost no assumptions about where Syreens should be, and who they should neighbour (except, that they should neighbou Ur-Quans), - because they got new home just very recently. Spathi may know about it from insider info channels, because they became part of hierarchy. And this home don't even need to be near human space (according to dialogues)... Although, I don't think Syreen's battle/intelligence value is high for player. Thus placing them too far from Sol might make them just worthless - so probably need the Sol <-> Syreen assumption anyway... Not sure.
And please, correct me if I'm wrong.
For #9, just force the Syreen location to be named Betelgeuse regardless of where it ends up being placed.

For #10, in theory you can probably just force the constellation containing the beast to have the same name as in the original game. I don't recall if the constellation actually formed a snake-beast-like shape though.
For #9 - I could do either that, or just remove Bugsquirt stuff and let Spathies name real location. Another solution (really funny) would be to give a funny second name to every star/constellation, and depending what new name for Syreen home is randomly chosen - put fun into Spathi mouth. If I was a school teacher, it would be quite easy - I would give a task to each student to invent funny names for 2-3 stars...  Grin

For #10 - not sure I remember correctly, - it wasn't anything about name. The Lyncis constellation actually looks like a snake which ate something big. One way to solve this would be changing dialogue (excluding hint about snake and elephant).

If I keep Syreen in Betelgeuse and Vux Beast in snake-like constell - it just would kill the idea of relocation and randomization.
« Last Edit: December 29, 2015, 11:06:53 pm by logarithm » Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #49 on: December 30, 2015, 12:09:57 am »

Another solution (really funny) would be to give a funny second name to every star/constellation, and depending what new name for Syreen home is randomly chosen - put fun into Spathi mouth.
Could be a lot of work, but I think this would be a good thing to aim for. Of course this does mean that you can't use the original voice acting, though.

For #10 - not sure I remember correctly, - it wasn't anything about name. The Lyncis constellation actually looks like a snake which ate something big. One way to solve this would be changing dialogue (excluding hint about snake and elephant).
It would be nice to be able to keep that hint, though... but I guess the approach you suggested for Spathi won't work here. I suppose if it's too difficult to keep the hint valid, then it's better to remove it altogether than leave it in.
Logged
logarithm
Zebranky food
*
Offline Offline

Gender: Male
Posts: 32



View Profile
Re: UQM stars/races relocation mod?
« Reply #50 on: December 31, 2015, 01:46:37 am »

CelticMinstrel

Actually, making fun names from at least 5-10 of solo stars might be enough. All solo stars are below. If anyone wishes to contribute - welcome - think of 5-10 funny star-names.))
(click to show/hide)
And if I ever get to constellation templates, we can similarly think of 5-10 constellation hints.
« Last Edit: December 31, 2015, 12:01:03 pm by logarithm » Logged
logarithm
Zebranky food
*
Offline Offline

Gender: Male
Posts: 32



View Profile
Re: UQM stars/races relocation mod?
« Reply #51 on: January 03, 2016, 09:32:05 pm »

Solved non-important constellations placement. Made an XY-overlapping-windowing indexer, which solves tasks of empty spaces detection and even distribution of constellations. Also applied collision resolver (which is also used near graph-springs-layouter) to make sure constellations don't get too close to each other.
(click to show/hide)

Non-important solo stars will most probably be treated like single-star-constellations, which means that placement of non-important solo stars is 95% done.

Also completed naming for constellations. And for solo-stars will use same solution, which makes it ~80% done.

Overall progress:
V (1) Initialization of initial fleets
V (2) Initialization of important stars
V (3) Initialization of important constellations
V (4) Initialization of semi-important stars
V (5) Initialization of non-important constellations
TODO (6) Initialization of non-important constellation-stars
90% (7) Initialization of non-important solo-stars
TODO (8 ) Initialization of quasi-space locations
90% (9) Initialization of important coordinates
V (10) Compilation of all previous steps results into a starmap

Resolved 1 memory leak, but it's still not healthy. Benchmark still dies on 300th-400th iteration.
Quasi space locations placement will be solved using logics similar to constellations placement - using combination of XY-overlapping-windowing indexer and collisions solver.
All hardest tasks are solved, and now just need to apply the tools made, and integrate this whole stuff into game initialization logics. As for the latter, I was also thinking about making a sub-menu for "New Game" -> "Start with original locations" or "Start with randomized locations".

Quite tired by now, as I spent sick leave (from work) and holidays to implement hardest stuff. I have 1 week of vacation left now, and hope to release first good version by end of it - starting from next week things will go very slow again.
« Last Edit: January 03, 2016, 09:38:34 pm by logarithm » Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #52 on: January 06, 2016, 11:28:41 pm »

Actually, making fun names from at least 5-10 of solo stars might be enough. All solo stars are below. If anyone wishes to contribute - welcome - think of 5-10 funny star-names.))

Okay, here goes. Some of these might not be all that great. I personally think Groombridge shouldn't be included, though; I see it as a unique location.

  • Betelgeuse -> BugSquirt (included for completeness)
  • Fomalhaut -> FrontHouse
  • Bellatrix -> BrandyTrail (or something similar)
  • Aldebaran -> AndyWine
  • Almagest -> AntGrunt

I think it's easier to think of fun names for the longer ones, at least for me. Maybe someone else can come up with some fun names for some of the shorter ones.
Logged
Krulle
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1112


*Hurghi*! Krulle is *spitting* again!


View Profile
Re: UQM stars/races relocation mod?
« Reply #53 on: January 07, 2016, 01:36:54 pm »

Depending on what you want to do, you could also randomly select a topic, and rename the moved solo stars for this topic.
Thus naming the reallocated solo stars all like
Oregano, Tomato, Pepperoni, Pollo, Salami, ...
or
Reggae, Ska, Folk, Ondo, Orchestra,....

(click to show/hide)

Just an idea, and please kill me for suggesting more work.

BTW: Thanks, I love to see a project which does something and thus keeps this community alive.

I also agree that Groombridge is special, and I still hope to see an implementation of the chat FF and PR3 wanted to implement.
Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #54 on: January 08, 2016, 04:23:21 am »

I also agree that Groombridge is special, and I still hope to see an implementation of the chat FF and PR3 wanted to implement.
It's also the point of the rainbow world arrow.
Logged
logarithm
Zebranky food
*
Offline Offline

Gender: Male
Posts: 32



View Profile
Re: UQM stars/races relocation mod?
« Reply #55 on: January 08, 2016, 08:35:23 am »

Well, all stars having importance index will remain having original content. Including Rainbow-containing and Melnorme-containing stars. Do you want to keep the "Groombridge" name for that Rainbow-containing star? What's so special about this name?  Smiley
Oh, btw, I've decided to make Sirius always be near Sol. I guess everybody knows, that Sirius is the closest neighbour star.

Thanks for supporting words and those contributions. Sometimes it's really important to see, that I'm not alone in my endeavour.

I was hoping to do the final sprint this week, but failed bumping (like silly) on the underestimated complexity of gluing stars with constellations, while avoiding collisions, and making all this random and look nicely. I'll have to backup to the slow pace, where I have much more time to think things over-and-over again, before implementing them at weekends.
Besides I spent vacation for rest, and hanged on the new UnderRail game, which is quite nice.

I'm currently thinking about 2 alternative paths of doing things.

(click to show/hide)

(click to show/hide)

Maybe there is an easier way to make things look nice?, but I can't see it.
« Last Edit: January 08, 2016, 09:00:05 am by logarithm » Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #56 on: January 09, 2016, 07:13:30 am »

Well, all stars having importance index will remain having original content. Including Rainbow-containing and Melnorme-containing stars. Do you want to keep the "Groombridge" name for that Rainbow-containing star? What's so special about this name?  Smiley
I have no idea if there's any special significance to the name "Groombridge".

Oh, btw, I've decided to make Sirius always be near Sol. I guess everybody knows, that Sirius is the closest neighbour star.
If you mean in real life, Alpha Centauri is actually a bit closer than Sirius. However, real life doesn't matter since it's explicitly established that the constellations don't correspond to real-life ones. If you mean because everyone already knows it's the closest star in the SC2 universe, then sure, that seems fine to me.

One serious problem I'll need to solve here, is avoiding having Supox HW to accidently appear out of Supox SoI.
One solution to this would be altering the position of the SoI to ensure the homeworld is within it. That could even be applied to all races, except the Ilwrath whose homeworld can (should?) be outside their SoI.

Also, while we're talking about constellations, one of the ones in/near Orz space (Pavonis, I think?) is missing an Alpha, as I recall. Are you going to retain that oddity? (There are two ways to do it - either pick a random constellation near Orz SoI and delete the Alpha, or don't place an Alpha Pavonis) Mind you, I don't think it's terribly important, and I don't recall it ever being referenced in-game, either.

(3) Avoiding collision of 2 constellations can't be solved by simply putting 2 points (for constellation centres) and circles around them, and checking, that circles don't intersect, or bumping them away, if they intersect. I guess I'll have to do the following: for each constellation pick all nearby constellation, and make sure all it's stars are far enough away from stars of all nearby constellations. Bumping away might include constellation rotation, but I don't see a proper mathematical solution for this yet - how to determine if constellation rotation is better than moving it away. Probably, should use a specific version of springs-based layouter here again... Making it respect problems of (2) makes it more complex.
Rather than a bounding circle, you could maybe use a bounding polygon, or simply ensure that no lines between the stars of one constellation cross any of the lines between the stars of the other constellation. In the latter case I think the lines to use would be specified by the constellation's shape - you wouldn't need to check every possible line between the stars of each constellation.

Even though I say "simply", it's probably harder than it sounds.
Logged
Krulle
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1112


*Hurghi*! Krulle is *spitting* again!


View Profile
Re: UQM stars/races relocation mod?
« Reply #57 on: January 12, 2016, 02:03:42 pm »

Also, while we're talking about constellations, one of the ones in/near Orz space (Pavonis, I think?) is missing an Alpha, as I recall. Are you going to retain that oddity? (There are two ways to do it - either pick a random constellation near Orz SoI and delete the Alpha, or don't place an Alpha Pavonis) Mind you, I don't think it's terribly important, and I don't recall it ever being referenced in-game, either.
Pavonis is the star constelletaion where you can find an engine.

In Orz/Androsynth space there's the circular Vulpeculae constellation around a Giant, Alpha Vulpeculae, so that's not the one you're searching.

I haven't found a constellation without an "Alpha-Star"....
( http://mooses.nl/uqm/wip/js-starmap/ )

edit: http://www.resonant.org/games/sc2/0/resource.pdf , page 9 following shows all systems, sorted by constellation name. No "Alpha" seems to be missing, but I may have missed it myself when scrolling through the document.
« Last Edit: January 12, 2016, 02:28:17 pm by Krulle » Logged
CelticMinstrel
Enlightened
*****
Offline Offline

Posts: 522



View Profile
Re: UQM stars/races relocation mod?
« Reply #58 on: January 12, 2016, 10:55:27 pm »

I looked over the wiki. It's Corvi I was thinking of, not Pavonis.
Logged
Krulle
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1112


*Hurghi*! Krulle is *spitting* again!


View Profile
Re: UQM stars/races relocation mod?
« Reply #59 on: January 14, 2016, 12:16:32 pm »

Stupid me.

The list I linked does include Corvi Alpha, but without a list of ressources. Instead it reads: "(Victim of interdimensional fatigue)".
Somehow I always missed that one constellation is without an "alpha".

So, near Slylandro, and not near Orz...

It may well be that I attributed it to the border of the map. Or never actually paid attention to this.
Logged
Pages: 1 2 3 [4] 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!