yoel123 / java-text-based-space-station-manger-sim

space station management/tycoon/trader game. made for fun and practice.
6 stars 8 forks source link

combat system #12

Open yoel123 opened 4 years ago

yoel123 commented 4 years ago

apart from trading, there will be a lot of combat. meaning it will be a big part of the game.

a lone station in an uninhabited star system will attract attention. pirates, fanatics, space cannibals (why grow protein in zero g when you can hunt for it) , deranged ai fleet or any other faction that want a pice of you.

as I mentioned in the story issue, attacking a space station is different than attacking ships, it has enough armor and shields to rival the biggest ships, two medium-range torpedo batteries can shred as small fleet before it gets into range, machine gun battery for those pesky fighters and missiles and a plasma cannons battery for those who can survive the torpedos (a hint point defense doesn't work on plasma).

what I described will have a huge maintenance cost (maintaining high tech weapons like plasma cannons cost a lot, also all those guided-missile don't grow on trees, machine guns are cheap and effective but don't have range, good for point defense).

but it's a good investment if you want to stay alive. think of the station as a fortress but in space.

there will also be ship to ship combat, with the station for support or on patrol missions to protect the system or an assault on an enemy base.

I want the player to be able to customize the ship's layout (for the station's everything will be under upgrades). the weapons, general upgrades, and fighter bay(if any).

the combat itself will be like those board modal combat games, but without positioning (remember its still a text-based game)to make things simpler to program.

unlike other text-based games, the combat won't be over in "one go" calculating statistics (in that case you won't need ship customization as its basically one stat at the end).

I want to make combat turn-based, in every turn the player can assess his situation and how to react, change formation, tactics, give orders to specific ship modals like : protect this ship, avoid that ship, harass this ship, destroy ship, stay in reserve,use long-range weapons, disable(target engines and weapons only) only etc etc.

this alone will take substantial coding efforts.

tactics options will depend on commander skill, the player can choose basic ones like : hold position, attack, charge,flank. more advanced ones can be, pincer move, fake retreat, ambush (if there's a nebula or you have stealth ships), fighter assault, torpedo assault, missile barrage, artillery only, encirclement, etc.

the player will also have info on the enemy fleet (from what can be seen and sensors) so he can decide what todo. like if the enemy has a big ship the player wants to avoid until he handles the rest. or if the enemy has more long-range weapons you would like to charge to close the distance, or if the enemy has slow ships you can easily harass them with faster ships.

this will go on and on until one side retreats, disabled or destroyed.

behind the scenes, ship modals stats will be compared, one modal can attack multiple modals and the opposite is also true. a ship won't attack if its out of range or has an order to avoid the target.

then their accuracy test to see if the weapon hit the target, this is affected by target speed (weapon shot speed), weapon accuracy, and skill.

damage will be calculated by type and what it hit (for example kinetic weapons are good against shields but not against armor), then damage to hull will be calculated (also hull breach/crew loss will affect ship capabilities). until the ship is disabled or destroyed.

modifiers will be added to most calculations, depending on the situation etc.

so combat phase will be like this:

*assess sitoation (enemy ships/yours etc )

*give orders to single ship models(optional)

*global orders (hold ground, retreat,flank etc etc)

*turn report

*repeat until one side wins

about retreat: best way to do this is leave mines so the enemy will be busy with them, second best is to clutter the field with enough rackge (preferably the enemies ships) so it will be hard to follow you, least favorite, leave a rearguard that will probably not survive, and worst: slowest ships get picked off and only the few fast ones survive. buy mines put them on a few ships just for this kind of occasions.

maybe make battlegroups so you can give individual orders to parts of the fleet.

well as I see it, even if its just text, with no map positioning or any graphical aid , this will still be hard to code.