Making a full game out of Project Boost (devlog)

I kind of decided to lean into the comic book aspect of the game. I added a white border around the camera and I intend to go into that direction with several panels showing, like the character reacting to crashing or succeeding. I’m also going for a full comic-book UI too.

Since I intend on having dialogues and (hopefully) funny interactions between Professor Roussi (the official name of my main character :smiley: ) and Hervé (her assistant) I want the player to be able to skip dialogues and cutscenes if they don’t care about it. I like that stuff, but I don’t feel like imposing it on a game like that.

To start somewhere with this UI manipulation, and since it’s very new to me, I started by already adding a “restart” button, to skip the explosion etc when you explode. And I added a “skip” button to go directly to the next level when you reach the end of the room. And to accompany that, I put a prompt in a yellow box with black borders, like a descriptive bubble of a comic book.

I went for a very simple implementation:
A panel with a text and an image for each prompt. Then I put each panel to inactive on Start()

private void SetDefaultUI()
    {
        pressRPanel.gameObject.SetActive(false);
        pressSpacePanel.gameObject.SetActive(false);
    }

and I put them back to active in the respective cases.

2 Likes

Hinge joints!

Is a concept I didn’t know I wanted to explore, but I’m glad I discovered.

Basically, I was trying to figure out a way to make physics objects dangling from the ceiling as obstacle. I’ve used that lamp on a stick as a placeholder long enough that I thought it was time to tackle this concept. At first I searched for rope physics, but then I found this simple, eight years old tutorial that does the job forwhat I’m trying to do:

I ended up putting that in today as a quick half hour work session. And I also fixed something that was bugging me which was the black part on the bottom of the screen, that made no sense visually and took up space for no reason in that level:

Going forward, I’ll probably fine-tune the movement so that it looks a be more natural.

3 Likes

This is fantastic work!

1 Like

Thank you so much :grin:

IT’S BEEN A WHILE! I’ve been so busy at work and school that I just couldn’t work on that project in the past weeks, almost a month and I missed it a lot.

Also, I’ve been in a bit of a pickle with actually transforming the efforts I’ve produced so far into a full game.

The problem? Actually there were two!

  1. How to make more levels that are a bit bigger without having to make them from scratch everytime?
  2. How to deal with the camera?

Let’s talk about 2) first :sweat_smile:

My first attemp was to simply add a script to the main camera. I already have two scripts on it: one for the zoom-in in case of victory, and one to shake it up in case of crash. What I needed was a follow camera, and the code looked like this:

public class CameraMovement : MonoBehaviour
{ 
    public Transform mainCamera;
    public bool IsMoving;
    public Transform player;
    public Vector3 offset;
    Vector3 startPosition;

    private void Start()
    {
        startPosition = mainCamera.localPosition;
    }
    private void FixedUpdate()
    {
        if (!IsMoving) mainCamera.position = startPosition;
        if (IsMoving) mainCamera.position = player.position + offset;
    }
}

I basically had a bool, IsMoving, determine if the camera would move for this level or not, then if true, the camera would update its transform position to match the player, except with a Vector3 offset (on the Z axis) that I could set in the Unity editor. It worked…kinda. But it had a huge flaw: the camera didn’t care about the level boundaries, so you could see everything surrounding the level, which of course ruined it :see_no_evil:

So I went and searched for something else, more complicated and versatile, and I actually discovered that Unity has an addon called cinemachine that’s specifically addresses all the problems you can run into when programming a camera, be it in 2D or 3D.

Basically you install the addon and you create a Virtual Camera that will guide your main camera with tones of options. And let’s say that understanding what I was doing was not as straightforward as I thought…

At first I came out with this weird LSD angle:

After tinkering a lot, and actually understanding how the 3D bounds work in Cinemachine, I made this:

Now that this is done, I can move on to the other issue, 1) :sweat:
So far I’ve been struggling to move on from my little tutorial first level because I’ve dreaded the moment I’ll have to create everything from scratch for every new level, having to tinker with the camera, the basic assets placement etc. Now I have a plan.

I want to make two basic templates, empty levels: one the size of the first level, with a fixed camera position. And a second same size, also empty, but with a follow camera and 3D bounds. With the second one, I’ll basically duplicate the box and stack them on top of each other to make bigger levels. And it’ll duplicate the bouds too, so that I don’t have to worry about the camera going off track.

2 Likes

Really nice project :astonished: And really nice devlog :medal_sports: Have you finished your game?

Privacy & Terms