DEV Community

Akira Game
Akira Game

Posted on

Our game progress ~ Mirror ~

Introduction

In the previous posts, I introduced the basic concept of the game and implemented the login screen. From this article onwards, I will introduce the implementation of the main part of the game. We will cover the following topics, each of which is currently under active development.

  • User Animation and Items
  • Timer
  • Basic Rules ( Victory, Defeat )
  • Mirror
  • Mirror Movement ( Through, Break, Trap )

This post will shows the implementation of Mirror.

Summary of the implementation of Mirror

One of the main game mechanism in our game is the Mirror world. Players in both Survivor and Hunter can use mirror to move to the mirror world.

Additionally, mirrors come in two types: available and unavailable. Therefore, it was necessary to implement a way for users to distinguish between them.

Here's what we implemented this time:

  • Setting Mirrors
  • Materials for identifying availability
  • Display of key input instructions

I will explain the implementations of moving via mirrors and breaking mirrors in the next post.

Setting Mirrors

At this time, due to the large number of mirrors, we've created multiple mirrors on the level and manage each of them as a list. They are randomly determined to be available or unavailable. Below is an implementation example.

foreach (Mirror mirror in mirrors)
{
  string mirrorName = mirror.Name;
  if (UnityEngine.Random.Range(0, 2) == 0)
  {
     photonView.RPC("SetMirrorMaterial", RpcTarget.All, mirror.Name, "new");
  }
  else
  {
     photonView.RPC("SetMirrorMaterial", RpcTarget.All, mirror.Name, "original");
  }
}
Enter fullscreen mode Exit fullscreen mode

Materials for identifying availability

Looking at the implementation example above, you might notice that we change the material depending on whether the mirror is available or unavailable. In the actual game, when a mirror is available, it appears to be blight, making it easy for users to distinguish.

This time, we used materials, but I believe that using effects would make the game even more immersive. Therefore, I'd like to challenge using effects in the upcoming sessions.

Conclusion

To achieve a better design, I found out that creating custom materials could be one approach. However, this process may require additional time, so it's essential to consider it in terms of development priorities.

  • User Animation and Items
  • Timer
  • Basic Rules ( Victory, Defeat )
  • Mirror
  • Mirror Movement ( Through, Break, Trap )

Top comments (0)