itch.io is community of indie game creators and players

Devlogs

Day 2

Run for Uranus
A downloadable game for Windows

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
Download Run for Uranus
Leave a comment