In diesem Leitfaden dreht sich alles um Raketen, Programmierung, und Mathematik, aber keine Sorge, es ist nicht allzu kompliziert! Ich teile einige grundlegende Skripte, die Sie für Ihre eigenen Zwecke verwenden und optimieren können. Behalten Sie diesen Leitfaden im Auge, denn ich werde ihn regelmäßig mit neuen Skripten aktualisieren, sobald ich sie finde. Have fun exploring and adapting these tools to suit your needs!
Einführung
I’m a beginner with Juno, and I’m not familiar with rockets or rocketry. While I’m confident in my programming skills, I’m clueless about Vizzy or any visual editor in this game. Creating this guide is my way of sharing what I discover while exploring this intriguing game. I aim for this guide to be helpful to you, inspiring your own ideas and applications of scripts and concepts within Juno.
Das Drehbuch
Also, Du weisst, having the highest possible TWR (that’s Thrust-to-Weight Ratio) might seem like the best thing ever, Rechts? Aber hey, turns out it can be kinda „ineffizient“ Manchmal. Warum? Also, drag and other stuff get in the way, making it not as awesome as it sounds.
Also, you’re thinking, how about we get all fancy and automatically adjust the throttle to keep that TWR steady during a burn? Sounds cool, Rechts? Also, hold on a sec. There are a few things we gotta remember if we wanna do this the „Rechts“ way.
- Our target TWR we wish to maintain
- The mass of the craft.
- The gravitational effect of a planet on our craft
- Our maximum thrust for the current stage
- The loss of mass over time (as we burn through fuel)
In terms of point number 5, it’s not something we need to dwell on too much. Our focus is primarily on the current mass of the craft, which will fluctuate as we consume fuel. I mention it just to keep it in our thoughts as we draft our script.
Jetzt, onto Vizzy, which is new territory for me (as is this entire game). Jedoch, I believe I understand the basics. It’s a visual programming tool that enables us to create scripts. Angesichts dessen, I recognize that the scripts I develop here may not be the most efficient. Schließlich, this guide is aimed at simplicity. Perhaps in the future, I’ll craft more intricate and refined scripts.
Let’s start by sharing a screenshot to give you an idea of what it looks like. Dann, I’ll delve into the process and the math involved.
Okay, let’s break it down.
Also, we’re kicking off the script, Rechts?
Am Anfang, we’re just setting things up.
Dann, we’re throwing in a few display messages every 3 seconds just to add a bit of drama. Warum? No real reason, just for fun.
Als nächstes, we’re adjusting something called the throttle. We’re pegging it at 77%, which is basically just picking a random number. You could set it to 0 if you felt like it.
Jetzt, we’re getting to the main event. We’re activating a stage, waiting for 3 Sekunden, and then diving into an endless loop with the instruction While(WAHR). This loop is the heart of the script. It’ll just keep going and going until you tell it to stop.
Inside this loop, we’re getting into some math stuff. We’re aiming to keep something called TWR (that’s Thrust-to-Weight Ratio) at a certain level. We’ve got a custom variable called Target_TWR that we’re setting to 1.8. Warum 1.8? Also, that’s just what we’re aiming for. You might pick a different number depending on your spacecraft.
Jetzt, here’s the loop doing its thing: adjusting the throttle. We want to make sure the TWR stays where we want it, so we’re constantly tweaking the throttle up or down. If the TWR gets too high, we’ll cap the throttle at 100%. If it gets too low, we’ll drop it to 0%. This loop keeps running, fine-tuning the throttle every frame to hit that sweet spot.
Here’s a straightforward formula to play around with:
Throttle% = (Target_TWR * (CurrentMass * CurrentGravity)) / MaxThrust
Give it a shot yourself and tweak the Target_TWR variable. If you set it to 1, you’ll aim to hover. But keep in mind, any previous motion will keep your craft moving. Also, it won’t truly hover here; it’ll just maintain its current speed.
In der Zukunft, I’ll build on this basic script and demonstrate a practical use for it in Juno. I’m thinking of creating a simple hover script for a specific altitude above sea level (ASL).
Hoffentlich, this simple script gives you some inspiration and ideas for what you can do with scripts like these. Viel Spaß beim Experimentieren!
Das ist alles, was wir heute dafür teilen Juno: New Origins Führung. Dieser Leitfaden wurde ursprünglich erstellt und geschrieben von Aloe. Für den Fall, dass wir diesen Leitfaden nicht aktualisieren können, Sie können das neueste Update finden, indem Sie diesem folgen Verknüpfung.