Ten przewodnik dotyczy rakiet, programowanie, i matematyka, ale nie martw się, to nie jest zbyt skomplikowane! Udostępniam kilka podstawowych skryptów, których możesz używać i dostosowywać do własnych celów. Śledź ten przewodnik, ponieważ będę go regularnie aktualizować o nowe skrypty, gdy tylko je znajdę. Have fun exploring and adapting these tools to suit your needs!
Wstęp
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.
The Script
Więc, Wiesz, że, having the highest possible TWR (that’s Thrust-to-Weight Ratio) might seem like the best thing ever, Prawidłowy? Ale hej, turns out it can be kinda “inefficient” Czasami. Dlaczego? Dobrze, drag and other stuff get in the way, making it not as awesome as it sounds.
Więc, you’re thinking, how about we get all fancy and automatically adjust the throttle to keep that TWR steady during a burn? Sounds cool, Prawidłowy? Dobrze, hold on a sec. There are a few things we gotta remember if we wanna do this the “Prawidłowy” 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.
Teraz, onto Vizzy, which is new territory for me (as is this entire game). Jednakże, I believe I understand the basics. It’s a visual programming tool that enables us to create scripts. Given this, I recognize that the scripts I develop here may not be the most efficient. Mimo wszystko, 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. Następnie, I’ll delve into the process and the math involved.
Dobra, let’s break it down.
Więc, we’re kicking off the script, Prawidłowy?
Na początku, we’re just setting things up.
Następnie, we’re throwing in a few display messages every 3 seconds just to add a bit of drama. Dlaczego? No real reason, just for fun.
Następny w kolejce, 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.
Teraz, we’re getting to the main event. We’re activating a stage, waiting for 3 towary drugiej jakości, and then diving into an endless loop with the instruction While(PRAWDA). 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. Dlaczego 1.8? Dobrze, that’s just what we’re aiming for. You might pick a different number depending on your spacecraft.
Teraz, 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. Więc, it won’t truly hover here; it’ll just maintain its current speed.
W przyszłości, 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).
Miejmy nadzieję, this simple script gives you some inspiration and ideas for what you can do with scripts like these. Have fun experimenting!
To wszystko, co dzisiaj udostępniamy w tym celu Juno: New Origins przewodnik. Ten przewodnik został pierwotnie stworzony i napisany przez Aloes. Na wypadek, gdybyśmy nie zaktualizowali tego przewodnika, możesz znaleźć najnowszą aktualizację, postępując zgodnie z tym połączyć.