1. KitHack Model Club
  2. News

KitHack Model Club News

What's in a name?

Hey everyone, Notice anything different? It won't take much searching to notice the new name "KitHack Model Club". What's with that?

As it turns out, the old name is not one we have as much freedom to use as we thought we had. It came as quite a surprise, but instead of dwell on the matter, we put our thinking caps on and came up with "KitHack Model Club."

To be honest I think this one might be even better. In the completely invented etymology of the word ‘kit-hack’, you will find shared roots to other words like ‘l33t-hacker’ or ‘hack job’. It definitely feels on point for a lot of the things we come up with in the vehicle editor.

In any case, It's not a dramatic departure and is still synonymous with all things model building, tinkering and customising. What's more, we're pretty confident this name is all ours!

The new name is not the only news coming to this page over the next few months. Make sure to keep an eye on here, because we've got interesting things coming in the very near future. Cheers!

Make sure to join the Discord for the latest news!

Dev Blog - Scenario Editor Deep Dive

Hey everyone,

I want to talk about the Scenario Editor today. This is a tool for creating gameplay in the game, starting from placing props around the game world, to setting up the functional logic that makes a mission work.



There is a lot we could talk about here, so I'm going to get right into it. Expect things to get very technical.

At the very core of the editor system are Props and Modules.



Props are objects you can place around the map. These can be anything from set decoration, track markers, to functional mission elements.



Some props are also procedural, like the geotex runways you can lay down anywhere, and they will adapt to the terrain.



Once placed, you can right click a prop to see its properties panel. Here you'll find various options to configure it, and also potentially various triggers. We'll look at those in a bit.

Scenario Modules are modular behaviors that can be used to set up the game or do the various things that missions might need. If you've used the Unity Engine before, this will probably feel very familiar.



Once you add a module to a mission stage, you can configure it using the sidebar panel. Each module has its own set of options here, and most of them will have inputs or outputs for triggers.

Triggers are the main way by which the different bits of the scenario logic can communicate with one another. Props and Modules can generate triggers, and you can connect trigger inputs from other things to these, so that when that trigger signal goes out, whatever is plugged in will receive it.



If this sounds a lot like a system of events and listeners to you, then you are very likely a programmer, and you are very much correct. That's exactly what they are.

To connect them, you just need to click the little port item on the input, and this will show all trigger outputs you can select. Just click on any of those to select it and you've now plugged a trigger onto a trigger input.

Another very big part of the scenario logic system are Parameters. These are a fairly recent addition, but since we introduced them they've completely changed the way we approach mission making.



Parameters are very much like global variables. They are defined in the mission parameters panel, and are always accessible to everything in the mission. They can be Bool, Int, Float or String types, and type conversion is fully supported.

Parameters can be read by or written to by props and modules using parameter input and output ports, which are connected in the same way you would link up triggers. To make it clear if something is going to be reading or writing, we've got different styles of input and output ports.



And lastly, Parameters can also come in the form of Expressions. Expressions are basically a line of script code, which gets evaluated and stores the result in the value of the parameter. This can be literally anything. It actually is a line of runtime compiled C# code, which allows you to access anything in the game, including the value of other parameters.



One of the main uses of parameters is for scoring. We made a special syntax that is supported in pretty much every text field missions use, where you can have the value of a parameter inserted into text. This gives mission authors full control over what is displayed during the mission, so you can create whatever mission structure you want.

Props and Modules typically have a combination of parameter and trigger inputs and outputs, and with those you can set up most of the mission logic for anything you might need.

Lastly, we have Scripts. You can use scripts through the Script Module, which lets you write actual code, which gets executed by an input trigger signal. Scripts are basically C# code, but they also support our custom syntax for accessing mission parameters.



You can also generate your own triggers from script, using another bit of custom syntax. We've got a precompiler process on scripts that picks out and generates scenario triggers for any occurrence of a triggering vocation in the script. You just call it up in the script, hit compile, and a new trigger appears on the list underneath.



Scripts are a also quite new to the Scenario Editor, but we are working on a complete scripting API, to make common operations easy to use via a set of commands. This will grow over time as we fill it out --we first need to figure out which operations are actually 'common' ones... We're calling it the ScnAPI, and it will also be supported for expressions.

There is a lot more I could talk about here, but this post is getting rather long already, and I couldn't possibly cover everything here.

We're hoping to do a series of tutorials on how to use the scenario editor, and we'll also have the documentation for it published along with the modding SDK. --and I should also mention, as a modder, you are fully able to create your own scenario modules to use in missions.

So that's about it for this post. I think this is one of the things I'm most excited about seeing other people use, once the game is out. I can't wait to see what people come up with using these tools.

As always, thanks for reading, and see you next time!

Felipe (aka HarvesteR).

----------

For all things KitHack Model Club, follow us on Twitter (X), and join us on Discord!

Reddit AMA with creator - Felipe Falanghe

Hey KitHackers,

We've got some exciting news for you! The visionary behind KitHack Model Club and Kerbal Space Program, Felipe Falanghe, will be the host of an exclusive Ask Me Anything (AMA) session on Reddit. Mark your calendars for November 23rd at 16:00GMT (08:00 PT, 11:00 ET, 17:00 CET) to get involved.

This is a great opportunity to dive into the mind of Felipe and discover the inspiration behind KitHackModel Club. Discover more of the complex mechanics he’s been working on, the challenges, and all the lessons learned between the two games.

The AMA will be hosted on the r/KerbalSpaceProgram subreddit. Felipe has made a post on the subreddit today under his username (/KSP_HarvesteR) here. If you have any questions for him, please respond in the thread with questions and he will answer as many as he can tomorrow.

Make sure to join us on Discord for the most up-to-date information and a chance to get hands-on with the game. Thank you for reading, and we hope to see you there!

Follow us on Twitter (X), and join us on Discord!

Dev Blog - Vehicle Wobble Physics

Hi everyone, Felipe here. Today I want to talk about the physics of wobbling, and how we implemented (and got it under control) it in Kitbash Model Club.

[h3]Part 1 - Wobbly Aerospace Engineering[/h3]

So here's the problem: in a game where you have breakable vehicles that are made of parts, you need to somehow simulate the strains and stresses between those parts.

Back in KSP, the way it worked was that each part was a separate rigid body. They were all connected together via PhysX joints, and with those, we could just let the physics engine do its thing and joints would snap on their own when you put enough force on them.

The problem was (still is) that when you simulate linked rigidbodies like that, the position of any one body affects the position of all the others, which in turn affects it back, so you need to run multiple iterations to solve all positions every frame.

The more iterations you do, the more solid the whole assembly appears to be, but you can probably imagine this is not going to be great for performance.

If you want an infinitely rigid construct, you have to run infinitely many iterations. There is no way to just set a 'wobble scale' value down to zero.

The end result is that even with a very large number of iterations, you can always build something complex or large enough to see instability in your joints, and that instability shows itself as overly flexible connections that should have been rigid.

So I spent a lot of time back then, thinking about how I would do this if I could start over. And over time I came up with a plan.

[h3]Part 2 - Welding it all together, so it doesn't move.[/h3]

In KitHack Model Club, I decided very early on that I was not going to treat parts as separate bodies. Instead, there is a single rigid body for the entire vehicle, and all parts are child objects of the vehicle.

This way, the vehicle is inherently solid. It has the shape of the aggregate of parts, but there is only one physical entity being simulated.

Ok, that certainly gets rid of the wobbling... but then that creates new problems. How do we figure out whether a part should break off? What point is there in using Struts? How would anyone ever be able to pull enough Gs in a display of excellent aerobatics to shear their own wings off?

Without the joints there to flex and bend, we needed to come up with another way to do those things.

[h3]Part 3 - Internal Wobble Physics[/h3]

My plan for this had been brewing for nearly 10 years now (wow I feel old).

The idea is to use an independent, separate simulation for the wobble alone. We use a custom physics integrator, which treats each part as a body that is connected to its neighbours via constraints, or joints.

That sounds an awful lot like the original setup doesn't it? It actually is... but the key word here is separate.

In this 'internal' simulation, the vehicle lives in an inertial reference frame. We calculate and subtract all of the vehicle's root motion from the simulation, so what you're left with is only the motion between parts, aka the wobble.



We called this Internal Physics. It gives us a place where we can cause joints to flex and bend, but here we have full control over everything that goes in and out.

What we do then is take all of the forces that happen to the external rigid body (collisions, engine thrust, wing lift/drag, wheels, etc), and we also feed them into the internal physics. The external physics causes the vehicle to move as a whole, and the internal physics causes parts to move in relation to one another.

But most importantly, we can now have coupling constants to scale down these forces we are putting in. These are the 'wobble scale' parameters I had been wishing for since the early days.



You couldn't do this with a single physics model for the entire thing. If you scaled down the forces, your vehicles would just move less. But the wobble being separate from the external physics, this doesn't affect the behaviour of the vehicle as a whole.

This all means that the internal physics can actually be a very simple simulation. It doesn't need to run a lot of iterations, because we can scale down the input forces instead. There are no collisions either, because those happen on the outside.

It doesn't even need to run on the same thread, because the internal objects don't interact with the outside world directly. We actually offload the simulation to a background thread, which means we can let it run while the main game thread does other things for the current frame.

So in a nutshell, that is how the internal physics works in KitHack Model Club. There is a lot more I could write about this thing, but I've gone on for long enough already. In fact, props to you for reading along this far!

As a little reward for making it this far, I’m happy to announce that our next Alpha Test is happening very soon! How soon? November 16th to be precise!

In Alpha Test 2, we’ll be testing multiplayer, KitHack Model Club allows for up to 16 players to get together and battle it out, or you know, just show off your models.

Players from Alpha Test 1 will automatically be enrolled into Alpha Test 2, and an additional wave of new players will also be invited to play in Test 2, so keep an eye on your emails for more information and instructions!

We’ll also be organising play sessions with the community in the Alpha Test Channel on the Discord at specific times during the 2 week test to give us opportunities to really stress test the 16 player load! Hope to see you there!

Thanks for reading, and see you on the next one!

Felipe (aka HarvesteR)



For all things KitHack Model Club, follow us on Twitter (X), and join us on Discord!

KitHack: Introducing Scenario Mode

The Scenario Editor is a powerful tool for creating gameplay in KitHackModel Club. In fact, this is the same tool we use ourselves to create all of the stock missions.

The editor allows you to set up missions of any type, from simply placing props around the world or spawning NPCs, to setting up complex gameplay logic using a system of behaviour modules, which are interconnected by signal triggers.

Modules and Triggers allow you to create gameplay logic without needing to write any code, but there is also support for C# scripts and expressions compiled right in the editor. No need to create a visual studio project.

And of course, Scenarios and Scenario Modules are fully mod-enabled, so if you are a developer, you can create entirely new plugins as C# assemblies, to add new modules and scenario types, new game props with custom behaviour, or anything else you can come up with.

The Scenario Editor also works not just for Multiplayer, but literally in Multiplayer. As a session host, you can act as Game Master and create and modify scenarios on the fly, changing the world around everyone else as you see fit.

For all things KitHack Model Club, be sure to join our Discord, and follow us on Twitter!