It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
Tarvis: Here's the link to the extraxted inflight MIDI files and my notes There are only a couple bits I can't quite figure out what causes them. Read through my text files and see if you have any ideas that I'm missing. For example, "FL" seems like the obvious failure track, yet I often seem to hear it even when the mission is going just fine.

Also I haven't gleaned every loop table yet, there's one for every prefix and most of them are quite long...

As for picking a transition at random, I think the game might have a priority system or some kind of queue for them. I'll have to play around with that later and see how it happens. It could just be that anything that happens while an "event" bit is playing is simply ignored
Hey, that is awesome!
Don't bother to manually logging every transition. What we need is a program to do that for us, as it will anyway have to do it in the final "game", when importing the original resources.
Please, tell me in which file did you find this, and if you know, what is the format structure of that file, and where do the transition tables appear. As you say, there is probably some chance value and priority value associated with every fragment and/or track.

In respect to the FL track, if I am not mistaken, X-Wing doesn't detect when a mission is failed (one of the main problems for new players), so you can end in a walking-dead scenario that you can't win and you will never know until the debriefing.
I don't know the reason of that, but I guess they didn't find an easy way to know when the objectives couldn't be completed anymore. Who knows.
In any case I bet Michael Land, or whoever wrote the music for this game, made a track for the case of failure, and then the devs told him that their engine could not report a failure. Instead of trashing this track, the musician added it to the main battle loop, only with a low probability of being used because it sounds quite "sad" compared to the rest.
Post edited November 11, 2014 by Azrapse
My greater goal (although ridiculously far fetched at this stage) is to develop a general X-Wing Saga-like engine, able to run all games in the series in the same way that ScummVM allows to run multiple graphical adventures under the same main native program.
We all know the differences between the different games in this series (laser speed, turning physics, whether missions have multiple sectors or just one, multiplayer support...). I'd say, it could be possible to reduce those differences to just some background settings, and alter the mission parser, and the "concourse" part for every game. Or would any of you see imposible that LucasArts would have come out with a single pack of the whole series, where we could run one single game and there choose which career we want to take: Rebel or Imperial. Then the Balance of Power campagins would be just another Tour of Duty or TIE Fighter campaign. I don't see any reason why that couldn't happen. We could have had that in XWA.
That'd definitely be the dream feature. Get it to load all the installed games at once. Ideally that'd allow you to use XWA's models in the older games so they all get a facelift (especially with XWAU). There could be different versions of the same ships to handle differences between games (e.g. Missile Boat and TIE Defenders being nerfed in XvT and XWA).

The physics part could be reduced to simply map properties (in the same way that Doom engine ports reconcile the differences between the various games with a MAPINFO lump containing important settings).

Having the ability to easily add new ships would be great, too. XWA itself has a limited number of slots and things like mines and warheads use some too. Being able to have thousands of slots would allow to put all the variants, prequel ships, "uglies", and other extended universe oddities in the game.
The "FL" tracks kick in when your craft's shields are down.
That's also why you hear it a lot in TIE Fighter's demo:
http://youtu.be/-TuOcgH0kmo

You can also hear EM31 when you destroy the frigate Anvil in ToD 4, Mission 5.

RB21-24 only kick in when you personally destroy an enemy fighter.

However, I've never heard RB31 before.
Post edited November 11, 2014 by FekLeyrTarg
avatar
Azrapse: the 1996 Mac PowerPC edition cannot be run at a decent speed on modern x86_64 machines
I was literally on my way to try and get X-Wing running in Sheepshaver with System 7 (just having read up on Mac emulators) when I noticed this thread, but judging by your post this will not be worth it? Is the problem the efficiency of the emulators / complexity of emulating Mac hardware? Have you tried it?
avatar
FekLeyrTarg: The "FL" tracks kick in when your craft's shields are down.
That's also why you hear it a lot in TIE Fighter's demo:
http://youtu.be/-TuOcgH0kmo

You can also hear EM31 when you destroy the frigate Anvil in ToD 4, Mission 5.

RB21-24 only kick in when you personally destroy an enemy fighter.

However, I've never heard RB31 before.
Oh! Okay, that makes sense. I guess it's supposed to be a sort of "desparate battle" song, except it also plays if you drain your shields to go fast. Now I know why I heard it a lot.

Maybe we can find a use for RB31, then, like playing it when the mission is completed. The regular victory song is always overridden by battle music and one problem I have with X-Wing is it's hard to tell exactly when you're able to go home, since the "Misison Complete" radio message is always buffered behind a bunch of other ones.

I was thinking that maybe super important messages like that can be drawn on the screen above the crosshair instead of at the bottom of the screen, so it isn't obscured by any other random messages

As for the music format: they are GMIDI, shared by Dark Forces, and the inflight music is in GMIDI.LFD.

GMIDI is very similar to regular MIDI, all you have to do is delete a certain amount of bytes at the beginning, which is probably extra information the game uses (most likely things like: how long the MIDI is, time signature, how many bars long it is, etc). Easiest way to do it is open the file up in Notepad++, and delete everything before "MThd" which is the standard MIDI format descriptor, and save it. It does leave a few empty bars at the beginning, I don't know if that's intentional or not. But for the purposes of recording them for a music pack they can be removed with no problem

As for writing a program to extract the loop tables, I guess I can do that. I'll make it save into a more human readable format. My idea is that BFLIGHT.OVL can be replaced with a collection of human readable files that represent the same sort of data, instead of trying to figure out at what offsets the relevant parts of BFLIGHT are and all that to load from it. This is the approach OpenXcom takes, instead of loading the hardcoded values from the original files.

In the same vein, we should be able to support .zip files as an alternative to .LFDs so that you don't need to use ancient programs to make new resource containers. My vote is they could be named .ZFDs so that end users don't get confused and try to extract things from them
Post edited November 12, 2014 by Tarvis
avatar
Azrapse: the 1996 Mac PowerPC edition cannot be run at a decent speed on modern x86_64 machines
avatar
sndwv: I was literally on my way to try and get X-Wing running in Sheepshaver with System 7 (just having read up on Mac emulators) when I noticed this thread, but judging by your post this will not be worth it? Is the problem the efficiency of the emulators / complexity of emulating Mac hardware? Have you tried it?
Emulation is okay when the emulated processor architecture is either very similar to the one of the real machine, or when it is really really old and it's speed is a couple of orders of magnitude smaller than the real one.
For example, there is no problem nowadays to emulate a GameBoy, ZX Spectrum or even a PSX. However the PowerPC processor of the Macs in the 90s is neither primitive enough so that our modern processors can run them fluently by simple brute force, neither they were similar at all to our x86_64 machines. Not only they use a different instruction set, they also have a different endianess (that is how all data is stored in memory and registers).
I guess non real-time applications, like office tools or CAD could be still usable with emulators like that Rosetta use to do. But not if the application has a lot of frames per second, like a game does.

There would be a hope on Just-In-Time or Ahead-Of-Time precompiling. That is, translating the original code to x86_64 beforehand, and then run it, like Dolphin emulator does with the Wii. But that is quite advanced feature and I believe there is not enough mass of old PowerPc Mac enthusiasts to make that happen.
In fact, I see it so remote chance of it happening that it led me to start this attempt to rebuild the engine.
I'm pretty sure the emulation isn't the problem, it's that the X-Wing games on Mac use an API called QuickDraw 3D (probably Apple's DirectDraw equivalent) and emulators as they are now only have extremely basic implementation of it

Other Mac games (like System Shock and Descent) which are of about the same graphical caliber run just fine on SheepSaver because they don't use QuickDraw.

The problem is not that hardware can't handle it, it's just that nobody has bothered to implement it yet. And SheepSaver's only development is a bugfix every now and then, so it's not likely to change unless someone was interested in getting down to it.
Post edited November 12, 2014 by Tarvis
avatar
FekLeyrTarg: The "FL" tracks kick in when your craft's shields are down.
That's also why you hear it a lot in TIE Fighter's demo:
http://youtu.be/-TuOcgH0kmo
Thanks! Maybe we could change it to trigger only when a hit leads to the loss of the shields, not when the shields deplete by lack of power or power transfer.

avatar
FekLeyrTarg: You can also hear EM31 when you destroy the frigate Anvil in ToD 4, Mission 5.
EM seems to stand for "Enemy" so I guess it is something like
EM01: Enemy craft arrives.
EM11: Enemy capital ship arrives.
EM21: One of our craft is down.
EM31: One of our capital ships is down.

Where the first number is the kind of message and the second number is a posible variation for the same kind of message.
avatar
FekLeyrTarg: However, I've never heard RB31 before.
Following the same reasoning as with EM, I'd say the RB sounds match exactly the same pattern.
RB01: Rebel craft arrives.
RB11: Rebel capital ship arrives.
RB21-RB23: You downed an enemy craft. (4 variations)
RB31: You downed an enemy capital ship. (not used? Doesn't happen often because you rarely do it all by yourself?)

RB31 does sound familiar to me, but not from inside the game. I wonder if they have used it along with the Totally Games logo in some game in the series.

avatar
Tarvis: Maybe we can find a use for RB31, then, like playing it when the mission is completed. The regular victory song is always overridden by battle music and one problem I have with X-Wing is it's hard to tell exactly when you're able to go home, since the "Misison Complete" radio message is always buffered behind a bunch of other ones.
I was planning to show the objective list in a similar way to how XvT does it. In that case, the status of the mission is always known to be Unresolved, Failed or Successful.
Also, we can change the priorities of the messages and how the messages are actually shown.
I don't really like the lower single text bar that X-Wing and TIE Fighter have. With nowadays resolutions, we can afford a translucent message log like that in XvT and XWA. I'm not sure how overlays like those work with Oculus Rift, though. If it proves to be visually annoying, we could move it to a secondary screen on the cockpit dashboard.


avatar
Tarvis: I was thinking that maybe super important messages like that can be drawn on the screen above the crosshair instead of at the bottom of the screen, so it isn't obscured by any other random messages
My idea was something like that. The message appears halfways between the crosshair and the top of the screen, to avoid interfering with aiming, at a bigger font size and opaque color. Then after a couple of seconds it slides up to the message log were the last 4 or 5 messages are listed in a smaller, translucent font.

The mission objectives could be listed to the right or left of the screen, at smaller font and translucent, not to drag much attention. X-Wing doesn't have secondary or bonus objectives, so the list shouldn't be too big and bulky.

avatar
Tarvis: As for the music format: they are GMIDI, shared by Dark Forces, and the inflight music is in GMIDI.LFD.

GMIDI is very similar to regular MIDI, all you have to do is delete a certain amount of bytes at the beginning, which is probably extra information the game uses (most likely things like: how long the MIDI is, time signature, how many bars long it is, etc). Easiest way to do it is open the file up in Notepad++, and delete everything before "MThd" which is the standard MIDI format descriptor, and save it. It does leave a few empty bars at the beginning, I don't know if that's intentional or not. But for the purposes of recording them for a music pack they can be removed with no problem
I've got a MIDI synth running in Unity to play the music as it is right now. The digitalized music pack is something in the future. The MIDI music should be now or as soon as possible. So I need the XWVM program to be able to extract it to an usable form, as the music is copyrighted and we shouldn't distrubute it with XWVM.
I'm still researching this MIDI synth thing. It is currently playing the fragments that you sent to us at a too high tempo, but it is configurable, so I need to check how to fix that. I also need to find out how to skip the silent period at the beginning. Problem is that I know nothing about the MIDI format, and about music in general. :) I'll see what I get.

It also has support for custom soundfonts, so we could arrange a good sound font that makes the X-Wing MIDI music sound decent and include it with XWVM. It shouldn't be too big if we can strip out the unused instrument samples.

If someone with an expensive set of sound samples, like the guy that re-orchestrated TIE Fighter's music, would be in to pass all the MIDI fragments into good sounding wave files, then I guess we could distribute these digitalized music as a music pack? I don't think we would be breaking any copyright there if we are just using the original MIDIs as sheet music for something totally hand made by us?

avatar
Tarvis: As for writing a program to extract the loop tables, I guess I can do that. I'll make it save into a more human readable format. My idea is that BFLIGHT.OVL can be replaced with a collection of human readable files that represent the same sort of data, instead of trying to figure out at what offsets the relevant parts of BFLIGHT are and all that to load from it. This is the approach OpenXcom takes, instead of loading the hardcoded values from the original files.
You have a good point on not needing to decipher BFLIGHT.OVL everytime the game launches. It is enough for us to find the exact data at development time, and then the game should use an editable format. XML or Json files inside ZIP files sounds pretty open and standard to me. Good point also on changing the extension of the zip files.

What I wanted to achieve is to get the exact graph of fragments for the iMuse system. Of the whole of it, not only the inflight part, if possible. The graph would be turned into a state machine, as I mentioned. So in whatever form we record that graph, it should also be computer readable. But I fear that manually creating such a file would turn you crazy, mate. We need either a program to do a thorough dump of it to XML, or add such functionality to the XWVM itself.

Also we should attempt and find out as much as possible about the parameters that the game uses for the ship and game object stats, and they reside in BFLIGHT.OVL also.
We cannot just guess the speed of ships, for example, because most missions are balanced depending on the particular stats of everything in the game. If we accidentally make Shuttles faster or slower than they should be, it could lead to broken missions.
I guess we could also extract those stats manually using one of the several X-Wing ship editors that were available, then noting them down and recording them in XML files. Yes, I guess that makes sense. Still, I think it would be more exact to get them extracted from the original file by an automated routine.

avatar
Gaerzi: The physics part could be reduced to simply map properties (in the same way that Doom engine ports reconcile the differences between the various games with a MAPINFO lump containing important settings).

Having the ability to easily add new ships would be great, too. XWA itself has a limited number of slots and things like mines and warheads use some too. Being able to have thousands of slots would allow to put all the variants, prequel ships, "uglies", and other extended universe oddities in the game.
The original missions use an index-based list of ships. So for example, ship type 19 is a B-Wing, and ship type 1 is an X-Wing. We could add an unlimited amount of ships to that list, but then custom missions that used to replace old ships with new ones would need to be rewritten to account for the new indices of every ship.
For the future, it would be better to create a new mission file format that doesn't use a index-based look up table for these things, and instead use some other unique identifier like "xwing" or "bwing" instead of numbers. All of this is totally possible but, for now, I think it's better if we focus on having the original assortment of ships working. :)
Post edited November 12, 2014 by Azrapse
avatar
Azrapse: What is your opinion/interest on something like this?
My opinion is: wow!!

My interest is: yes please!! If you can pull this off, that would be nothing short of fucking brilliant (pardon my french)
Okay, I have the full inflight loop table deciphered. I have narrowed the inflight music down to 9 states. Essentially, I noticed every table had 9 lines after it that had no definition name, and many had the same referenced name on the same line. So, the best explanation is that there are 9 States defined in order, and each State has a transition set for every possible other State it could have come from.

http://pastebin.com/iWkzvrJP

1 Calm 1 (CR)
2 Battle
3 Chase
4 Shields Down
5 Calm 2 (AX)
6 Deathstar
7 Victory/Entered Hyprspace
8 Training
9 Event Cue

Event Cue is further broken up into 9 events:

1 Enemy Arrival
2 Enemy Capship Arrival
3 Friendly/Player Shot Down
4 Friendly Capship Destroyed
5 Friendly Arrival
6 Friendly Capship Arrival
7 You Shot Down Enemy
8 ? Enemy Capship Destroyed (still unconfirmed, perhaps it's for nuking the Death Star exhaust)
9 Training Lap Complete

4 and 8 are probably rarely heard because perhaps they are only set to play if YOU personally destroy the ship. I would argue that that's an oversight and should be made global, but it could be implemented either way.

I don't think the concourse music tracks are dynamically pieced together from many separate parts, but merely have a few alternate background tracks. I'll get started on that next.

As for the beginning silent measures, I can probably just have a program run through each file and remove them. They could be an artifact from an imperfect conversion, and not defined in the song piece itself.
Post edited November 12, 2014 by Tarvis
avatar
Azrapse: I've got a MIDI synth running in Unity to play the music as it is right now. The digitalized music pack is something in the future. The MIDI music should be now or as soon as possible. So I need the XWVM program to be able to extract it to an usable form, as the music is copyrighted and we shouldn't distrubute it with XWVM.
The installation program of the TIE Fighter Total Conversion for XWA has a function which extracts and converts the voice-overs from either CD-ROM versions of TIE Fighter. Perhabs it wouldn't hurt to ask them how they did it and do something similar to convert the MIDIs.
Post edited November 12, 2014 by FekLeyrTarg
By the way, I guess CR is short for "Cruising" (first entering a mission, with nothing happening yet), AX for "Anxiety" (a break from the battle, waiting for new enemies to arrive), and SU for "Success".
It makes sense, but the trick is to figure out the logic behind how the game chooses which one. Because I've heard CR halfway through missions, and others with AX right off the bat. It might have to do with the number of craft around or other such things.
Post edited November 12, 2014 by Tarvis
avatar
FekLeyrTarg: The installation program of the TIE Fighter Total Conversion for XWA has a function which extracts and converts the voice-overs from either CD-ROM versions of TIE Fighter. Perhabs it wouldn't hurt to ask them how they did it and do something similar to convert the MIDIs.
I didn't know they had adapted the TIE Figher MIDIs to the XWA digital music format.
I know the voice overs are encoded in Creative VOC format, with some peculiarities, but it wouldn't harm to ask. :)
avatar
Azrapse: I didn't know they had adapted the TIE Figher MIDIs to the XWA digital music format.
At least most of the concourse MIDIs were converted for XWA. The inflight ones haven't been yet.