• Register
Post news Report RSS Devlog #3 - Portals

In today's blog post we will talk about one of the game features you will encounter on the maps: Portals. Similar to the ones from the game with the same name, in Classified Stories, a portal is a magical doorway that connects two locations.

Posted by on

Hello detectives,

In today's blog post we will talk about one of the game features you will encounter on the maps: Portals. Similar to the ones from the game with the same name, in Classified Stories, a portal is a magical doorway that connects two locations.

Visually, the effect is awesome and if you enhance it with some eye candies (like particles) you obtain quite great results.

Here is a preview on how a portal works and looks in Classified Stories:

*For this demonstration we removed any other particles


As you can see, the player enters the small garden shed only to smoothly teleport himself to another building, the main farm house.

How did we achieve this effect?

First, here is a screenshot of how the garden shed (location A) actually looks like. A small room, where you can barely move:

Empty garden shed


And here is the farm house main hall (location B).

Farm House main hall with door frame


In order to trick the player, we added a 2D plane right before the entrance. To draw what player sees, we render the world from the second camera perspective, then render a depth/stencil mask in the location of the portal (the white rectangle):

White plane


Basically, we take a screenshot of the second camera POV and we draw it on the white plane. Each frame. :)
Besides that, we have a simple script which is used on the camera to control it. When player rotates or moves, we also rotate or move the 2nd camera.

The last part is the player's teleportation. This is simple. When player collides with the white plane, we move him to the second location. You can see that door frame from the previous picture. In the full game, the frame is not rendered but we use it to store the new player's position.

Wishlist on Steam:

And follow us on:

Twitter
Facebook
Indiedb

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

News
Browse
News
New
Post news
Report
Report
Share
Related Games
Classified Stories
Classified Stories Adventure
Related Engines
Unity
Unity Commercial
Related Groups
RVL Games
RVL Games Developer & Publisher