Changes since version 1.4 summarized:
* Lots of code cleanup
* Removed preservation of permissions when installing
* Replaced symlinks with copies
* Added .desktop file (from openSUSE package maintainer)
* Fixed mouse cursor position bug
* Removed a broken event from the Odeon mission
* Moved almost everything from the "data" directory to C source code
* Renamed "Original" difficulty to "Classic"
* Made Classic difficulty closer to the original
* Repositioned the logo and menu so that it's a bit higher
* Fixed the bug that caused mobile rays to shoot 5 green bullets
* Radio messages no longer suppress the "Target" text on the target arrow
* Friendly ships now have green arrows
* Sid, Phoebe, Ursula, and Kline now have special text on their target
arrows and shield displays
* Some dialog changes
* Plasma and rocket ammo is now much cheaper ($1)
* Fixed being able to get hurt after the mission is over
* Changed the Poswic mission target to Sid
* Removed the brief stop at the end of the Ellesh mission
* Kline now permitted to drop mines in all of his appearances
* Kline now switches primary weapons on Venus (like in prior appearances)
* Executive transport AI changed to "evasive"
* Experimental fighter now more likely to run away with powerful shots
* Renamed "Comms" to "Missions" and adjusted its look
* Removed instant teleportation between planets in Spirit
* Added small interception chance to Spirit
* Move very quickly between planets if no interception chance
* Now, portable save format
* Some tweaks to the Status screen
* Updated documentation
* Play sounds more quietly when further away
This prevents the weird effect where you hear a bunch of sounds of
majorly different volumes starting and stopping. If, for example, you
have several mines exploding nearby as well as several mines exploding
far away at the same time, you will hear the near ones and not the far
ones.
Several pointless lines have been removed, and I've added a workaround
to fix a segfault that was happening when Phoebe or Ursula were not
wingmates yet.
This format is actually portable, and there isn't a risk of it just
breaking any time the format is changed, since the version number
can be read independently of everything else.
I understand where this came from; obviously, this was how travel
originally worked, and then the version that made interceptions
possible was added later. But the thing is, making Spirit a special
case causes the interface to suddenly change on you, and that breaks
the flow of the game for no particular reason other than saving a
bit of time. So this special code which causes you to instantly
teleport in Spirit has now been removed. There is still no danger
of encountering interceptions, but I'll be changing that for all
non-Classic difficulties as well in another commit.
This oddity was caused by exactly what I thought it was caused by:
the code assumed that all bullets are created equal, and each bullet
had a 1 in 50 chance of causing the ship to run away. Well, the
charger inflicts so much damage that 50 shots would be a ridiculous
amount of damage for even the experimental fighter.
So now, except in Classic difficulty, whether or not it runs away
is determined partly by how much damage a weapon inflicts.
Specifically, the chance is now the damage of the bullet out of 150.
High-damage weapons are still a useful idea; after all, a 100 damage
weapon is 100 guaranteed damage, even if the fighter is likely to flee.
However, it gets rid of the skewed nature of the fleeing behavior and
prevents the charger from subverting the purpose of the behavior.
This is the last of the data files I wanted to remove.
This commit also includes some dialog changes.
I copied some of this code into a comment elsewhere, because I want
to use it as a reference when creating a new save format.
It's a modified version of the weapon switching: if Kline's health
is less than 1500, the spread shot replaces the concentrated triple
shot.
This also keeps Kline with bullet weapons during the third phase.
The main purpose of this change is to make Kline consistent. He now
switches his secondary weapon, and that's about it. The way it was
in the original, it started out much easier than previous encounters,
then it went to slightly easier than previous encounters, then
something completely unlike previous encounters, and finally
something noticeably harder than previous encounters. Now, it starts
out exactly the same as previous encounters, and then gets
progressively harder.
I don't understand why there is code to prevent Kline from dropping
mines after his first appearance. So except in Classic difficulty,
this limitation has been removed. He now drops mines in all of his
appearances.
This was just really weird-looking and had no particular benefit.
I guess theoretically you can use the couple of seconds to grab stuff
you missed, but in practice, there usually isn't much stuff there.
Sure, the escort is what you're supposedly after, but it's
invincible, and your real priority is to protect Sid. It helps that
it now says "Sid" when Sid is the target; that should prevent
any possible confusion. :)
There were two problems:
1. Some areas did not have any code to protect against this.
2. In one area that did have such code, it was malformed, and actually
caused the "no damage" cheat to be negated after the mission was
completed.
Both have been fixed.
This serves two purposes: One, it helps colorblind and color
deficient people to distinguish the arrows. Two, it prevents friend
arrows from hiding enemy arrows; you can see when an enemy arrow
is behind a friend arrow now.
There are two adjustments here:
First, Classic difficulty now gives these items the same price as
the original (50), which is important because the original made it
very easy to grind by filling up on plasma at interceptions and then
selling it. $25 is a lot more than $5.
Second, for every other difficulty, the price has been dropped down
from 10 to 1. The reason I'm doing this is unlike in the original,
you now pretty much have to routinely fill up on rockets and/or
plasma ammo to use these weapons, and it puts the weapons which
don't need ammo (laser and charger) at an unfair advantage, basically
turning use of rockets into a mistake. By making the prices very low,
you still want to conserve plasma and rockets, but the effect is more
to deprive you of their use later on in the mission than to drain
your money.
I think this might partly be because of my dialog changes, but this
causes a minor continuity error, since the mission clearly states
that you're rescuing "Phoebe Lexx", and there's also the fact that
the indicator now says "Phoebe" instead of "Target". I figure just
make her name known from the start; the explanation can be that the
ship automatically transmits the name.
The previous one positioned the arrows based on the difference between
their X distance and Y distance; objects that were further away
would be closer to the center. However, the code was confusing, and
a major practical effect of this was it was impossible to really know
exactly where an object was.
This new, simpler method makes aiming at targets that are off-screen
feasible, and it also utilizes the diagonal arrows.
It was triggered whenever there was a message being displayed.
Thing is, there's no legitimate reason to do this. It doesn't ever
obscure the radio message, and there wasn't some technical limitation
in place. It just did it... just because.
This was a strange cause, and I wonder why it happened. Quite simply,
there was an assumption in the code that any alien's primary weapon
was a bullet, despite the fact that the secondary weapon code could
handle any weapon, including bullets. I've fixed this by getting rid
of the special primary weapon mechanism; the one for the secondary
weapons is used on primary weapons as well.
There are two aspects to this:
1. They now simply make sure your plasma ammo is at a minimum of
50, rather than adding to your plasma ammo as in the other
difficulties.
2. Added a simulation of a bug in Starfighter 1.1 which caused
each aspect of the Supercharge to be lost when you picked up
a different associated powerup. Even though this was a bug,
without it, the Supercharge becomes extraordinarily more
game-breaking, since it's the only thing that sort of limits
its longevity.
This should add some much-needed depth to the tacticality of the
weapon. It's not much: it takes 5 plasma cells to fully charge the
cannon. But it does eliminate the previous effect where the charger
was always preferable over plasma bullets; it's still preferable in
a lot of circumstances, but for smaller ships, it's now typically
better to use plain old plasma ammo. It also limits the amount of
times the charger can be used.
The only magic numbers left now are related to positioning, image
sizing, and the remaining "data" files (the "planets" and "brief" ones).
At least, I'm pretty sure that's the case.
God, this one was definitely the biggest headache of all of the
magic number erasing. Never did I expect such cryptic problems.
The first problem was that the entirety of the player's weapon
struct was a part of the save file, *including the weapon's "image
indexes"*. Since the indexes have been changed, and the originally
used one is now unavailable when it's requested, this was causing
a segfault later on. Had to fix this by setting the image index
when the game is loaded.
The second problem was related to another bug I've been confused
about for years: the one that causes mobile rays to fire 5 green
shots. The entire reason those shots were green was because
the weapon's image indexes were undefined, and *that was causing
them to default to 0*. 0 was simply the index of green plasma.
Of course, though, now attempting to use that image causes a
segfault, so for now, I've fixed this by changing the image index
of the mobile rays to the red plasma bolts.
There are still some magic numbers left, related to the intermission
screen. But the hardest part is now done, thank God.