3
\$\begingroup\$

I am trying some stuff on Unreal Engine to make something approching games like Commandos series. But for now, I'm stuck with something I can't figure how it is done : How are building interior handled ?

Here's a screenshot to illustrate what I say :

enter image description here

When you enter a building, everything become black, except the building's interior. The interior is isolated, there is no "communication" between the interior and the exterior, and between linked interiors. For exemple if you shoot with a weapon and there is an enemy outside just behind the door, he can't hear you.

Sometimes biggest buildings are divided in many parts, and each floor are a different "section" that are isolated from each other (you have a transition and can't communicate between). Here is an image that explain it well : Commandos 2 interior

Teleport : I first thinked that you were teleported to a different portion of the map, or a different small map, but it is unlikely. If you look at a window, you are at the same time outside (you can see your character outside at the window) and inside (you character is leaning out the window). Teleport would cause many sync issue.

Section toggle : Then, I thinked that the interior is already handled in the exterior map, but completely hidden, and when you enter it, it "deactivate" the exterior by hidding everything outside and displaying interior. Again, this is unlikely since map are full 3D (you can rotate 360°) and exterior are 2D.

How can I create this kind of transition?

I've specified that I am on Unreal, but I'm more searching the theorical way rather than Unreal specifics.

\$\endgroup\$
1
\$\begingroup\$

There should be a variety of ways to do that, I'm not familiar with how smooth the transition is in the screenshot you showed, but here it goes:

Organization: Organise your project, in such way that you have one object representing the "open world" (with all of its children) and one (or more) object each representing an "area", like a house or a cave.

Behaviour: Now every time the player approaches one of these areas, simply disable the open world, and enable that area, in such way, that the open world is still in memory, but its paused, and the new area unpauses (or is being initialised, depending how you plan to make the game). Also make sure that if in the open world you are drawing a sky (with skybox or any other way) to switch to drawing only black (or maybe another skybox?) so that the aesthetics match the area.

Return: When you exit from an area, back to the open world, do the same thing, pause the area, and resume the open world. Please note that if you are making a big open world game, you may need to dynamically create and destroy areas that are too far away, but this is a little off-topic.

Bonus transition effects: You can create some effects like when you disable an object, it will slowly fade its alpha value towards 0, and when you enable another object it will fade in the same way.

I'm unfamiliar with Unreal engine, but make sure that an object that is disabled (or paused) that it does not draw itself. In Unity I know this happens automatically.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for answer. The transition is quite smooth (I took screenshots from this video at 2:02 : Youtube video). As I said, I've already thinked about it, but what left me doubt about this one is that interior seems to been build completly apart from exterior, and that on some extremely rare instance interior doesn't concord with exterior (on some biggest buildings). But I will probably go for something like this, since it seems the easiest one. \$\endgroup\$ May 19 '18 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.