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.

Basic Version of Intro

Lots of progress done on saving / loading system.

Super busy of late.

Anyway, finally got a basic version of the intro, loading screen, quit + fade to start screen going:

Basic Version of Intro

This stuff takes way longer than you’d expect. So much effort for these tiny details, but they really do contribute to the overall impression.

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:

// 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.