Day 2


Today I started implementing all the major mechanics:

  • every object has a gravity;
  • you can change your gravity (your color and speed changes too);
  • added a trail to the player so it's easily recognizable;
  • the moons are randomized in size, the color and gravity magnitude depends on the size.

Every time I needed remapping a value to another set of bounds I used an inverse lerp and then a lerp. I learned this function some days ago and I'm using it all the time now. The static class and static method look like this:

public static class Maths
{
    public static float Remap(float minSource, float maxSource, float minConv, float maxConv, float toConv)
    {
        float t = Mathf.InverseLerp(minSource, maxSource, toConv);
        return Mathf.Lerp(minConv, maxConv, t);
    }
}

The trail is made with the trail component in Unity. It's pretty exhaustive, there are a lot of functions to personalize it. More importantly: it saved me a lot of time!


Next up

We had a lot of ideas: adding a moving breathing black hole to launch the moons into, use the change of gravity to shoot out the moons, making life-restoring moons and using the doppler effect for some funny approaching moon sounds.

Files

RFU 0.1b.zip 20 MB
Dec 03, 2020

Get Run for Uranus

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.