-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Drive and Afterburner #896
Conversation
Remove warp bleed factor. Report actual cost in computer. Keep removing (unused) functionality from Energetic class. Fix typo in Benjamen's name
…gine-Source into task_drive_components
- Remove VS_PI and replace with standard M_PI - Fuel tank is integrated (can't upgrade). Remove options in base_computer. - Use standard ftl_energy.MaxLevel() instead of getWarpEnergy and warpCapData. - Remove support for additive and multiplicative capacitors and reactor. - Make unit_csv load reactor and capacitors the standard way using Load. - Remove WCfuelhack in unit_csv. Make energy source a configuration item. Game doesn't need to compute this every loop. - Remove vsfilesystem reference in unit_csv_factory. Breaks testing. - Remove reference to Unit in Cloak. Improves encapsulation. - Merge EnergyType enum into ComponentType. - Move GetUpgradeType to component_utils. - Remove Component::Describe. We'll do this in python along with the rest of the text in base_computer. - Make component query manifest for price, volume and description. - Add a whole bunch of getters to component. - Add support for infinite energy source. Useful for WC drive and reactor. - Move factors to configuration. You can now control utilization of drive and other components using the config file. - Add resiliency to Graphics2 and Manifest loading. Does not crash game if missing. Issues: - Jump causes damage. Unclear if this is new. There is code to do this in the engine.
Also DriveUpgrade and AfterburnerUpgrade Move limits from Computer to Drive and Afterburner Get rid of fuzzy numbers. MJ is exactly x100 game numbers in ship info. Modify fuel efficiency in both ways to reduce tons on ship and increase actual usage. A note on clamps in movable.cpp: these essentially check something is within min/max. With the resource class, most of these are now redundant. Issues: - Ship damage model is very severe on drives.
I built this branch, and patched it with #897 Saving a game, and then restarting VS and then loading the save game gives you no flight control when launching the ship. This is with and without buying a jump drive and the basic repair and refuel. Just starting a new campaign without saving and reloading the game works better: SPEC is till messed up. I think the idea behind the shields being disabled was to put more power the SPEC drive to enable it to run continuously. Unfortunately the shield only draws 43MJ/s, so it's contribution is not that much. Since the start of VegaStrike it was always possible to run the SPEC continuously, and arguably the game is unplayable without this ability. The easiest way out of this quandary is to only draw the 12000MJ for a second or two when the SPEC is enabled, as a sort of "Start up charge" which would show a nice dip in the drives bar, and then allow it to build back up. The energy required to stay in SPEC should be less than what a standard reactor provides, and so that part becomes largely academical. In fact, the entire SPEC energy cost and its special Capacitor seems to add useless complexity to the game. The fact is that you need SPEC to cross the distances in between the bodies in the game in a timely fashion. Why there needs to be two components to accomplish this is beyond me. What would make more sense is to have SPEC as a function of the Shields of a ship. IE: your shields ARE in some way the SPEC drive. It would neatly fit into the current way of playing Vega Strike where when you enable SPEC it disables your shields. You could even make it so that you can't enable SPEC if you don't have full shields. Now staying in SPEC is using the same amount of energy than keeping the shields up. The advantages from a coding perspective is that you don't need to have a SPEC drive and capacitor for it, and so you don't have to keep track of those variables. Maybe this could be a topic of discussion with the other developers. |
First, I'd like to thank you Evert for diligently play testing these. This is very appreciated. Obviously, this PR comes with a complementing assets PR (today or tomorrow). ###Jump drive issue
I had an issue with buying a jump drive which I think got dragged from a previous merge. It is not related to save game issue. I fixed it in this PR on the way. ###Llama save issue
This sounds like #865 . Note that the fix is for saving, not loading. Already corrupt save games need to be patched manually by deleting the comma in the description. Please confirm this is the issue. ###Balancing
These things are now configurable in the configuration file. Take a look at configuration.cpp:148 and configuration.h:189. You can now play with all these parameters. I think they should be pretty clear but let me know if more info is needed. ###Llama.begin issues
You're absolutely right. However, the right solution is simply to give it a reactor03 instead. It doesn't make sense for a freighter, even a small one to have the reactor of a fighter. It's a big, heavy ship. Similarly, Llama.begin is inconsistent with Llama. It's slower. It's faster. SPEC capacitor is 325 instead of 400. It'll take a bit of time but all of this will go away. Ship templates will have either an integrated component (non upgradeable) or take the values from the component installed. ###World Building
You can make change it for yourself or others by changing the source int the config file. However, note that the game cockpit supports them. Dropping SPEC from the game will require tinkering with a whole bunch of other things. Finally, I apologise again for the SPEC thing. I know it bugged you and it bugged me too. But I wanted to fix this the right way and that took a long time. |
Hi there! ##Obviously, this PR comes with a complementing assets PR (today or tomorrow). ###Llama save issue #Saving a game, and then restarting VS and then loading the save game gives you no flight control when #launching the ship. This sounds like #865 . Note that the fix is for saving, not loading. Already corrupt save games need to be patched manually by deleting the comma in the description. Please confirm this is the issue. --It feels different. Previously when starting a new campaign, and saving the game, exiting vs and then restarting it, you would lose only yaw controls. Now, following the same steps you lose yaw and pitch. Honestly I have not tested roll. ###Llama.begin issues SPEC is till messed up. You're absolutely right. However, the right solution is simply to give it a reactor03 instead. It doesn't make sense for a freighter, even a small one to have the reactor of a fighter. It's a big, heavy ship. --Yeah, but when you are starting out on a new campaign, you just don't have the cash to buy that reactor. ###World Building In fact, the entire SPEC energy cost and its special Capacitor seems to add useless complexity to the game. You can make change it for yourself or others by changing the source int the config file. However, note that the game cockpit supports them. Dropping SPEC from the game will require tinkering with a whole bunch of other things. --Ah, I am not suggesting removing the SPEC ability. I'm just thinking that if we remove the SPEC drive and capacitor completely from the game and configuration files, and just assume that SPEC works when you have full shields it would make the code simpler and not affect game play at all. It would also explain why your shields are down when you enable SPEC. (Because you are using the shield "field" to twist or compress space so your apparent speed exceeds light speed) Stated another way, your shield generator IS your SPEC drive. As this is a change in how the game works, we should maybe get a some input from the other guys. ###Finally, I apologise again for the SPEC thing. I know it bugged you and it bugged me too. But I wanted to fix this the right way and that took a long time. |
Sorry. I got swamped by stuff. It's a holiday here.
I'll add that to the list.
You misunderstood me. We would edit Llama.begin in the assets so it would have reactor03 instead of reactor02. You would not need to do any hacking for every game. There's no law that says your starting ship needs reactor02.
It's an interesting idea. However, this comes with a wide range of issues in the engine. What happens if I remove the shield generator from the ship? What if it gets damaged. The C++ engine needs to account for such things. As for the SPEC drive, note that it comes integrated into the ship. It's only the capacitors that are upgradeable. I'm not wild about the whole setup as it is right now. However, I don't plan on touching it while I'm refactoring. It's hard enough as it is not to break something.
You can drop SPEC and keep FTL. WC does that by simply transferring the ship to the target location when you press 'a'. Same as the original WC.
See above why this isn't as simple as you think. One more example - can you SPEC while cloaked?
We are talking about the same thing from different view points. As the one implementing changes to the engine, such ideas can fall in one of three areas - C++, python or configuration. A simple change such as infinite SPEC is easy to implement with a few lines in C++ and a configuration entry. SPEC=Shields requires a redesign of the engine. It may also break WC. |
FYI - MSVC doesn't seem to have
|
And here I thought I dodged the issue in the other branch :) The linux checks fail on a single test with double free detected in tcache 2. This would be a great time to test those docker facilities. Are they ready and can you give a 1 minute primer on where to find the docs or how to run it? |
- Multiplication warnings due to move from float to double. - M_PI errors on MSVC. - A minor bug in drive test.
Disable some of the unit test to pin point error.
Diagnose drive_tests crash using primitive lion algorithm.
that always causes damage during jump. Attempt to fix drive test.
Hi there! Just play tested it, the damage while jumping is now gone, which is good. In my mind the quickest way of getting most of the issues in master resolved is to merge this PR to master, and then back into the periodic housekeeping branch which will hopefully be able to be merged soon after. |
Hopefully https://clocksmind.blogspot.com/2024/11/vega-strike-image-testing.html will help with using the new tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I play tested this branch quite a bit, and it solves some problems that are apparent in master.
Entering SPEC in the initial Llama drains the drives, but this has been fixed in another branch. The changes here do add a lot to the game, and should be merged so that the other branches can pick up these fixes.
There's a potentially serious issue with the test code. It's not so much the code failing as the potential for some memory leak that isn't evident but will crash the game. Better to find it now than try to figure out later. I've separated #900 into a separate PR (#901). I believe the rest can wait unless I missed something else here? |
A note on clamps in movable.cpp: these essentially check something is within min/max. With the resource class, most of these are now redundant.
Issues:
Jumping sometimes damages ship. This is actually in the code but I haven't found it recently to figure out if this is expected or not under current parameters.Fixed.Please answer the following:
Code Changes: