Greetings fellow developers!
I'm currently in the process of building a 4X game, and I'd be in need of input in regards to the Combat Playback module.
Context
This module is named Combat Playback, because there is no user input during combat sequences. They are generated when a turn is processed on the backend-side, and returned to the player. The Combat Playback simply displays the outcome.
When I refer to Combat Playback in this post, I am referring to both the 'frontend display' and the 'backend logic' of the outcome.
Reference
Here's a Video that I've posted on youtube. It shows the progress that's been made towards building the Combat Playback prototype. Most of the rest of the game is already well underway, but the Combat Playback is, but an embryo at this stage.
[media]http:
Design Questions
There's a number of questions that I'd like to raise here, and please don't feel limited by them to provide feedback (so long as you understand that this is early work, without any form of polish, and with a lot of missing assets).
As you can see in the fight, ships will automatically acquire a target. For the moment being, this target is always the 'nearest enemy ship'. This was made both because it's my first stab at this, but also because I don't want the AI to be something players rage about. If the 'wrong AI' kicks in, I feel players will get mad.
[hr]
Question # 1 - Should there be more AI types?
Specifically, should I have ships target the 'weakest', or retain their target until it is dead?
[hr]
Question # 2 - How should I choose which AI to bind to which ship?
Assuming there should be more than one AI type, how should I dictate which AI does what?
Here's a few options I've got right now:
A - Contextual: the ship tries to evaluate what should be done, and assigns
itself a 'role' in this battle.
Pros: This could lead to 'intelligent' decision-making
Cons: This could easily lead to verrrrryy dumb decision-making, and would require a lot more effort
B - Ship-centric: When choosing what ship to build in the game, it also states its 'AI pattern' (aka how the ship behaves)
Pros: Clean, easy, and recognizable by the player.
Cons: Very limitating, and some player choices could be considered 'bad' (not seeing that a ship attacks only the nearest ship and equipping long-range weaponry could lead to sad cornercases).
[hr]
Question # 3 - How should the AI respond to 'being in firing range'
The prototype also assumes specific AIs for movement and attack. The basic AI right now is to move until one weapon is in range of the closest enemy, and fire (idle).
Each ship will be equipped with possibly more than one weapon, each with varying ranges.
I'm wondering how each ship should behave assuming that.
A few 'sketches' of what I thought could work well:
- As long as a ship is not within range / is not the current target of any other ship, it will stop moving as soon as at least 1 weapon is in firing range. The idea here is that it allows 'artillery-type' ships to take full advantage of their attack range without moving closer and endanger themselves.
- As soon as a ship is the target of another ship and in being fired at, it seeks to move as close as its 'shortest ranged' weapon. The idea is to have it perform its optimal amount of damage.
- Once all of its weapons are in firing range, it assumes a 'circular orbit' around the target. The idea is to avoid fire from 'other' enemies that might want to acquire it as well and minimize the chances of 2v1s. It's also a good way to avoid what can be seen in the video: ships stopping to move for no apparent reason, which doesn't look very exciting.
[hr]
That's it for now. I'll add more if anything pops-up
Thanks!