itch.iohttp://itch.iohttps://itch.io/t/2580265/video-tutorials-and-other-helpful-or-informative-videosVideo Tutorials and other helpful or informative videoshttps://itch.io/t/2580265/video-tutorials-and-other-helpful-or-informative-videosSat, 07 Jan 2023 10:21:54 GMTSat, 07 Jan 2023 10:21:54 GMTSat, 07 Jan 2023 10:25:21 GMTYou can post your videos that fit to the topic here. I will add links myself once in a while.


How to do a static fire (game version: tank farm update):


An older showcase video by me showing things like stacking and catching a Starship, which should still be relevant mostly:

]]>
https://itch.io/t/1818029/vr-unity-version-onlyVR (Unity version only)https://itch.io/t/1818029/vr-unity-version-onlyWed, 15 Dec 2021 21:07:27 GMTWed, 15 Dec 2021 21:07:27 GMTMon, 26 Aug 2024 20:28:27 GMTVR works only in the Windows version of the Unity builds. It uses OpenXR, so it should run on any headset that supports it, hopefully. It's tested with an Oculus Rift CV1. Enable VR mode from the main menu. VR is pretty basic. So don't go in with too high expectations.

VR controls were created with mouse and keyboard as I don't have hand controllers currently. However, since I use the Unity OpenXR plugin the mouse actually just gives values to the same interactor which can also be used with the hand controller. So you might be able to use your hand controller, but some stuff might not work with it. It will probably be like this for a while as I am focused on developing in non-VR first right now.

With my Oculus Rift I currently have problems with the virtual audio device which I have to deactivate manually in the Windows sound settings to get the audio to play in the rift. It also breaks something on the non-VR output. This seems to be some new drivers originally for the Quest doing this. With that Facebook finally has completely ruined Oculus for me and I will be happily looking somewhere else for my next headset. Any recommendations? Ideally something were you don't have to sign up and create an account, but can just plug it in and play your own game without any hassles.

Please let me know, how it works with your devices, also when it works fine, not just when you have issues ;)

]]>
https://itch.io/t/2205085/moddingModdinghttps://itch.io/t/2205085/moddingFri, 01 Jul 2022 16:53:51 GMTFri, 01 Jul 2022 16:53:51 GMTSun, 01 Jan 2023 21:56:50 GMTMod support currently is very basic. See here for a short how to. You need to download my template project ("MODJECT" in the download section at the bottom) and open it in the same Unity version (as in file name) . Opening it may take a while. When it's done you can open the "OutdoorsScene" in the Assets folder to have the same stuff as in the video, but it's not necessary. The plane helps to align the objects above ground level. There is also a ship and raptor model as reference now.

For the moment this is mostly made for loading some models into the game. But I might do more with it later along the way.

Note: The mod files only work together with the game when it was compiled with the same unity version. So, normally the current MODJECT version will work together with the current game version. Just need to make sure to use the same Unity version as well.

The problem is that the mod files only always work together with just one game version. Wich sucks majorly. Probably have to find another way, if I want to go forward with modding. Any tips on how to load external models in a simple way are highly appreciated.

Some more technical details below:

At the start of the game it loads in all the catalogs it finds in the Data/mods-folder and extracts the item addresses from the ones that are labeled with 'Prefab' and their names and puts them into the dropdown selector. The actual game object is only loaded, when you click on 'Spawn', which may take a while and even freeze the game, if you have ray tracing active or so.

In the latest version with the label 'Raptor' or 'Ship' the prefab's contents are used to switch out the corresponding models.

It's using the addressable frame work as shown in this video. The setup is pretty much the same. The main difference is that I save the addresses in a list in the OnCompleted function:

foreach (IResourceLocation resourceLocation in locations)
{
    prefabAddressList.Add(resourceLocation.PrimaryKey);
}

then put the names in the dropdown options and spawn them this way with the number coming from the dropdown:

public AsyncOperationHandle<GameObject> spawn()
{
    return Addressables.InstantiateAsync(prefabAddressList[selectedPrefabNumber]);
}

It's a pretty simple, but effective frame work with the async stuff, when you understand how it works. Let's see how it turns out in the future :)

]]>
https://itch.io/t/2381300/tank-farmTank Farmhttps://itch.io/t/2381300/tank-farmSun, 25 Sep 2022 20:58:28 GMTSun, 25 Sep 2022 20:58:28 GMTSun, 01 Jan 2023 21:56:17 GMTI think, I got the main function of the tank farm nailed down pretty solid now, which is to fill the rocket with subcooled liquids. There are a lot of simplifications and guesstimates though. Feedback to improve something here, which doesn't take huge amounts of coding, are welcome. I probably won't make it much more complicated though. I wonder, if it's too much already for most people... anyway here are a few points regarding the current state of the simulation:

- Liquids go directly from one tank to one other tank. (you can only fill ship OR booster at a time)

- Liquids are moved by pressure differences, taking into account gas pressure and hydrostatic pressure, but no pressure losses due to flow.

- The pump is modeled very crudely. It just supplies a pressure head and its power is calculated with that and the flow rate. Not quite correct. But it only serves as an indicator anyway.

- The tanks have thermal resistance guesstimates which lead to hopefully a somewhat reasonable temperature increase over time or boil-off rate.

- In the sub-coolers nitrogen is boiled, cooling it and the liquid flowing through it down. This is pretty cool actually, and I should write something like a deep dive about it sometime.

- The methane subcooler is always automatically filled with nitrogen at 90 K, which makes it easier to keep the methane above freezing point. This is independent of what the nitrogen storage tank shows as temperature. (I wonder, how they actually do it. Are they running the incoming methane through a nitrogen heat exchanger to pre-cool it a bit? Would save a lot of nitrogen at least...)

- For simplicity the storage tanks have a fixed pressure setpoint which keeps their pressure always constant. A pressurization system using the water tanks and vaporizers might come later.

- I was wondering about automatic controllers for storage tank and methane subcooler pressure as well as the subcooler fill valves, but it might be too much. Also, without the controllers I feel you can learn much more about the way how everything operates.

- I made a helpful google sheet for the liquid properties.

- I used the sea level boiling point as default temperatures for the storage tanks. Is this reasonable or does anyone know if they have this stuff cooled and pressurized in there? Could save a lot of nitrogen if they pre-cool it!

One note regarding the visuals. You can quickly underestimate how long stuff takes. I spent hours just to make the subcooler vents look somewhat realistic, so that they react dynamically to the pressure and volume of emitted gas - and it still looks barely ok-ish now, and it runs terrible when you got close to it with all the overdraw. It's fun to work with this stuff though. But it's a full time job in itself!

Known issue (but not a bug!): Methane flow is very low. That's because below 90 Kelvin Methane freezes! The longer you are below that temperature the more the pipe freezes up and the lower the flow gets until it almost stops (it doesn't quite get to zero to be able to unfreeze it a bit quicker). Use the vent valve to adjust the boil-off pressure and thus temperature of the nitrogen in the subcooler.

]]>
https://itch.io/t/1816488/how-to-land-the-rocketHow to land the rockethttps://itch.io/t/1816488/how-to-land-the-rocketTue, 14 Dec 2021 23:20:42 GMTTue, 14 Dec 2021 23:20:42 GMTSun, 01 Jan 2023 21:53:56 GMTI should preface that this is not supposed to be a full flight simulator. That means, the simulation is not made for larger heights and velocities. There is no supersonic regime. The air drag just gets lower and lower the higher you fly (using the barometric formula). The focus is on the ground operations: stacking, launching and catching. You can fly above 10 km and more than 300 m/s, but it's not accurate. That's also why you can just skip boost back and initiate landing directly*. It allows to rapidly retry the catching, because it's not easy and it might take a bit to get a hang of it.

With the current setup the main challenge, besides catching, is to find the exact time to start the raptors. Also, with the booster you have to switch off some engines during the process if you land with too much. I am not sure, if I keep it like this or make it automatic as well. It was more challenging before I implemented time scale adjustment. I guess, it's up to you, if you want to go hardcore realism mode and always use real time :D

When you change the starting location, the booster will be orientated towards the landing target automatically. But you have to set the horizontally velocity accordingly yourself so that it actually arrives there. This is a bit trial and error.

If it's too difficult you can reduce the downrange distance and set the target position to 0,0.

Also, you can move the catcher arms with the keyboard. The keys are written on the control panel buttons (English/German keyboard layouts). This helps a lot.

In the future I might add a timer from initiation of landing, to full stack, to reaching 10 km or so. So you can try to get the quickest turnaround time using the smallest amount of residual propellant.

*with the current manual control it's almost impossible to do a proper boost back anyway

]]>
https://itch.io/t/1816438/how-do-the-pid-controllers-for-altitude-roll-and-position-workHow do the PID controllers for altitude, roll and position work?https://itch.io/t/1816438/how-do-the-pid-controllers-for-altitude-roll-and-position-workTue, 14 Dec 2021 22:42:55 GMTTue, 14 Dec 2021 22:42:55 GMTSun, 01 Jan 2023 21:52:38 GMTIt's based on the algorithms from Chapter 6 of "Control System Design" by Karl Joahn Åström, 2002.

I need to find some time to actually explain it, but it works basically as in the kOS KSP mod (which unfortunately I only found afterwards).

So, normally you only adjust K, Ti and Td. But there are also some more options, which I haven't really made use of. The default settings, which I found to somewhat work, are also not really the best. So you are invited to find better settings and share them with us.

This implementation uses the time constant notation for Ti and Td. So, if you want to remove the I and D parts from the controller you have to set Ti very large and Td (and N) very low.

Note, that when you change Ti and already have a somewhat large integral part, it might take some time until it adjusts and the new Ti takes effect. This depends on Tt. If this is around 1 or a bit lower it should wind back the integral part pretty fast.

Here are details from the actual implementation in the C# file, which I use and which mostly follows the design by Åström:

    float K = 0.2f; // K - proportional gain

    float Ti = 11.0f; // Ti - integral time

    float Td = 1.0f; // Td - derivative time

    float b = 0.1f; // b - additional parameter for set point weighting

    float Tt = 1.0f; // Tt - tracking time constant (integrator reset time for anti wind up)

    float N = 11.0f;

 //Compute controller coefficients

        h = Time.fixedDeltaTime;

        bi=K*h/Ti; // integral gain

        ad=(2*Td-N*h)/(2*Td+N*h);

        bd=2*K*N*Td/(2*Td+N*h); //derivative gain

        a0=h/Tt;

// compute output

        y = processVariable;

        ysp = setPoint;

        // controller algorithm

        P = K*(b*ysp-y); // compute proportional part

        D = ad*D-bd*(y-yold); // update derivative part

        v = P+I+D; // compute temporary output

        if(manipulateVariableMin!=0) output = Mathf.Clamp(v, manipulateVariableMin, manipulateVariableMax);

        else output = v;

        I = I+bi*(ysp-y)+a0*(output-v); // update integral

        I = Mathf.Clamp(I, -1000000, 1000000); // prevent unreasonably large values for I, which can result from extreme parameter settings

        yold = y; // update old process output

        return output;

]]>