Ce guide est entièrement consacré aux fusées, programmation, et les mathématiques, mais ne’ne t'inquiète pas, il’ce n'est pas trop compliqué! je’Je partage quelques scripts de base que vous pouvez utiliser et modifier à vos propres fins. Gardez un œil sur ce guide car je’je le mettrai à jour régulièrement avec de nouveaux scripts au fur et à mesure que je les trouve. Have fun exploring and adapting these tools to suit your needs!
introduction
je’m a beginner with Juno, et moi’m not familiar with rockets or rocketry. Pendant que je’m confident in my programming skills, je’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.
Le script
Donc, Vous savez, having the highest possible TWR (que’s Thrust-to-Weight Ratio) might seem like the best thing ever, droite? Mais bon, turns out it can be kinda « inefficient » parfois. Pourquoi? Bien, drag and other stuff get in the way, making it not as awesome as it sounds.
Donc, toi’je réfléchis, how about we get all fancy and automatically adjust the throttle to keep that TWR steady during a burn? Sounds cool, droite? Bien, hold on a sec. There are a few things we gotta remember if we wanna do this the « droite » 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, il’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.
Maintenant, onto Vizzy, which is new territory for me (as is this entire game). toutefois, I believe I understand the basics. Il’s a visual programming tool that enables us to create scripts. Compte tenu de cela, I recognize that the scripts I develop here may not be the most efficient. Après tout, this guide is aimed at simplicity. Perhaps in the future, je’ll craft more intricate and refined scripts.
Laisser’s start by sharing a screenshot to give you an idea of what it looks like. Alors, je’ll delve into the process and the math involved.
D'accord, laisser’s break it down.
Donc, nous’re kicking off the script, droite?
Au début, nous’re just setting things up.
Alors, nous’re throwing in a few display messages every 3 seconds just to add a bit of drama. Pourquoi? No real reason, just for fun.
Ensuite, nous’re adjusting something called the throttle. Nous’re pegging it at 77%, which is basically just picking a random number. You could set it to 0 if you felt like it.
Maintenant, nous’re getting to the main event. Nous’re activating a stage, waiting for 3 secondes, and then diving into an endless loop with the instruction While(vrai). This loop is the heart of the script. Il’ll just keep going and going until you tell it to stop.
Inside this loop, nous’re getting into some math stuff. Nous’re aiming to keep something called TWR (que’s Thrust-to-Weight Ratio) at a certain level. Nous’ve got a custom variable called Target_TWR that we’re setting to 1.8. Pourquoi 1.8? Bien, que’s just what we’je vise à. You might pick a different number depending on your spacecraft.
Maintenant, ici’s the loop doing its thing: adjusting the throttle. We want to make sure the TWR stays where we want it, donc nous’re constantly tweaking the throttle up or down. If the TWR gets too high, nous’ll cap the throttle at 100%. If it gets too low, nous’ll drop it to 0%. This loop keeps running, fine-tuning the throttle every frame to hit that sweet spot.
Ici’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, toi’ll aim to hover. But keep in mind, any previous motion will keep your craft moving. Donc, c'est gagné’t truly hover here; il’ll just maintain its current speed.
À l'avenir, je’ll build on this basic script and demonstrate a practical use for it in Juno. je’m thinking of creating a simple hover script for a specific altitude above sea level (ASL).
Avec un peu de chance, this simple script gives you some inspiration and ideas for what you can do with scripts like these. Amusez-vous à expérimenter!
C'est tout ce que nous partageons aujourd'hui pour cela Junon: Nouvelles origines guide. Ce guide a été initialement créé et rédigé par Aloès. Si nous ne parvenons pas à mettre à jour ce guide, vous pouvez trouver la dernière mise à jour en suivant ceci lien.