Commit Graph

915 Commits

Author SHA1 Message Date
onpon4 ec7fb908a3 Fixed failure to sell double rockets when buying another special. 2015-03-17 19:20:04 -04:00
onpon4 ad8a2f2ad9 Replaced various "limit" functions with LIMIT and LIMIT_ADD macros.
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.
2015-03-17 19:00:13 -04:00
onpon4 05c370feb4 Capitalized "max" and "min" macros. 2015-03-17 16:54:00 -04:00
onpon4 6610cddeac Fixed some problems with the charge cannon.
Specifically:
- When an enemy is hit, its damage is reduced, not its lifetime.
- When the shot's lifetime ends, it no longer explodes.
2015-03-17 13:03:20 -04:00
onpon4 717d56755c Moved fireRay to the ship module.
Also removed a really bad convention where a variable called "anEnemy"
was used, rather than just "aliens[i]".
2015-03-17 10:34:29 -04:00
onpon4 f58e15615b Changed "DAMAGEOWNER" flag to work when damaged, rather than destroyed.
This change in behavior has some very significant effects:

1. Damaging a child alien isn't rendered meaningless if you are
   primarily attacking the owner. This could be especially annoying
   with the miner bosses, which have tiny parts that are completely
   impractical to aim at.
2. Again, for the miner boss: previously, you couldn't see how much
   total health the ship had; the health bar only uselessly showed
   whether or not you defeated half of the ship (which you could
   already tell by looking at it). Now, the health bar tells you
   how much more damage you have to do in total.
2015-03-14 21:06:37 -04:00
onpon4 b44037f05a Fixed cash being made available on interceptions in Nightmare mode. 2015-03-13 19:11:14 -04:00
onpon4 645513cbf9 Loop the death music. 2015-03-13 19:02:28 -04:00
onpon4 2a0234c300 Added ship module, moved fireBullet to it (as ship_fireBullet).
For functions that are used by both aliens and the player.
2015-03-13 10:10:58 -04:00
onpon4 8842d7775b Removed the code that prevented transports from spawning based on player state.
Since it now gives you money if you're not able to power up, there's
no point in preventing it from spawning when you can't power up.
2015-03-12 23:12:21 -04:00
onpon4 6f768c88a6 Added some starting money for nightmare difficulty.
As a result, you're not stuck with the weakest weapon in the game
anymore. You have to choose between the double rockets, plasma
permanently upgraded in one area, plasma temporarily upgraded in
some areas, or some combination.
2015-03-12 22:14:07 -04:00
onpon4 932341f0e6 Better method of finding the user home directory. 2015-03-12 12:38:17 -04:00
onpon4 ea33be4591 Removed the "LINUX" definition.
This is silly. The libraries used have absolutely nothing to do with
"Linux". They're POSIX standard libraries, and will work just as
well on Mac OS X and BSD. The actual code might need to be replaced,
but in any case, this isn't something to limit to "Linux" systems.
2015-03-12 11:41:23 -04:00
onpon4 1834011314 Organization stuff 2015-03-11 15:36:42 -04:00
onpon4 199ee7a58b Changed horizontal location bullets are spawned.
The previous method was inconsistent between the left and right
directions; it placed the left edge of the bullet on the left edge of
the ship when going to the right, and in the center of the ship when
going left. This was barely noticeable with small ships, but more
noticeable with large ships. The method also sometimes made the backs
of bullets visible behind the smaller ships, which looked kind of
ugly.

Now, the back edge of the bullet is consistently placed in the center
of the ship.
2015-03-11 15:11:06 -04:00
onpon4 bb0d6b4849 Modified cutscene 4 text. 2015-03-09 19:39:21 -04:00
onpon4 1c73a37c8e aliens.{cpp|h} -> alien.{cpp|h} 2015-03-09 19:32:03 -04:00
onpon4 d08da08f85 Moved alien_destroy to aliens module. 2015-03-09 09:36:24 -04:00
onpon4 ce5df0013d Some tweaks.
Mostly to the charge cannon, but also to Kline.
2015-03-08 22:01:37 -04:00
onpon4 31a8383f90 Changed the way Kline works.
Kline previously had a maximum of 500 or 750 health, and uses some
hacks to cause it to flee just as it was destroyed, and to advance
to new stages in the final battle.

I've replaced this with a much larger amount of health, and progression
being based on how much health he has.

Also some other stuff.
2015-03-08 20:59:33 -04:00
onpon4 982d39278c Removed the dialog from the start of mission 26.
I feel it's unnecessary, and it can be an annoying wait if you're
struggling with Kline.
2015-03-08 17:56:38 -04:00
onpon4 912ff8b86c Modified script for mission 11 to better match the music. 2015-03-08 16:19:41 -04:00
onpon4 b188a170d2 Made Through Space loopable (by cutting off the end). 2015-03-08 10:42:24 -04:00
onpon4 28cc1fcc6d Updated audio module. 2015-03-08 10:38:58 -04:00
onpon4 f54579a41f Reverted amount of stuff cloak fighter drops. 2015-03-07 22:41:15 -05:00
onpon4 da35b44179 Brought Kline's health in the final battle back down.
The increase worked well in mission 25, but not so much in mission
26.
2015-03-07 17:13:37 -05:00
onpon4 4b3cb9c1d3 Fixed some problems. 2015-03-07 15:34:47 -05:00
onpon4 75022395cc Changed blacks in asteroids to dark gray.
Starfighter uses pure black as a colorkey, and that was rendering
some parts of the asteroids transparent.
2015-03-07 14:46:59 -05:00
onpon4 0baa48e7ef Don't try to home in on immortal enemies.
It's annoying when this happens. There's no point in attacking an
immortal enemy.
2015-03-07 12:34:07 -05:00
onpon4 22fcdae8cc Several adjustments for difficulty purposes.
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).
2015-03-07 12:19:35 -05:00
onpon4 a3efbc06cc Substantially increased the cost of plasma upgrades.
I feel these were extremely underpriced. $1000 for triple bullets?
That's dirt-cheap! Even in hard mode, I have no trouble getting that.
2015-03-07 09:42:24 -05:00
onpon4 9974848ce8 Moved some things. 2015-03-06 23:18:31 -05:00
onpon4 37befa8d3c Automatically sell things that are removed when buying new things.
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).
2015-03-06 19:51:25 -05:00
onpon4 604b8644b5 Give the player full price when selling, not half price.
All the half-price penalty does is punish you for upgrading early
when it turns out that you need to change weaponry.
2015-03-06 16:30:33 -05:00
onpon4 09e1f1f72e Some adjustments to weapons.
* 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.
2015-03-06 16:25:12 -05:00
onpon4 dad8a41114 Improved shop code. 2015-03-06 15:22:10 -05:00
onpon4 19936f67c9 Substantially reduced the amount you can upgrade your plasma cannons.
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.
2015-03-06 12:36:02 -05:00
onpon4 cbfd6ff153 Make permanent upgrades cost more when you don't have the temporary ones.
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.
2015-03-06 11:48:45 -05:00
onpon4 50122bb0ef Don't charge more for increased firing rate.
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!
2015-03-06 11:36:08 -05:00
onpon4 8a8da04560 Don't restrict enemies from passing through other enemies.
This was inconsistent and had no particular benefits. The only minor
benefit I can see is that it prevents smaller enemies from hiding
inside bigger enemies, and in my test run through Spirit, this only
happened once. Not at all significant compared to how incredibly
awkward the aliens look when they're acting as if they can't move
through other ships.

This commit also includes more function name changes and other minor
style fixes.
2015-03-06 09:37:21 -05:00
onpon4 7ed2d1a991 More name updates... 2015-03-05 10:47:30 -05:00
onpon4 3f4c3b894a Increased the damage of micro rockets.
3 damage? Really?! No wonder this weapon felt so weak compared to
the double rockets!

I've increased the damage to 7, which causes the total damage of the
weapon to be 35 (slightly more than the total damage of the double
rockets, which is 30).
2015-03-05 08:19:44 -05:00
onpon4 66a6169c81 Better loopable Space Dimensions.
Again, courtesy of matthew.pablo.
2015-03-05 08:09:45 -05:00
onpon4 9efaff2783 Started renaming functions.
I'm going to completely reorganize this absolute mess of a codebase.
First thing is to fix the names so that it's more obvious what files
they're defined in. Second thing is to move around some functions,
and rename some of the cpp and h files, to organize them better.
I'm doing these both at once.
2015-03-04 21:30:23 -05:00
onpon4 aa187ef5f7 Prevent inclusion of headers multiple times, on an individual level.
Previously, Starfighter depended on a single check in Starfighter.h
to prevent this. Now, the proper code is in all header files.
2015-03-04 09:11:04 -05:00
onpon4 69f87ec5fb Optimized asteroid compression. 2015-03-04 08:26:47 -05:00
onpon4 60783849e4 Removed the extro text from the credits.
I don't feel it's really necessary, and besides, it's annoying that
due to the way it's implemented it prevents you from doing anything
while it's shown.
2015-03-04 08:20:11 -05:00
onpon4 6465468a8c Fixed the end of frozen_jam being cut off. 2015-03-03 19:42:00 -05:00
onpon4 3d1ad2b674 Autosave when changing planets and when buying/selling.
Previously, it just saved after completing a mission, so it wasn't
something you could really rely on. Now it saves every time something
changes.
2015-03-03 19:28:15 -05:00
onpon4 cc6989328d Fixed the ammo limit of double missiles. 2015-03-03 09:25:32 -05:00