Open MGM175 opened 8 years ago
The Space Map in MegaMek is very basic and hasn't seen any work done on it in years. The dev that implemented the space stuff hasn't been around in ages.
I'll leave this as an RFE.
As far as I know, none of it is coded (and outright forget about Princess dealing with it ...). If it were, it would belong into MegaMek features.
As far as I know, I did some simple duels (with DropShips) and some WarShips with Princess on the space map without any bigger problem :)
Basic combat works its the other options that are missing.
Unfortunately when Princess was made it was focused on ground combat.
There have been conversations in the past amoung the Devs about space combat. Basically all thats come out of those is it would need its own SpaceBot and its not something on anyone's radar.
I love the space combat system and would also like to see it finished. My office keeps threatening to train me in programming. Maybe one day I'll pick it up and work on it :)
I remember previously asking about a 'map' of how the current code is laid out and being told that there isn't one. Is that still true, or can you point me at some of the existing space code?
Some thoughts:
Gravity could be given a direction just like Wind, and could impart a thrust vector equal to its value in Gs on all units in the direction it's pulling. There is already some framework in place for jumpships and space stations to handle thrust values of less than 1.
Asteroids could be added in the lobby by each player, perhaps from the minefields/initiative bonus dialogue. They would be deployed in a hex and assigned a velocity just as minefields are assigned a density.
Destroyed spacecraft already generate debris field sprites. They need to generate wreckage entities that retain the ship's velocity and vectors from the turn on which it was destroyed.
I don't think any of that would be particularly difficult to add. The real problem with space rules is that there isn't enough developer bandwidth to work on it (and it's not a particular priority for any of the developers).
One thing I think would be good would be allowing the ability to specify a board for space maps. Right now, you can't, and it's mostly an artificial limit.
Unfortunately, there is still no real "map" for how the code is laid out. Mostly, things are happening in Server
. I think for the things that you suggest, you're mostly going to care about the phase transitions. This mainly happens in Server.changePhase
, which calls Server.prepareForPhase
, Server.executePhase
, and Server.endCurrentPhase
.
For instance, the floating of debris fields would be pretty easy I think. Basically you add something like Server.resolveSpaceEndPhase
, which would be called for the PHASE_END
case in Server.prepareForPhase
. This new method could go through the Game
's graveyard and see if there are any destroyed Entity
instances that should have their debris field moved. At least, I think that's the way it would work.
Additionally, for asteroids, you'd basically create an Asteroid
class, and have the Game
track it, much like minefields. Asteroid movement could be handled in that theoretical Server.resoleSpaceEndPhase
. Additionally, based upon the rules for asteroids, you might check at the end of the move phase it a spaceship moved into an asteroid hex.
By which you mean megamek.server.ResolveSpaceEndPhase class, since Server class already needs split up into smaller more manageable classes ;)
You can assign this topic to me. It's on my list of things to do.
After playing some matches on the space map, I've saw that I couldn't set-up the planetary system with gravity options (not mentioning asteroids etc...) Is this possible to include such options in MM, or I should use MekHQ to do so?