هذا الدليل يدور حول الصواريخ, برمجة, والرياضيات, ولكن لا تقلق, إنها ليست معقدة للغاية! أشارك بعض النصوص الأساسية التي يمكنك استخدامها وتعديلها لأغراضك الخاصة. راقب هذا الدليل لأنني سأقوم بتحديثه بانتظام بنصوص برمجية جديدة عندما أجدها. Have fun exploring and adapting these tools to suit your needs!
مقدمة
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
لذا, أنت تعرف, having the highest possible TWR (that’s Thrust-to-Weight Ratio) might seem like the best thing ever, يمين? لكن مهلا, turns out it can be kinda “inefficient” sometimes. لماذا? حسنًا, drag and other stuff get in the way, making it not as awesome as it sounds.
لذا, you’re thinking, how about we get all fancy and automatically adjust the throttle to keep that TWR steady during a burn? Sounds cool, يمين? حسنًا, hold on a sec. There are a few things we gotta remember if we wanna do this the “يمين” 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.
الآن, onto Vizzy, which is new territory for me (as is this entire game). لكن, 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. بعد كل شيء, 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. ثم, I’ll delve into the process and the math involved.
تمام, let’s break it down.
لذا, we’re kicking off the script, يمين?
At the beginning, we’re just setting things up.
ثم, we’re throwing in a few display messages every 3 seconds just to add a bit of drama. لماذا? No real reason, just for fun.
المقبل, 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.
الآن, we’re getting to the main event. We’re activating a stage, waiting for 3 ثواني, and then diving into an endless loop with the instruction While(حقيقي). 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. لماذا 1.8? حسنًا, that’s just what we’re aiming for. You might pick a different number depending on your spacecraft.
الآن, 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. لذا, it won’t truly hover here; it’ll just maintain its current speed.
In the future, 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).
Hopefully, this simple script gives you some inspiration and ideas for what you can do with scripts like these. Have fun experimenting!
هذا كل ما نشاركه اليوم من أجل هذا Juno: New Origins مرشد. تم إنشاء هذا الدليل وكتابته في الأصل بواسطة صبر. في حالة فشلنا في تحديث هذا الدليل, يمكنك العثور على آخر تحديث باتباع هذا وصلة.