Hi all!
Hmm, 10 days without update. That's bad.
Certainly, I have not had much time to spend on the game, but I have done something. I will post a picture later today, as well as updating the post at the XWAU forums. Thanks, FekLeyrTarg and MajorParts for keeping that thread alive, and for your contributions in the form of 3D models, 2D reticules, and suggestions and ideas!
I have been dealing with the disabling of ships. In particular, what happens to the AI when a ship is disabled.
It has had some quite deep implications on the rest of the game, because I started designing the AI in a way that wasn't exactly matching how it works in X-Wing. I will go to the details:
In X-Wing, every flight group is assigned one particular Order. Like for example, "Attack all enemies", or "Escort this other flight group". Okay?
That order determines what is the AI supposed to do during the missions. Some orders instruct ships to react to enemies within certaind distance, while other orders can make the AI even totally ignore incoming fire.
Some involve the AI moving thru up to 3 custom waypoints before doing anything else. Some don't have any waypoing into consideration.
The way I have programmed the AI is by using something I call a "flight plan". Depending on the order, on spawn, a ship is given a flight plan that is basically a recipe with different steps, of how to behave and what to do during the mission.
For those that know what this means, these different steps form basically a
non-deterministic finite automaton that decides, at every moment, what the ship should do.
These different flight plans have tasks common to all ships, like for example coming out of and into hyperspace or a mothership hangar. Other tasks are exclusive to some particular Orders. For example, the Escort order include a task to form with the escorted flightgroup at a particular position, and to react to enemies getting closer than certain distance; while the Fly Home task, doesn't have anything like that and focuses on just getting close to the mothership and then entering the hangar.
Well, this is all nice and has worked fine until the moment I added the possibility to disable a ship. Sure, I made sure that the ship engines shut down and the ship stops trying to shoot around while it is disabled. But what happened once it was boarded and repaired, or captured?
Well, the Rescue Ackbar mission that I am using a testbed present a similar case. You disable the shuttle Epsilon X where Ackbar is kept prisoner, then friendly shuttle Hasti hypers in, boards Epsilon X, picks up Ackbar, and flies home.
What happens with Epsilon X? Maybe nothing, since it is not repaired or captured in this particular mission. But what if it was? (Remember that I am not programming ONE mission. I am programming a whole game able to play different missions)
Surely it wouldn't be enough to remove the "Disabled" flag from the ship. Because in that case, it would try to go on with its original flightplan, that was to fly home to the Imperial Frigate Vehemence. That is not what we want if we have captured it.
So what it needs to happen? The captured ship actually needs to change flightplan to some other in the middle of a mission?
Let's look at another mission that is similar to this one: Tour of Duty I, Mission 7: Recover Stolen X-Wings.
In this mission we have 3 X-Wings that have been hijacked by their R2 units and are taking them to an Imperial Star Destroyer.
We need to disable the X-Wings, let the shuttle group Rescue re-capture them, then escort the X-Wings back to the hangar of calamari cruiser Maximus.
So the X-Wings start the mission going to the Star Destroyer, but once disabled and captured, they change their order to go back to the Maximus? Or what is going on here?
Well, that is what I am trying to find out. What is going on? I can definitely program a way for ships to change orders "on the fly" (no pun intended), but I am not totally sure it is needed at all in X-Wing.
I have the suspicion those hijacked X-Wings were never meant to actually reach and enter the star destroyer. In fact, a group of TIE Interceptors comes and target the X-Wings.
Maybe, in the backstage, those X-Wings never had the order to go to the Star Destroyer, just to fly in that direction. Then, once disabled and captured, they all revery to a "Fly Home" order, that in this case is set from the beginning to be the CRS Maximus.
We can throw some light into this if we download the strategy guide form the Goodies section in GOG. By looking at page 548, all orders for all flight groups in that mission are specified.
The X-Wings have the "Fly Once and Evade", order, that means that they will follow some waypoints, evading incoming fire and then go home to the STD Invincible. But these waypoints are so far away that, surely, the x-wings will be destroyed by the many enemy TIEs before they complete their task.
So there went my theory.
So where is stated in the mission file that once captured, the X-Wings need to fly home to the CRS Maximus? I cannot see it anywhere. You can only specify one Mothership for a flightgroup, and in that case it is the Invincible.
I wonder if the Shuttle Rescue (that has as Mothership the Maximus) somehow overwrites the X-Wing mothership with its own when it captures it. That is just a guess, but is the best I have.
All this was just to explain to you all where most of the time goes while making XWVM. I am all the time second-guessing myself with how the game should work, and that is time that I am not directly programming, or that I am programming and reaching dead ends when I figure out that I guessed wrong.
When I reach those dead ends, it saps my energy a little bit. But I try to keep being productive and move onto something else to keep the pace, until I gather some energy back to face the problem again.
One of these diversions has been the Target Selection Reticle.
That is what demarks a ship in the viewport as the targeted one. In X-Wing, it was just the ship model blinking red. In TIE fighter, it was so, plus also, at longer distances, a little rectangle appeared.
In XVT and XWA it was the 3 corners of a rectangle, surrounding the targeted ship.
Just for the lulz, I wanted to try something slightly less boring and more fluffy.
I will show a screenshot later, but you can basically get the idea from this
image.
In particular, I am trying to circumvent the problem in X-Wing (and TIE Fighter) with the cockpit getting in the way all the time. I didn't really like the option to totally remove the cockpit with the Period key. It was quite unrealistical.
But clumsier cockpits, like the Y-Wing's, make it hard to steer the ship towards the target when the target is direcly below the horizon, behind the dashboard.
Instead of a virtual cockpit like that of XVT or XWA, I have opted for overlapping the targeting selection indicator in front of the cockpit dashboard. Like if it was projected inside the pilots' helmet viewer.
I think it really improves dogfighting with the Y-Wing, without removing realism by making the dashboard disappear.