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.
It wasn't very useful. All it did was offer the option to center
text and take away the option to wrap text. I've moved the text
centering option to gfx_renderString and replaced all uses of this
function with that function.
The fourth is simply a duplicate of ship_collision for bullets. A
bit redundant, but I figure it's clearer of a definition. Besides,
this opens up the door to possibly making bullets a different struct
type in the future, if that turns out to be desirable.
I honestly don't understand why these cheats were here. Preventing
enemies from moving breaks some missions and doesn't do anything
useful, and preventing enemies from firing is basically no better
than the invincibility cheat (and might even be worse, if it applies
to Sid; I didn't check).
I noticed that in "original" difficulty, plasma upgrades are basically
prohibitively expensive, which is not at all like the original. To
fix this, I've given that difficulty the original prices for those.
I've also slightly reduced the normal cost of permanent upgrades.
This is mainly because the old "limit" functions were all restricted
to certain types, which is incredibly silly given how simple they are.
Macros are much simpler, and a warning gets raised if they're used
improperly with multiple types, anyway.
In the process, I also found and fixed a bug: it seems the original
author intended for escaping enemies to gradually accelerate to
fleeing speed, but the low value was indicated as the max value, and
the way limitFloat was written, that caused the max value to be used
(it was supposed to reduce the speed to a minimum of -15, but it
instead effectively assigned the speed to -15). It might be a good
idea to re-implement the old buggy behavior intentionally; depends
on whether the acceleration of jumping looks better or worse than
just immediately going to jump speed.
Started out adjusting prices, then ended up doing other things
while testing. Committing this now before I start doing other
random stuff!
But all of the changes are related to balancing difficulty, mostly
with prices, except for a couple bugfixes in the shop. Most notably:
* Ammo now costs $10, not $50. You no longer have to worry about
saving ammo quite as much as a result.
* Plasma upgrades' cost is now calculated differently, and the result
is slightly lower prices than before.
* Easy mode now grants the player more max ammo than other difficulties.
* Increasing max plasma ammo now costs less at the start, and increases
in cost faster.
* You increase max plasma ammo by 25 at a time, not 10. (10 was just too
small of a number.)
* Destroying enemy ships no longer gives you money. I found that, even
in hard mode, I had *way* too much money coming in, and this cuts it
down substantially. It also makes the shield bonus at the end of missions
much more significant. To compensate for the loss of massive bonuses
bosses used to give, these bosses now drop a lot more stuff.
* Kline has decreased health in his first encounter, and increased health
in his last two encounters (the numbers have been reversed).
Previously, when you bought something that took the place of something
you already had, such as buying a new secondary weapon, the old one
was just discarded. Now, it is sold, so you get money back for it
(the same as if you had manually sold everything).
* Modified the upgrade limits, to both be uniform and allow upgrades for
every factor. (In fact, each one can be upgraded exactly once now.)
* Gave triple-spread weapon double damage.
* Micro rocket damage down from 7 to 6. Total damage is now equal to
double rockets.
I've tested this a lot, and I think these are good numbers to go by.
Plasma damage has been limited the most, because it is the upgrade
that quickly breaks the balance of the weapons, making the plasma
cannon the obviously most powerful weapon. I don't want this; the
powerful weapon should be the secondary weapon, while the plasma
cannon is the fast-firing weapon with much more ammo.
Basically, I want to make a tactic I found myself using, which was
to carefully keep my plasma power at maximum and take out most
enemies in one plasma shot, obsolete. As a result, missiles should
now be much more cost-effective (because even a single missile's
power of 15 greatly exceeds plasma's maximum power of 3*2=6).
None of these reductions in limits apply to easy mode; that mode
still has the old limits of 3 for min and 5 for max.
The way it was previously, it was tactically beneficial to ignore
temporary upgrades, if you were going to do a permanent upgrade to
that level anyway. This is silly. Now, you don't lose anything by
making the temporary upgrade first. You just get lesser access to
the upgrade earlier on.
I don't really understand why the original developer felt that
increased firing rate was so superior to the other upgrades as to
justify a far more inflated cost. Frankly, I find this upgrade to
be *inferior* to the power and output upgrades, for two reasons:
one, it doesn't increase the amount of damage inflicted per second
much; two, it increases plasma ammo usage as well, whereas the output
and power upgrades have no effect on plasma ammo usage. If anything,
firing rate upgrades should be *cheaper*, not more expensive!
It's incredibly silly for it to be 10; what's the advantage of the
double homing missile launcher over the regular homing missile launcher
otherwise? It's just much slower and less versatile. Now it should
be slightly better, because you can effectively shoot 30 missiles
total, instead of just 20.
(Micro homing missiles are different; the advantage of having several
weak missiles instead of a smaller numer of strong missiles is
actually quite significant.)
The source code contains routines to initialise all these resources, but also
functions to load from and store to external files. Support for external files
has now been removed; this removes a potential difference between compiling
with or without USEPAK, and makes it easier to change missions in the code.