Wcdx - Kilrathi Saga for modern Windows

@Goliath That article explains a lot. I already knew some basic stuff but now I know a little more. Still 320x200 is 16:10 and some things in game look wrong. I would like to see a remaster from EA with higher resolutions and textures but without adding fancy new effects and changing gameplay. That way game would look better but original look and feel would be preserved.
 
The problem is you are just looking at the pixel count to determine the aspect ratio which given today’s technologies is normal. However, with the way CRT’s worked you also had to worry about the Pixel Aspect Ratio, these days it is always 1:1 but that wasn’t true then you have to understand that the pixels are not squares, they are rectangular.

To calculate the display aspect ratio you need to take the Storage Aspect Ratio (16:10) then multiply it by the Pixel Aspect Ratio (1:1.2) to get the Display Aspect Ratio (16:12 i.e. 4:3)

CGA for example did 320x200 SAR with a PAR of 1:1.2 and a 640x200 SAR with a PAR of 1:2.4 but both end up with a DAR of 4:3

The designers themselves were working using the same configurations so any non-circular objects you think should be circular in old games are either (a) done on purpose or (b) a mistake by the artist (they are only human after all!) or (c) some issue that occurred when converting from a different resolution source to the ones used ingame.
 
Last edited:
@Goliath and @Skanks nailed it. The intended aspect ratio is absolutely 4:3; pixels were non-square back then, although a small portion of the artwork doesn't accurately reflect this. I addressed this earlier in the thread, with some additional analysis here, and my response from three years ago stands.
 
sorry for taking too long, Quake 2XP, WoW stuff and GZdoom drama happened
its working perfectly now

SM1_wcdx 2018-07-24 09-59-53.png SM1_wcdx 2018-07-24 10-00-12.png

also, after looking at the latest posts, would adding dynamic resolution scaling and filtering be possible? im asking this because of the latest GZD builds, which added an experimental BRZ filtering
 
Last edited:
Ah, good; I'll keep that change, then.

I do expect to add some kind of filter support, but I haven't thought that through very far yet. Do you have any specific requests?
 
its hard to know because differently from an FPS game with source ports like Doom(GZDoom), Quake 1 and 2(Quakespasm/GLquake, Q2XP/Q2Pro/Yamagi), Duke3d(Eduke32) and Blood(GDX), you can change the GL render by selecting the nearest option via source port console commands or autoexec, since wcdx uses DX9, idk.

WC on the other hand, it feels perfect as it is, but i fear that some filtering stuff can make the ships, letters or some sprites look like mass and ugly blurry blobs, reshade's native HQ4x makes it look bad, and when i tried to test xBRZ+adaptive sharpen and Gaussian blur to act as linear filter, what i said became true.

SM1_wcdx 2018-07-24 22-56-45.png SM1_wcdx 2018-07-24 23-03-57.png SM1_wcdx 2018-07-24 23-04-04.png
1st image has zero filtering, the later 2 uses it
 
Right, this is why I usually prefer the super-pixellated look for these low-resolution games. When the time comes, I'll look into the filter set that DOSBox provides.
 
here's a better example of how graf managed to put this to work on nowadays builds GZdoom
with and without filtering, but using Scaled(Nearest) + Hi-res sprites since gzd scales everything including fonts

Screenshot_Doom_20180724_090841.png Screenshot_Doom_20180725_115532.png Screenshot_Doom_20180725_115532.png Screenshot_Doom_20180725_120048.png

also the config

GZdoomconfig.png
 
That near-term update I mentioned earlier has arrived!

If you take a look at the first post in the thread, you'll find that I have uploaded a new file: wctools.zip. This contains a few tools that I've been tinkering on as I develop wcdx. The tools were originally written as I was figuring out the data formats used by the games and have been extremely useful for figuring out what the game is doing. They were originally just hastily thrown-together programs designed to verify my assumptions and make my life a little easier, so I wasn't planning to release them, but I think they may be of interest to the kind of people who still hang around a community-run game forum twenty-two years after Kilrathi Saga was released. I've been spending some time lately getting these ready for broader consumption, and here they are! As always, the source code is available on GitHub.

So what are they?
  • wcres: A tool for extracting individual resources from the data files in the GAMEDAT directory. Others have written this tool, and probably better, but I was interested in working it out for myself, and WCToolbox didn't exist at the time.
  • wcimg: A tool for converting sprite images to PNG format. You can use this with wcres to view any sprite in WC1 or WC2. These are the tools I used to extract the images for this post.
Both wcres and wcimg can perform bulk operations, extracting one or all resources from a given resource file. For example, to extract all of the sprite images from COCKPIT.VGA, use the following commands from within the GAMEDAT directory:

Code:
wcres -o COCKPIT -extract-all COCKPIT.VGA
wcimg -o COCKPIT -extract-all -prefix 0_ COCKPIT\0
wcimg -o COCKPIT -extract-all -prefix 1_ COCKPIT\1
wcimg -o COCKPIT -extract-all -prefix 2_ COCKPIT\2
...

wcimg
also has the ability to pack new images into a sprite resource, but I never got around to adding resource packing to wcres, so it's not very useful yet. I should probably work on that...

Last, but definitely not least:
  • wcjukebox: A music player for Kilrathi Saga! This tool can play back any music track from WC1 and WC2. Detailed instructions are in the tool; just run it with no arguments to read all about it.
wcjukebox plays back music from the STREAMS directory in exactly the same way that the games do. This includes support for looping playback and following transitions between tracks as indicated by the stream files. Tracks can be specified either by track number (which follows the numbering used internally by the game), or by providing "trigger" and "intensity" values to go with a specific stream file. These values are used by the game to control transitions between tracks without the game having to keep track of them too closely. (This is also the source of the infamous endlessly repeating victory music bug.) You can use the -show-tracks option to see how the games map track numbers to trigger and intensity values, or use the -show-triggers option for a complete list of triggers and intensities available for a given stream. With the -o option, you can save the music as a .wav file instead of listening to it.

Here's where I'd like your help:

I've put together this list of track names based on my vague recollection of where they turned up in the game. Some of these names are definitely wrong, while others are simply vague (such as "Combat 1" or "Mission 3"). If there's a canonical list of names somewhere, I'd love to update this list; otherwise, I'll happily take your best efforts at coming up with reasonable names for these!

Here's the list. Wing Commander 2 reused the same track numbers for all of the music that it had in common with Wing Commander 1, so there's only one list, which makes things easier. Additionally, there are four tracks in WC2 that don't have track numbers in the game (meaning you never heard them). One of these tracks is just a repetition of the jump music, but the others appear to be alternate orchestrations that George Oldziey was trying out before settling on the versions that actually appear in the game! I have listed them below as bonus tracks:

Wing Commander 1:
0 - Combat 1
1 - Combat 2
2 - Combat 3
3 - Combat 4
4 - Combat 5
5 - Combat 6
6 - Victorious combat
7 - Tragedy
8 - Dire straits
9 - Scratch one fighter
10 - Defeated fleeing enemy
11 - Wingman death
12 - Returning defeated
13 - Returning successful
14 - Returning jubilant
15 - Mission 1
16 - Mission 2
17 - Mission 3
18 - Mission 4
19 - OriginFX (actually, fanfare; the OriginFX music didn't make it into Kilrathi Saga, but this is the track number it would have had)
20 - Arcade Mission
21 - Arcade Victory
22 - Arcade Death
23 - Fanfare
24 - Halcyon's Office 1
25 - Briefing
26 - Briefing Dismissed
27 - Scramble
28 - Landing
29 - Damage Assessment
30 - Rec Room
31 - Eject
32 - Death
33 - Debriefing (successful)
34 - Debriefing (failed)
35 - Barracks
36 - Halcyon's Office / Briefing 2
37 - Medal of Honor
38 - Golden Sun
39 - Bronze/Silver Star
40 - Gold Star

Wing Commander 2:
41 - Prologue
42 - Torpedo lock
43 - Flight deck 1
44 - Angel
45 - Jazz 1
46 - Briefing
47 - Jump
48 - Prologue (quieter)
49 - Lounge 1
50 - Jazz 2
51 - Jazz 3
52 - Jazz 4
53 - Interlude 1
54 - Theme
55 - Bombing run
56 - Final Mission
57 - Fighting Thrakhath
58 - Kilrathi Theme
59 - Good Ending
60 - Lounge 2
61 - End Credits
62 - Interlude 2
63 - Jazz 5
64 - Flight Deck 2
65 - Sabotage

Wing Commander 2 Bonus Tracks:
66 - Defeated fleeing enemy (alternate)
67 - Wingman death (alternate)
68 - Unknown
69 - Jump (looping)
 
Last edited:
Thank you very much. :)

Regarding the bonus tracks:
These include two track written for the SpecOps Expansions but were somehow unused in the KS-Port.
One is the "Brig Theme" from SO1, the other is the "Jazz's Trial" one from the intro of SO2.
For some reason however, the "Khasra accuses Thrakath Theme" from the intro of SO1 is completely omitted from the KS' music streams.
 
@FekLeyrTarg: Ah, thanks. I'll look at reintegrating what I can when the time comes.

@mj78: With wcimg, you can create new sprite resources, but you can't put them in the game because wcres doesn't support packing resources into archives yet. I had in mind some tiny graphical fixes such as removing the extra pixel on Angel's portrait in the bar, which I may still do at some point. Higher-res sprites probably require some engine work, not just new resources.
 
@Stinger How much do you know about WC engine and its limits? You already explained to me asteroids fields bug and sprites. Do you have any plans for removing these limits someday?
 
Last edited:
I haven't really dug into the flight engine much. My focus has been on solving issues that were introduced in Kilrathi Saga. In the process, I sometimes stumble across one of these hard-coded limits.

For the object limit, the game has a number of static arrays all of the same length that refer to different aspects of these objects. Having seen some of these, it's reasonable to assume that there are more that I haven't seen. In order to increase the object limit, I'd have to track down all of these arrays, figure out their purpose, and for each one, replace all the code that references them to refer to some dynamically allocated storage instead, getting rid of hard-coded loop bounds and so forth. And I'd have to do that for six games. That's just not going to happen.

High-resolution sprites may be doable; replacing the images is not a problem, but I would need to see how the engine decides how to scale the images in order to increase the pixel density (rather than just drawing larger objects). If that is data-driven and a scale factor can be specified without modifying the executable, then higher resolution sprites should not be too much of a technical hurdle.

All that said, my focus here is not on modding the games; my patch exists to preserve the games in an authentic presentation, fixing bugs and technical issues that diminish the experience, and adding occasional quality-of-life enhancements that don't stray too far from the original design.
 
@Stinger I don't want to sound ungrateful for all the work that you've done but your patch has potential to be something more than a bugfix. I have huge respect for people like you who are willing to save classic games from oblivion. Removing some limits from engine is not going to harm authenticity of the game. It's not like you're going to add bunch of 3d effects or change gameplay in some way. How much time would you need to investigate that sprite thing?
 
If there's a canonical list of names somewhere, I'd love to update this list

I pulled all these names from the MUSIC.MID file itself:

0 - Regular Combat
1 - Being Tailed
2 - Tailing An Enemy
3 - Missle Tracking You
4 - You're Severly Damaged-Floundering
5 - Intense Combat
6 - Target Hit
7 - Ally Killed
8 - Your Wingman's been hit
9 - Enemy Ace Killed
10 - Overall Victory
11 - Overall Defeat
12 - Returning Defeated
13 - Returning Normal
14 - Returning Triumphant
15 - Flying to Dogfight
16 - Goal Line-Defending the Claw
17 - Strike Mission-Go Get 'Em
18 - Grim or Escort Mission
19 - Current
20 - Arcade Theme
21 - Arcade Victory
22 - Arcade Death
23 - Fanfare
24 - Briefing intro
25 - Briefing middle
26 - Briefing end
27 - Scramble through launch
28 - Landing
29 - Medium Damage Assessment
30 - Rec Room
31 - Eject-Immenent Rescue
32 - Funeral
33 - Debriefing-Successful
34 - Debriefing-Unsuccessful
35 - Barracks-Go To Sleep You Pilots
36 - Commander's Office
37 - Medal Ceremony-General
38 - Medal Ceremony-Purple Heart
39 - Minor Bravery
40 - Major Bravery
 
@UnnamedCharacter: Fantastic! Thanks much! I didn't think to check that for notes; the WC2 midis probably have something similar. I'm on vacation until next week and mostly far away from Internet access, so I can't do much until then, but I'll check that when I get the chance.

@mj78: I get what you're saying, and I appreciate the interest, but for every change I make, there must be enough of a benefit that it justifies the time I spend on it. This is much like the -100 points rule: Every feature starts out "in the hole" by 100 points, and needs to earn its place by being useful enough to a wide enough audience (or sometimes just me, because I'm the one doing the work) to justify the work that is to be spent on it, or to justify moving it ahead of other features. I don't want to leave fundamental issues unfixed while I go off chasing a modding feature that will see only limited use. That said, you're in luck: It looks like higher resolution sprites can work. Now you just need to find people interested in doing the work, or maybe even research how to do it yourself. As I mentioned before, there are lots of high-quality models available that can be used to render new sprites. I suggest reading through the linked thread if you'd like to learn how to get started.
 
so i decided to test wc2 with WCDX, and the cutscenes are inbetween "roadrunner fast" or "Breaking the speed force" with the ingame autopilot interlude being incredibly slow

wc1 shows no prolems besides the last past of the briefing screen still being a bit fast
 
Back
Top