The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
June 26, 2017, 02:04:44 pm
Home Help Search Login Register
News: UQM development migrated from Subversion to Git

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General Discussion (Moderators: Michael Martin, fossil)
| | |-+  Randomizing locations
« previous next »
Pages: [1] Print
Author Topic: Randomizing locations  (Read 278 times)
RenaissanceMan
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Randomizing locations
« on: January 28, 2017, 02:52:32 pm »

First post here.

So I was thinking... I know NOTHING about programming... but how hard would it be to take the source code and tweak it so that the starting locations of the various and items were somewhat randomized (or even pseudo-randomized) instead of fixed assets?  Think about how replay value and extra interest it would add for experienced players!  There would need to be a few parameters specified for story/logic reasons.  That I can think of off the top of my head (SPOILERS):

- Ur-Quan and Kohr-Ah space must heavily overlap
- other spheres of influence should not overlap
- Sun Device must be in Mycon space
- all Shattered Worlds must be in or near Mycon space
- Utwig Bomb must be in Utwig space (since they describe themselves as the "Stewards of the Bomb")
- Aqua Helix must be in Thraddash space (since a lot of dialogue refers to it being the cornerstone of their culture)
- Sa-Matra must be in Ur-Quan/Kohr-Ah space
- UNKNOWN star (natural Quasi-Space portal) must be in or near Arilou space
- Supox space should be near Utwig space
- Zoq-Fot-Pik space should be in or near Ur-Quan/Kohr-Ah space
- starting location (Sol) must not be within anyone else’s space (game would be near impossible if you started in the center of Ilwrath or Ur-Quan space)
- Rainbow Worlds should form a rough arrow (but orientation and obliquity are randomizable)

But within those parameters, there are countless possibilities for randomization, and thus for interesting new exploration.  Imagine having to search for the Sun Device, or for the Sa-Matra, or for the Utwig, all over again... and again... and again!

My point is that this doesn't SEEM like it should be that hard from a programming perspective... but maybe I'm wrong.  Can any programmers tell me if this is even within the realm of possibility?
Logged
Krulle
Enlightened
*****
Offline Offline

Gender: Male
Posts: 630


*Hurghi*! Krulle is *spitting* again!


View Profile
Re: Randomizing locations
« Reply #1 on: January 28, 2017, 03:11:53 pm »

Has been proposed before, but how will you handle the text by the internal help system (Melnorme)?


re: unknown star: you could place it anywhere, and move the Arilou space with it....
Logged
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 929



View Profile WWW
Re: Randomizing locations
« Reply #2 on: January 29, 2017, 12:52:24 am »

Randomizing an entire star system might not be too hard but still pretty difficult with the way the code is laid out.

The problem would be changing the dialog to match.
Logged

RenaissanceMan
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Randomizing locations
« Reply #3 on: January 29, 2017, 03:47:44 am »

I didn't mean randomizing all the star system data (i.e. the starmap, how many/what kind of planets each star has).  I was envisioning the map itself staying the same, but where things are ON the map being more randomized.

As for what Krulle said about the unknown star, yes, that's what I meant for all of the parameters I listed.  Arilou space could be anywhere on the map, but wherever it is, the UNKNOWN star needs to be in or near it.  Utwig space could be anywhere on the map, but wherever it is, the Bomb needs to be in it, etc.

How hard would all that be to program?

And yes, I did imagine that the dialogue tied to specific locations would be far harder (or at least more tedious) to change.  Like I said, I know nothing about programming, but I would imagine you would have to define the location of each race and object as a variable, then scour the dialogue for each and every reference to a specific geographic location and replace it with a string designed to point to the correct variable.  So, for example, instead of Tanaka telling you about observing a strange Mycon ceremony on Beta Brahe I, the code would say "a strange Mycon ceremony on %STRING1" or something like that, where %STRING1 is designed to point to where is assigned to the Mycon Sun Device in this iteration of the game.  I don't know how hard that would be... but it would certainly be tedious.

Again, is this even in the realm of possibility?  It seems like a couple of people could maybe do this over a summer or something...?  Am I crazy?
Logged
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 929



View Profile WWW
Re: Randomizing locations
« Reply #4 on: January 29, 2017, 08:43:55 am »

I was envisioning the map itself staying the same, but where things are ON the map being more randomized.

That's more or less what I was talking about.


As for what Krulle said about the unknown star, yes, that's what I meant for all of the parameters I listed.  Arilou space could be anywhere on the map, but wherever it is, the UNKNOWN star needs to be in or near it.  Utwig space could be anywhere on the map, but wherever it is, the Bomb needs to be in it, etc.

How hard would all that be to program?

And yes, I did imagine that the dialogue tied to specific locations would be far harder (or at least more tedious) to change.  Like I said, I know nothing about programming, but I would imagine you would have to define the location of each race and object as a variable, then scour the dialogue for each and every reference to a specific geographic location and replace it with a string designed to point to the correct variable.  So, for example, instead of Tanaka telling you about observing a strange Mycon ceremony on Beta Brahe I, the code would say "a strange Mycon ceremony on %STRING1" or something like that, where %STRING1 is designed to point to where is assigned to the Mycon Sun Device in this iteration of the game.  I don't know how hard that would be... but it would certainly be tedious.

Again, is this even in the realm of possibility?  It seems like a couple of people could maybe do this over a summer or something...?  Am I crazy?

The main problem you would run into is that you would need to make it so it would only randomize once and save that particular random seed in each save file so it could be recalled.

I don't particular know how the dialog works. From a cursory glance it looks as though it's structured in blocks of text and audio that gets called from a variable in the code.

Text file:

Code:
#(HOSTILE_SPACE_HELLO_1) thraddash-000.ogg
So, what's this? SNORT! An unknown alien species?
How wonderful! Someone new to fight!
We, the Thraddash of Culture Nineteen -- famous Ur-Quan Combat Thralls
know well the value of a good fight.
Either you win and prove your superiority...
SNORT! Or you lose and are vanquished.
If the vanquished is lucky, it may survive to learn an important lesson from its defeat.
This is the way of the Thraddash! We fight and learn and improve!
All other cultural schemes are inferior. This is a proven fact.
What have you to say before we begin combat?

Relevant code:

Code:
NumVisits = GET_GAME_STATE (THRADD_VISITS);
switch (NumVisits++)
{
case 0:
NPCPhrase (HOSTILE_SPACE_HELLO_1);
break;
case 1:
NPCPhrase (HOSTILE_SPACE_HELLO_2);
break;
case 2:
NPCPhrase (HOSTILE_SPACE_HELLO_3);
break;
case 3:
NPCPhrase (HOSTILE_SPACE_HELLO_4);
--NumVisits;
break;
}
SET_GAME_STATE (THRADD_VISITS, NumVisits);

This means that you would have to hard code the star location dialogue and split the old dialogue up into a minimum of 3 blocks to fit the new variable in where it would be mentioned.

At least that's the way I see it. There could be a much more elegant way to do it that I'm not picking up looking at the Thraddash dialogue blocks.
Logged

CelticMinstrel
*Smell* controller
****
Offline Offline

Posts: 428



View Profile
Re: Randomizing locations
« Reply #5 on: January 31, 2017, 06:43:53 am »

Wasn't there someone working on exactly this last year? Or at least something similar.
Logged
Death 999
Global Moderator
Enlightened
*****
Online Online

Gender: Male
Posts: 3457


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


View Profile
Re: Randomizing locations
« Reply #6 on: January 31, 2017, 08:15:14 pm »

Yes, there was.
Logged
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!