Very round about way to learn about portals

Just gotta mention my thought.

Seems this Portal thing has got Sam a bit off track.

Please tell me if I have got this correct.

The purpose of the Portal is to move from scene to scene (scene management).
If this is true.
It seems as if I want my player to exit thru a Portal. If Player comes back thru it should return him to same Portal Correct? … the one Player went thru…

If that is true than the only Portal in the scene that would have a -1 for SceneToLoad is our first Portal scene because there is NO scene to go back to.

In sandbox I have two portals… and I feel as if I do not need a Portal for start of scene only at its end or exit. This would allow Player to exit Sandbox into Sandbox2

In Sandbox2 I have two Portals, One at its beginning and One at its end.
When I go thru sandbox exit Portal I enter Sandbox2,
at this point if I go back thru that same Portal I go back to where I was just at sandbox exit Portal.

In Sandbox2 since its currently my last scene Sandbox2 exit Portal points to sceneToLoad 0 (back to start of game)

This was not presented very clearly does it Look like i got the general idea of what we need?

Thanks

PS: All this confusion did give me an idea.
It seems for my game I may want Portals within the scene.
I feel Like I am going to set up several areas of interest each scene. With an In Scene Portal system I could give my Player the ability to transport to any area. I may just create a Teleport system for In Scene transports.

I also have another question… Thinking about my WORLD map it may be better to have Unique Portal Names for each Portal? With a way for code to determine weather or not it is an in scene Teleport or a scene transition.

Thanks for helping me understand this section…

I believe the purpose of the -1 value for a scene to load is to indicate that the Portal hasn’t been configured.
The setup Sam and Rick use in the course treats the two scenes as a bit of a circle. In practice, you probably won’t be doing that in very many scenes. Either way, by using the identifiers, you can always specify which portal you’ll return to in a given scene.
There are circumstances, by the way, in which you might not want a portal to return to the scene it arrived from. One great example is in the trick maze scenario, where the only way through is to follow a specific path, and taking the wrong entrance brings you back to the beginning or makes you think you’re in an infinite hallway.

1 Like

I like that thought, it confirms my thought about in scene teleporters (portals) as opposed to scene to scene.

SO, bottom line is a portal moves an object(player or other) from one location to another, sometimes this includes moving between scene or levels depending on how big you made your terrain.

I have another good question about terrain size.
At what point is TO BIG…? 1024 x 1024
Seems if the terrain is big; less scenes are needed.
For performance it seems smaller terrain size and more scenes is the better way to plan???
Like a quest that has 10 things to do per scene…
10 scenes, that would be 100 things that the player did…

I am thinking I should have a better understanding of what my WHOLE world is… to better answer that question…

What do most people use for terrain size?
Seems the new terrain tools are good! I wonder when it will be out of preview?

I personally consider 1024x1024 to be overkill. Not only do you have to deal with that massive terrain in memory, but you also have to deal with all of the characters and buildings in the terrain… Every doubling in terrain size represents a quadrupling of memory needed (and by extension, assuming you have about the same number of enemies in each quad when you double your scene size, quadrupling the number of active scripts and updates running). At a certain point, as your scene grows, you’ll need to consider using techniques to deactivate enemies ai outside a certain range, etc, to reduce that overhead.
That’s the inherent advantage that our smaller scene size with lots of portals between them has. Individual scene performance goes way up, with the disadvantage of having a lot of pauses as you traverse from one sector to another. (And of course, another disadvantage is that your enemies are limited to the quad they start in, it’s harder to have something like a big boss that wanders from sector to sector).

1 Like

Privacy & Terms