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

  Show Posts
Pages: [1]
1  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: September 21, 2005, 04:17:02 am
I've compiled under Visual Studio 2005 Beta 2, too.  It was a defnite P.I.T.A. to get it all tied together, but it is possible.  Once you've got the includes and lib directories all sorted out, you also need to get the update to the regex file that's in the CVS vault (note that it's tagged with something about "Visual Studio 2005 Beta 2").

I wrote an article in here a year ago, "Compiling the source for dummies", or something like that, which worked with the UQM 0.3 version, and it's a good starting point for how to get the latest one to compile (some changes required, though).
2  The Ur-Quan Masters Re-Release / Starbase Caf√© / Re: Escape Velocity on: September 20, 2005, 01:12:50 pm
Alright, I know this is late, but...

Grab yourself a MAC Emulator and then you're set.  I played Escape Velocity on my old PC for days, under what I *think* was Basilisk II.  It was ages ago, so I can't be certain what emulator. it was, but I think there are a few out there.

Also, I've heard of EV Nova and another EV game that's supposed to be coming out soon, or just recently came out.
3  The Ur-Quan Masters Re-Release / General UQM Discussion / Re: And the two greatest games in the world are.... on: September 20, 2005, 11:34:14 am
Hah!  I'd almost completely forgotten about that great old classic, Relentless.

1) SCII (and UQM) is definitely my first place.  Gamespot declared it one of the 10 best games of all time, btw.
2) X-Com: UFO Defense
MOO-2 was fantastic, too.. and Warcraft and Starcraft are still the best multiplayers I've seen (although I've been out of that scene for half a decade..)
4  The Ur-Quan Masters Re-Release / General UQM Discussion / Re: Palm Version on: September 20, 2005, 11:22:49 am
To add to my previous post in this thread... ¬  Apparently Palm OS6 is going implement OpenGL, and I also hear rumours about some sort of SDL support! ¬ http://www.answers.com/topic/superwaba reports a Palm SDL port already in existence. ¬ This is all just the result of some quick Internet searches, sorry if its more hype than fact.

-Richard
5  The Ur-Quan Masters Re-Release / Technical Issues / Latest news on content packs? on: September 20, 2005, 10:11:37 am
Hi all!

I posted a couple of articles here ages ago on how to add your own system to the game and put a trader in it.  (See Poking the Source Part 1: Add a new starsystem and Poking the Source Part 2: Adding a trader ) Over a year later I've come back and looked at some of the links posted in forum messages, and I'm constantly amazed at what an awesome job the Star Control community/fanbase has done at collecting game-related information and keeping the spirit going.

I'm wondering if any progress has been made in converting game files to the XML format, and creating tools/best practices for adding new game content (new systems, plot, devices, even races).

I apologize in advance if I'm duplicating someone else's question and missed the answer.

Thanks, and keep up the great work!

-Richard
6  The Ur-Quan Masters Re-Release / Technical Issues / Re: MINOR 'discrepancy' in starcon2.txt on: April 28, 2004, 02:54:31 am
Good points, thanks
7  The Ur-Quan Masters Re-Release / Technical Issues / Re: Poking the Source Part 1: Add a new starsystem on: April 27, 2004, 12:03:43 pm
Thanks for the response! ¬†Couldn't resolve irc.openprojects.net (problem w/ my DNS server??), but I managed to get into the #sc2 channel on Freenode.  Unfortunately, I think everyone was asleep (~3am EST).

Cheers!
8  The Ur-Quan Masters Re-Release / Technical Issues / Poking the Source Part 2: Adding a trader on: April 26, 2004, 10:58:32 pm
This is a continuation of a part 1 ‚Äď a post by (almost) the same name.

Now lets add a Melnorme trader to the system.  I'll call him Loneranger (just for naming constants).

In encount.h, there is an enumeration of several *_DEFINED constants.  I’ve added RK_LONERANGER_DEFINED.  Then I modified my entry in plandata.c to look like:

{{2000, 2000}, MAKE_STAR (DWARF_STAR, WHITE_BODY, -1), RK_LONERANGER_DEFINED, 0, 132}, /* Lonestar */

The following case is inserted into GenerateIP() in gendef.c:

case RK_LONERANGER_DEFINED:
     GenFunc = GenerateLonestar;
     break;


The following line is added near the bottom of encount.h:

extern void GenerateLoneranger (BYTE control);

The following game states are added to globdata.h, to store a pointer to info on the ‚Äúbattle group‚ÄĚ containing the lone ranger. ¬†Note that after this is done, you can't open old save games since adding more game state data changes the structure of the file slightly:

     ADD_GAME_STATE (LONERANGER_GRPOFFS0, 8)
     ADD_GAME_STATE (LONERANGER_GRPOFFS1, 8)
     ADD_GAME_STATE (LONERANGER_GRPOFFS2, 8)
     ADD_GAME_STATE (LONERANGER_GRPOFFS3, 8)


A new file called genlon.c is created, and its contents is below.  The GenerateLoneranger() function is called by GenerateIP() whenever we explore the RKVille system.  It "overrides" the default INIT_NPCs action, creating a "battle group" containing a trader.  (The underlying GenerateRandomIP() is still called after we're done our part).

#include "starcon.h"

static DWORD
GetLonerangerRef (void)
{
     BYTE b0, b1, b2, b3;
     b0 = GET_GAME_STATE (LONERANGER_GRPOFFS0);
     b1 = GET_GAME_STATE (LONERANGER_GRPOFFS1);
     b2 = GET_GAME_STATE (LONERANGER_GRPOFFS2);
     b3 = GET_GAME_STATE (LONERANGER_GRPOFFS3);
     
     return (MAKE_DWORD (MAKE_WORD (b0, b1), MAKE_WORD (b2, b3)));
}

static void
SetLonerangerRef (DWORD Ref)
{
     BYTE b0, b1, b2, b3;

     b0 = LOBYTE (LOWORD (Ref));
     b1 = HIBYTE (LOWORD (Ref));
     b2 = LOBYTE (HIWORD (Ref));
     b3 = HIBYTE (HIWORD (Ref));

     SET_GAME_STATE (LONERANGER_GRPOFFS0, b0);
     SET_GAME_STATE (LONERANGER_GRPOFFS1, b1);
     SET_GAME_STATE (LONERANGER_GRPOFFS2, b2);
     SET_GAME_STATE (LONERANGER_GRPOFFS3, b3);
}

void
GenerateLoneranger (BYTE control)
{
     switch (control)
     {
           case INIT_NPCS:      //override the NPC generation; create the NPC if not already there
                 GLOBAL (BattleGroupRef) = GetLonerangerRef ();
                 if (GLOBAL (BattleGroupRef) == 0)
                 {
                       CloneShipFragment (MELNORME_SHIP,
                                   &GLOBAL (npc_built_ship_q), 0);
                       GLOBAL (BattleGroupRef) = PutGroupInfo (~0L, 1);
                       SetLonerangerRef (GLOBAL (BattleGroupRef));
                 }
                 GenerateRandomIP (INIT_NPCS);      //call the default
                 break;
           default:      //generate other things as default
                 GenerateRandomIP (control);
                 break;
     }
}


For debugging, I added the following line in ExplorerSolarSys() of solarsys.c:

// enable for a debugging stoppoint on the custom system
if (CurStarDescPtr->Postfix == 132){
        CurStarDescPtr->Postfix = 132; // place breakpoint here
};


after:

        CurStarDescPtr = FindStar (0, &universe, 1, 1);

Questions?  Complaints?  Better way?  Feel free to post!
9  The Ur-Quan Masters Re-Release / Technical Issues / Poking the Source Part 1: Add a new starsystem on: April 26, 2004, 10:46:00 pm
I've been sifting through the source code, trying to figure out what would be involved in adding certain game content.  For step 1, I wanted to add a new star system.  (In step 2 next post, we’ll put a Melnorme trader in it.)  Here's how I accomplished it, for those interested.

PREAMBLE

Yes, I know this is off on a tangent from the goal for v1.0 of recreating the original game. ¬†But it‚Äôs interesting and neat, and I‚Äôm also curious if there‚Äôs been any consideration of how to handle ‚Äúcontent-addons‚ÄĚ. ¬†But before I start:

Big Question:  Does anyone have any documentation available on the mechanics of the game code? (aside from the file descriptions in Devel\Files)

I think everyone agrees we can all benefit from generating more documentation on the SC2 guts, and I don’t want to be repeating other people’s work ;-).

A word of warning here for newbies: ¬†The sc2 source code is a tightly-knight package and poking it can be dangerous, especially if you don‚Äôt know what you‚Äôre doing. ¬†What I‚Äôm describing in this post is a fair bit of poking, and I don‚Äôt claim to ‚Äúknow what I‚Äôm doing‚ÄĚ.

HERE WE GO

Alright, time to get our hands dirty. ¬†STAR_DESC starmap_array[] in plandata.c contains star data, including two useful fields: ¬†postfix name and alien presence. ¬†The latter is taken from encount.h. ¬†The former is the index of a record in LBM\starcon.txt. ¬†Each line starting with a "#'"and the following line(s) until the next # make up a record. ¬†Here's a simple formula: ¬†Line number = record index / 4 ‚Äď 1.

Question for gurus: There are two starcon.txt files.  Which one is actually used (or are both?).  From my brief testing, I only noticed changes in the \LBM to have effect.  Is this correct, or is there more to it?

So, to begin I inserted a line in the starmap_array[] definition in order to create a new white star at 200:200, near Rigel:

{{2000, 2000}, MAKE_STAR (DWARF_STAR, WHITE_BODY, -1), 0, 0, 132},

Note that the list is (and must be) sorted by y-coordinate. The final number is the index of the name for the star.  Since it is a byte, it can’t be > 255, so unfortunately you can’t simply insert a new string at the end of the starcon.txt file.  Instead, one puts the new record after the last existing star name in starcon.txt (which is probably better practice anyway).  So starting at line 525, my file looks like this:

#(Lentilis)
Lentilis


#(RKVille)
RKVille


#(UNKNOWN)
UNKNOWN


Note RKVille is record index 132. ¬†Technically, UNKNOWN counts as a star ‚Äúname‚ÄĚ, but I think it is there for safety in case a star isn‚Äôt found. ¬†Since we inserted rather than appended a record, you have to add 1 to each of the constants DEVICE_STRING_BASE through OPTION_STRING_BASE in globdata.h.

Also incremented the NUM_SOLAR_SYSTEMS constant in encount.h.

Okay, load up the game and voila, a fine new star system complete with planets and minerals vaguely corresponding to its size and color.  Neat!

From what I can tell, the planets, life, minerals, etc. for the system are created using a sequence of random numbers generated from a seed that is the X and Y location of the star.  This takes place in LoadSolarSys() (in solarsys.c) and DoPlanetaryAnalysis() (calc.c).

I made this post to 1) document what I’ve unraveled so far, and 2) avoid re-doing work someone else may have done.  I appreciate any feedback or comments from the gurus.  My real goal is to add a "lone ranger" character who hangs out in a far-off star system, kinda like a Melnorme trader.  Any tips from the pros on adding custom dialog, graphics, etc. are appreciated!

Keep an eye out for the next post, when we’ll add a Melnorme to the system.
10  The Ur-Quan Masters Re-Release / Technical Issues / MINOR 'discrepancy' in starcon2.txt on: April 26, 2004, 07:57:38 pm
In \lbm\starcon2.txt there is only one blank line after Praseo- dymium, rather than 2 like for everything else.  Just thought I'd point it out if anyone wants to "fix" it for the next release.

(Noticed because this was throwing off my record # calculations for later entries, that I was calculating based on line number)
11  The Ur-Quan Masters Re-Release / Technical Issues / Building the Source for Dummies on: April 23, 2004, 08:01:21 pm
After a long night spent poking, I finally managed to make a successful build (in Windows). ¬ Here's what I can remember doing; hopefully it helps any other future newbies. ¬ Note I used Visual Studio.NET, but previous versions of Visual C++ should work similarly.

1) Create a parent directory to hold everything. ¬ I'll call it UM.

2) Go to http://sc2.sourceforge.net/downloads.html. ¬ Download uqm-0.3-source.tgz. ¬ Unzip it. ¬ It should all be in a directory called UM\uqm-0.3.

3) Go to http://www.libsdl.org/download-1.2.php. ¬ Download SDL. ¬ You want the SDL-devel-1.2.7-VC6.zip file listed under Win32 under Development Libraries. ¬ Unzip. ¬ (Note: ¬ Before I saw this was there, I downloaded SDL-1.2.7.zip under Source Code. ¬ It comes with a file VisualC7.htm that describes how to build the DLL and LIB files required. ¬ You need to extract VisualC7.zip to the current directory.)

4) Get SDL-Image from http://www.libsdl.org/projects/SDL_image/. ¬ Sorry I didn't record the details of this part, but it was pretty straightforward.

5) Get ZLIb from http://www.gzip.org/zlib/. ¬ You want the "zlib compiled DLL".

6) Get "Ogg Vorbis Win32 SDK (1.0.1)" http://www.vorbis.com/download_win_1.0.1.psp from (under "Source Code / Development Tools"), and unzip to UM.

7) Install the OpenAL SDK, available at http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=45

8) Under UM\uqm-0.3\SRC\MSVC++, open UrQuanMasters.dsw. ¬ If using .NET, choose to convert. ¬ Then save all (yes, create a SLN file), and close .NET. ¬ Now open the .SLN file. ¬ Always open the .SLN file from here on, not the DSW or DSP ones, or changes you make to project settings may not get saved (at least they didn't for me).

8) Under Project/Properties/C/General, set Additional Include Directories to:
.;..;..\sc2code;..\sc2code\libs;..\sc2code\ships;"..\..\..\SDL-1.2.7\include";"..\..\..\SDL_image-1.2.3";"..\..\..\oggvorbis-win32sdk-1.0.1\include";..\..\..\zlib121\include;"C:\Program Files\OpenAL 1.0 Software Development Kit\include"

9) Under Project/Properties/Linker/General, set Additional Library Directories to:
"..\..\..\SDL-1.2.7\VisualC7\SDL\Debug";"..\..\..\SDL-1.2.7\VisualC7\SDLmain\Debug";"..\..\..\SDL_image-1.2.3\VisualC\Debug";"..\..\..\oggvorbis-win32sdk-1.0.1\lib";..\..\..\zlib121\lib;"C:\Program Files\OpenAL 1.0 Software Development Kit\libs"

10) Under Project/Properties/Linker/Input, Additional Dependancies, change zlib.lib to zdll.lib

11) Copy these files to the uqm-0.3 directory:  SDL.DLL, SDL_image.dll, JPEG.DLL, LIBPNG1.DLL, ZLIB.DLL (from SDL_image-1.2.3\VisualC\graphics\lib), ZLIB1.DLL, VORBISFILE.DLL, OGG.DLL, VORBIS.DLL. ¬ These can all be found somewhere under UM. ¬ This step is so the compiled .EXE will have the files in needs to run.

12) Copy uqm-0.3-content.zip (available at http://sc2.sourceforge.net/downloads.html or in your game directory if you first installed the released version) to uqm-0.3\content\packages. ¬ Optionally copy the uqm-0.3-voice.zip and uqm-0.3-3domusic.zip here too.

13) You should now be able to Build the project and Run the UM\uqm-0.3\uqmdebug.exe file.
Pages: [1]


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!