Time Travel

From Valve Developer Community
Jump to navigation Jump to search
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
Broom icon.png
This article or section should be converted to third person to conform to wiki standards.

Time Dilation

point_clientcommand and host_timescale can be combined to alter time in game. The default is host_timescale 1.0. Less than 1.0 and above 0 will slow time. Entities output delays will be affected, keep this in mind. May require sv_cheats 1.

logic_timescale Portal 2 does the same as host_timescale but without sv_cheats 1.

Portal Time Design

So, you want to make a Time Travel chamber, huh? You must be really scraping the bottom of the barrel now, as that's one of the most hackneyed things done on the Portal 2 Workshop nowadays. But, if you insist, I will teach you how to do it. Just so this wiki page isn't blank anymore. Okay, let's go.

The First Step

So, where do we begin? Well, first, build the room the map will take place in! For this tutorial, let's just stick with a regular, clean test chamber. That's right, make a simple test chamber. Use clean textures and models only. Doesn't have to have a hard puzzle. Just needs some substance for the time travel to matter. After you've built the test chamber, select everything and copy it to a different area of the map, where it is not near or overlapping the original chamber. Then, replace all the textures and models in the copied chamber with the dirty variants, (A few things used may not have dirty variants, but it's fine.) and scatter some of Portal 2's vegetation models around. Moss, vines, all that. And try to place them realistically, if you can; if this were a real room, could a plant grow in the spot you're placing it in?. So, now you have two of the same test chamber in the map, one clean, one all dirty and overgrown. Make sure the rooms are all nicely neat and contained, no leaks or any other problems present. And if you can, make sure the test is solvable.

Back To The Past/Future

Now that you've got your chambers, what do you do? Simple. Make a simple sort of gateway somewhere in the chamber; later on if you're savvy with creative use of models or good brushwork, you can make more complex portal frames, but for this tutorial, we'll go simple. Make a square arch, and if you want, insert a prop_testchamber_door into the center of it. (Make sure it's got the proper surrounding frame) After that, place a linked_world_portal in the middle of the gateway. When selected, the red axis originating from the model will point out the front side of the portal, which will also be highlighted by a yellow line in the 2D view windows. This is the key to your "time-travel;" an artificial portal connecting the clean chamber to the dirty chamber. After you've built your time portal, be sure it's present in the exact same location in the opposite chamber as well, and rotate the second linked_world_portal 180 degrees so that it is facing the opposite direction of the first one you made.

Entities to change atmosphere

  • env_screenoverlay apply changes to camera to convey different vibes and show time passage. (Ex: dusty/cobweb/broken view)
  • env_texturetoggle change the textures on brush entities or overlays.
  • env_tonemap_controller change the tonemap for all players. Tonemap affects the color and tone of the players view.
  • trigger_tonemap change the tonemap to individual players.
  • env_global Global states persist across level transitions. NPC’s like npc_citizen and npc_metropolice can go from “Pre-Criminal Gordon” state. This allows mappers to have friendly and hostile states for the same npcs on the same map.
  • ai_relationship Changing relationship can allow multiple types of interactions for players.

Now, linked_portal_door are finnicky; several things can cause them to break or close on their own, like a brush entity moved near them. func_traintracks and such. So try to avoid letting that happen. The size you will want to set for the portal will be half the length and height of the space the portal takes up, as read on the 2D camera views. Make sure you have an output in the map set to open up the prop_testchamber_door you put over the portal. Otherwise, you won't be able to go through it! After that's all set, compile and make sure that everything's working right. If it is, when you walk through the time portal, it will appear that you are in the same room--but in the distant past or future! Depending on how you view it.

What next?

You've got the basics for a Time Travel chamber now; what you could go on to doing with the concept is making test chambers that incorporate the different time periods to change the test chamber, make a fancier frame for the time portal as previously mentioned, and maybe even construct different methods to execute the time travel. What you do from now on is up to you; I just told you the basics. Alright? And if you do go on to making a time travel map after reading this, please . . . just quality-control it with some well-versed mappers before releasing it. Otherwise, you might end up re-creating the time mashine {concept} by duboiszt.

Todo:  if desired; make more detailed, for newbies who can't quite understand every bit of this page