1
\$\begingroup\$

I am specifically working in Garry's Mod, and I am wondering if there might be a way to hide things from players using noclip to travel outside the bounds of the level.

What I mean is, in some maps, there are rooms far away from the main map that are only meant to be accessed and seen via puzzles or other forms of obscurity, and I would like to create rooms like this in my maps potentially.

The issue is, players who noclip might be able to visually see these rooms. (Which is an expected part of gmod sandbox gameplay anyways and not really a cheat)

Although I know of ways to prevent them from actually reaching the room, my question is if there are ways to make these rooms invisible to noclipping players visually, either through tricking the rendering engine somehow, or even through LUA.

I've seen some maps where parts of the map were not visible during noclip, although not intentionally, and it makes me wonder if there's a way to do that on purpose.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

If you can prevent players from reaching the room then you can surround the room with a solid cube. That cube can then be textured with a greenscreen type effect to show the skybox and hide it from casual view.

Another option is to exclude the room from rendering until a certain trigger (that provides access normally) happens.

In most games this means that the textures and visual geometry of that room aren't loaded yet but the collision geometry is. Because textures take up a lot more space on the gpu than the collision geometry on the cpu.

\$\endgroup\$
2
  • \$\begingroup\$ Can you suggest how to implement this greenscreen effect in Garry's Mod? Or how to toggle on/off rendering of sections using a trigger? \$\endgroup\$
    – DMGregory
    Commented Sep 12, 2023 at 17:12
  • \$\begingroup\$ I do not believe these suggestions are possible within the garry's mod source engine; unless there's a way to implement the greenscreen-ish effect as an entity in LUA, in which case, please do share if you know what it is. there isn't a way to simply toggle the rendering of sections of the map, but hiding them behind something rendered afterwards may be. \$\endgroup\$
    – FenFox
    Commented Sep 12, 2023 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .