Title Screen

Title screen in Manifold Garden now changes based on player progress throughout the game.

Title Screen

Wanted this feature for years. Finally added it.

The code is still super messy, and I’ll probably want to clean it up soon before it gets to be unmanageable.

The hardest part here is making the title screens scenes as they don’t use the usual scene optimization process, so there’s a lot of manual work involved.

Water + Portals + Saving & Loading

I finally got water going through portal working with saving and loading.

water through portals

It’s not perfect, but the basics are there.

This is a really big step. It may not look like it, but there are a TON of really complicated systems at work here.

Level streaming loading, persistent save system, portal, water, etc.

The next step will be to refine this.

Of course there’s a bunch of edge cases, so the beta testing for this will be very interesting.

Saving Image

Worked on optimizing saving today.

At the start of the day, it was 1000 ms as it was running in the main thread.

Had it run in a separate thread, and also split up texture2D.ReadPixels to happen over multiple frames.

I’m saving a small screenshot of the game to use in the load game screen.

Intead of doing ReadPixels all at once, I read it in chunks over the course of several frames. Much better performance.

Code here:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Saving by one slice each frame
        screenshot.ReadPixels(new Rect(0, 0, width / 4, height), 0, 0);
        yield return null;

        for (int i = 1; i < 4; i++)
        {
            current_tex = RenderTexture.active;
            RenderTexture.active = renderTex;
            screenshot.ReadPixels(new Rect(width * ((float)i / 4), 0, width * ((float)i / 4), height), (int) (width * ((float)i / 4)), 0);
            RenderTexture.active = current_tex;
            screenshotCamera.targetTexture = null;

            yield return null;
        }

screenshotCamera.targetTexture = null clears the player camera.

Took a while to figure this one out. Without it, the screen kept going black momentarily.

Tree Band Problem

David fixed the issue with the floating branches when you merge the tree. Mostly it had to do with getting quaternions right to handle the correct rotation.

We had another problem though, with the bands on the tree:

treebandproblem

These are only supposed to appear at the base of the tree to indicate how many fruit cubes grow from it. I think Chris wrote the script so that it should only go on the trunk part, which should be separate from the rest of the tree.

Anyway, right now it is getting applied to the entire tree.