MAD: Game DevLog #5: Game Over

Image by Steve Buissinne from Pixabay

Hello,

I don’t think I’d like to invest time and resources in this project anymore, I had fun programming it and learning about different aspects of game development and the Unity game engine.

Making games involves a lot of hard work and I initially started this in order to escape from my ordinary programming activities, to do something different.

Next, I think I’m going to shift my focus to some areas that will benefit the development of my career, like, trying to learn more about computer security and getting better at solving problems.

If you wanna checkout the game you can do on itch.io

I’d like to thank Andrei, Maxi and everyone who supported this project!

Before ending this article, here’s some Unity tips we’ve found useful while working on this game:

Make an atlas for prefabs to instantiate

Instead of setting prefabs to game objects manually in the editor, which is prone to error, you can make a static class to hold each prefab, this way can Instantiate all your prefabs programmatically.

    public static class PrefabAtlas
    {   
        /* Snow Walls */
        public static readonly GameObject DestructibleHighSnow =
            Resources.Load<GameObject>("Walls/destructible_high_snow");
        public static readonly GameObject DestructibleSnow = 
            Resources.Load<GameObject>("Walls/destructible_snow");
        public static readonly GameObject IndestructibleWoodCrate =
            Resources.Load<GameObject>("Walls/indestructible_crate");
    }

Instantiate(PrefabAtlas.DestructibleSnow)

Avoid classic singletons.

If you want to use classic singletons for your game logic or state then you may get things messy, depending on your specific use case, because Unity manages the lifecycle of MonoBehaviour classes.

To create a singleton in Unity you can inherit from Singleton:

public class MySingleton : Singleton<MySingleton>
{
    // (Optional) Prevent non-singleton constructor use.
    protected MySingleton() { }

    // Then add whatever code to the class you need as you normally would.
    public string MyTestString = "Hello world!";
}

Thank you!

References:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.