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 )

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay