raceintospace / raceintospace

This is the GitHub home of Race Into Space, the computer version of the Liftoff! board game by Fritz Bronner. It was developed by Strategic Visions and published by Interplay as a disk-based game in 1993 and a CD-ROM in 1994. It was open-sourced in 2005 and a number of improvements have been made over the original.
GNU General Public License v2.0
174 stars 47 forks source link

Downgrade to an unmanned mission? #241

Open peyre opened 5 years ago

peyre commented 5 years ago

There have been times I've planned a manned orbital, for instance, but when I go to assemble it the hardware isn't quite ready and I'd like to fly an unmanned orbital instead. That would be a really handy option, but . . . is it realistic? Can a manned mission be changed to a dummy one at short notice like that, or do dummy missions require substantial preparation as dummy missions (to fine-tune the automation, etc.)? Does anyone know? (I wouldn't want to do this if it's not a realistic option.)

peyre commented 5 years ago

Incidentally, I asked NASA about this one. The public can send a question on its Web site. All I got back was a canned response referring me to NASA's history, so that was a waste of effort.

peyre commented 5 years ago

I've contacted Erik Anderson about this. He was one of Fritz's main sources of inspiration for the creation of BARIS, and is very knowledgeable about it and the Space Race. He says it should have been doable in real life, that even more complex missions like docking tests should have been downgradable to unmanned missions, and that this is all allowed by the rules of Liftoff!. So I think we're Go for this one. I'll work out the details and implement it when I can.

peyre commented 5 years ago

I have added downgrade-to-unmanned options in the rush.cpp file. These are the changes; each full line is as it is now, with the original line below it. {03, 00, 00, 00, 00, 00}, // 2 {00, 00, 00, 00, 00, 00}, // 2 {02, 05, 03, 00, 00, 00}, // 4 {02, 00, 00, 00, 00, 00}, // 4 {04, 02, 15, 00, 00, 00}, // 14 {04, 02, 00, 00, 00, 00}, // 14 {18, 00, 00, 00, 00, 00}, // 16 {00, 00, 00, 00, 00, 00}, // 16 {14, 04, 15, 00, 00, 00}, // 20 {04, 00, 00, 00, 00, 00}, // 20 {16, 18, 00, 00, 00, 00}, // 21 {16, 00, 00, 00, 00, 00}, // 21 {05, 00, 00, 00, 00, 00}, // 42 {00, 00, 00, 00, 00, 00}, // 42 {04, 42, 00, 00, 00, 00}, // 43 {04, 00, 00, 00, 00, 00}, // 43 {42, 05, 00, 00, 00, 00}, // 45 {42, 00, 00, 00, 00, 00}, // 45 {43, 04, 45, 42, 05, 00}, // 46 {43, 04, 00, 00, 00, 00}, // 46

rnyoakum commented 5 years ago

From what I saw this commit has been reverted, so I'm reopening the issue.

peyre commented 5 years ago

Thanks Ryan. You think it's doable to change the code to make it possible to downgrade to an unmanned mission?

peyre commented 5 years ago

Since this has been reopened, it might be helpful (or at least amusing) to show off the screenshots of what happens on such a mission.

Launchpad Dead Dead_on_USub

rnyoakum commented 5 years ago

It should be possible to get this working. A couple of thoughts:

peyre commented 5 years ago

If we did settle on an automatic downgrade, that would make the first item, the configurable Advanced Preference item, much more important.

rnyoakum commented 5 years ago

This should be working per commit ba8b2cc43456727140d4a79eba8a75f10918198d. The updated downgrade system, like the system it replaces, is a little fragile. It trusts that the table in data/gamedata/downgrades.json is accurate and doesn't contain any missions with incompatible hardware requirements. If that assumption is mistaken, the results are unspecified.

The hardware requirements is a pretty strong requirement - for one, it essentially prevents any two-crew missions from being downgraded. Joint missions & single launch missions cannot be swapped. Don't downgrade anything which has an optional docking module to a mission which requires one - the hardware has already been assigned in the VAB. It's possible to downgrade a mission with a DM to one without - the DM will be assigned until the next turn, but probably won't be consumed; it may also be possible to free it up by reassigning hardware in the VAB.

I'll try to tighten up the hardware issues at some point and make the system more resilient. Currently, there isn't much protection surrounding those issues (Ex: #292) so I think the added functionality - used properly - is worth it.

peyre commented 5 years ago

That's great!  I'll test it this morning.  Adding some ability to change the components of a mission is something new.  That opens exciting possibilities, though I can see the can of worms potential here too.  It might be just as well that the downgrade options aren't moddable, that they have to be changed in the code itself.

On Friday, November 1, 2019, 7:14:09 PM PDT, Ryan Yoakum <notifications@github.com> wrote:  

This should be working per commit ba8b2cc. The updated downgrade system, like the system it replaces, is a little fragile. It trusts that the table in data/gamedata/downgrades.json is accurate and doesn't contain any missions with incompatible hardware requirements. If that assumption is mistaken, the results are unspecified.

The hardware requirements is a pretty strong requirement - for one, it essentially prevents any two-crew missions from being downgraded. Joint missions & single launch missions cannot be swapped. Don't downgrade anything which has an optional docking module to a mission which requires one - the hardware has already been assigned in the VAB. It's possible to downgrade a mission with a DM to one without - the DM will be assigned until the next turn, but probably won't be consumed; it may also be possible to free it up by reassigning hardware in the VAB.

I'll try to tighten up the hardware issues at some point and make the system more resilient. Currently, there isn't much protection surrounding those issues (Ex: #292) so I think the added functionality - used properly - is worth it.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

peyre commented 5 years ago

Hm, I just scheduled a manned suborbital but it wouldn't let me downgrade it to unmanned. It would only let me downgrade it to a "SCRUBBED MISSION".

Scrubbed

rnyoakum commented 5 years ago

Did you add the option in the downgrades.json file? I don't know all the mission eccentricities, so I didn't add the unmanned missions as options.

peyre commented 5 years ago

Oh! No, I didn't change any files; I just downloaded the latest copy of the repository and compiled.

So, is the ability to scrub through downloading intentional?

rnyoakum commented 5 years ago

Yeah - I thought it might be nice to have as a feature. I bypassed the popup messages asking for confirmation which normally appear when scrubbing a mission because the UI didn't work well with them. If you don't like having the ability to scrub in Mission Control, or if you feel it shouldn't happen without the popup messages, I can disable them - after all, it's always possible to scrub via the Launch Pad.

peyre commented 5 years ago

It seems a little dangerous offhand, but that's probably just my natural hesitance about new ideas. I don't object to making it possible to scrub from Mission Control. If you like the idea, we should probably leave it in. It does still let you scroll back to your original mission, which is the important thing to my mind.

rnyoakum commented 5 years ago

I have a few hesitations - when a player chooses to scrub in the VAB or the Launch Pad it brings up a dialogue asking them to confirm. I had to skip the warnings because I didn't have it working well with the UI, so I removed that aspect. I might disable scrubbing from Mission Control until I implement a warning system at least.

peyre commented 5 years ago

Oh, ok. I don't feel strongly about it either way, so long as you can always scroll back to the original mission. Personally I'd be more excited about warning dialogs at the end of your turn (#166). That tripped me up again yesterday, grr.