Besiege Guide

How to build an intelligent car - MCADA explained for Besiege

How to build an intelligent car – MCADA explained

Overview

This guide aims to explain how a partially automated steering assistant, the MCADA assistant, is able to allign the car with any given direction

The steering system

The first thing when installing MCADA in a car is determining the kind of steering system used.
This determines the structure of the mechanism and is the foundation for the assistant.
In the case of the self-steering hatchback, the used steering system is the so-called
big-black-RTC (BBRTC), and it works like this:

As you can see, moving the right joint cause the car to steer right, and vice versa.
The following depictions and explanations will refer to the right side of the car.

Defining an Absolute Direction – a First Design

Now that we know what steering system is used, we need to find a way to define an absolute direction the car should then allign with.
This can be done using VES,
a glitch based method of keeping a block from rotating around a certain axis,
and this is what it looks like:

Since we need a block that can be activated by moving an activator close enough,
it seems only natural to use nives (negative water cannons).
They work like positve water cannons, but generate no water and their thrust is reversed.
Most importantly, they generate roughly three times as much thrust when heated,
which works by placing a heating device in their vicinity.
A design based on these thoughts looks like this:

On a chassis, it looks like this:

  • You can see the nives (green),
  • The BBRTC (orange),
  • Its conection (darker orange) to the moving components,
  • And the VES above the nives
    with an attached heater (a torch)

Because the VES is yet to be activated,
the heater is turned by 90°.

Now this is how it works if the nives are activated:

  • The vehicle turns left,
  • the VES will not rotate as it is suspended on a joint,
  • so it turns right, relative to the turning car.
  • Now the heater is directly above the nives on the right.
  • Heating them and in turn pushing the whole mechanism forwards.
  • Because we are looking at the right side of the mechanism, the car then steers left.
  • This persists until the heater is no longer above the nives and the desired direction is reached.

You now mirror the entire mechanism to the left, so when the car has steered too much to the right, the same mechanism turns the car automatically to the left.

To change the direction, we simply place the heater on a steering block,
which then is placed on the VES.

As you see, we already have a basic driving assistant!
There are some problems with this still rather simple model which will be adressed in the following sections though.

Moving Backwards – Incorporating Another Driving Direction

So, our assistant works on a basic level.
But there is one thing it does not take into account yet:
Cars also drive backwards.

The issue here is that the steering reverses as the direction the car moves reverses,
so turning the wheels right results in steering left instead when driving backwards,
instead of steering right when moving forwards.

The basic thing that needs to be done is simple: The mechanism has to be segmented, so that there is our normal set of nives which is only active when moving forwards,
and a new set of nives that is only active when moving backwards.

This new set has to be mirrored so that it lies left instead of right from the heater, and vice versa.
The question is now: How can we have these two seperate sets?
There are three possible ideas:

  1. Activate the two sets with the corresponding keys,
  2. Have two different heaters activated by the two keys or
  3. Move the heater around so that it can only activate one set of nives when it should.

1. and 2. have one problem in common:
They are only active when the player presses the key. This means that the assistant can’t be active when the car is rolling, which is very important since constant activation would then require the maximum speed.

3. solves this problem in a very elegant way: The Multilayer System.
This describes putting the nives below each other,
so that the heater can be moved up and down to activate certain layers of nives:

Since there is no fire source that has a completely from the hitbox seperate heating area,
the heating area is “dipped” into the nive layers from above.

Because the upper layer, our original set of nives designated to drive forwards,
is heated if we want to reach any layer below, there needs to be a layer below that which has the exact opposite thrust both heated and cold.
This guarantees that the thrust from our “forwards” set of nives
is counteracted and effectively deactivated.

The layer below is the “backwards” layer, where the nives are at the opposite side of the VES to invert steering.

So far, so good.
But this alone does not solve the problem,
as we didn’t discuss how the heater is moved up and down. Yet.

Memory Cells – A Simple Way of Storing Input

The solution I’ve come up with is simple, but effective:
A piston moves a block up to attach it to a grabber which is activated by the “opposing” key,
and vice versa:

This how it looks in action:
Starting in the “forwards” layer, moving down to “backwards” and back to “neutral”

This is how it looks built into our chassis:
As you can see to the right, the “forwards” nives (green) and the “backwards” (red)
form the three layers while neagting each other’s thrust.
To the left, you can see the memory cell (yellow) braced (white) to the VES (blue) with the attached and now moveable heater.

Now, whe have a working multilayer system:
Starting from the neutral state, the memory cell will stay in the state of the last activated input: when the opposing input is not given long enough, it will switch to the neutral state, where no steering action is performed, as the depiction in the last section shows. Further giving the opposing input will then switch to “backwards” state and reverse the steering.

The practical equivalent is this:
The car drives forward, activating normal steering, and then you tap Down to stop the car, but because you didn’t press it long enough, the steering system assumes the car is not moving and doesn’t steer. Further pressing Down will make the steering system then steer accordingly.

There is just one problem I didn’t mention until now: As the nives push the hinges connected to the BBRTC forward, they push the car itself forward as well.
If left like that, you get an impractical driving assistant which uncontrollably drives forwards: there is an easy fix to this though: you add the entire mechanism again, but reversed.
That means that on this component, all layers have to be fully occupied,
whereas only one side was occupied on the steering components,
since it should only steer left when the desired direction is to the right of the car.

Since one side of our steering components will be always active if the direction isn’t alligning with the car however, both sides of the layers need to be occupied.

SteamSolo.com