# Do you think it is possible to make an optimized infinite map in gmod?

Do you think it is possible to make an optimized infinite map in gmod? I know someone made the mine-craft game-mode an infinite map as far as I know and I was trying to see if we could simply reproduce that to get an infinite map.

Couldn’t we just use have something that keeps track of everything at a certain position and then will only render that stuff when the player tells it to move to the next render area?

So if the player is at Vector(0,0,0) it will render everything up to like vector(500,500,500)Might be to low don’t know what would be to large or low, and when the player reaches past the vector(500,500,500) boundaries it will render another section of the map and essentially reset the players vectors back to Vector(0,0,0). We just keep track of their location by saving the x,y,z, numbers on the players variables like: ply.x = 0 ply.y = 0 ply.z = 0

This is all just theory and I am pretty sure that there is a BUNCH wrong with this, but I feel it can be done.

It’s been done before the gmod 13 update. Gravity Hull Designator.

I thought that tool was only used to keep you stationary to the prop you are standing on while in motion.

He also had an experimental infinite map.

There’s a train map that while itself is not infinite, the ground over which it travels is.

Strangely enough I brought this exact same question up yesterday on cre8ive…

Don’t really think it can be done…

I probably am going to work on this and see what I can do. I would love to see it being used by all of gmod if it was extremely optimized and eliminated the map cap size.

If I do start on this I will more then likely open a github.

Source crashes if you go beyond a certain x, y or z value. People can crash your server by using Easy Precision and using a high offset above a certain amount.

That alone makes me believe it will never be infinite. I’m also wondering how you want to make a map without having any form of brushes / a skybox, adding either of these means that it’s not infinite.

Well OP’s suggestion, which isn’t a new one, gets around the x/y/z limit. Basically theres an area lets say 100x100 in size, when you hit 100 your x/y/z will go back to 0,0,0 but the set of entities/props that are rendered would be different. If you repeat this process 4 times it will be like you traveled 400 units however you’re in the same location, just rendering anything within the ‘4th area’ more or less.

Doesn’t Garry’s Mod Tower use the same thing with their “rooms”? I believe someone told me that there is only 1 room of each “type” in the map, and every person having a certain room will only see his own props and the people in his room. Can anyone confirm?

Basically a “layer” way of using the map.

I thought they had a set number of rooms, and you claim that room for your session, then when you log out the room becomes available to claim again and respawns your own props.

That’s not what I mean. I’ve been told that a room is only existing once. So, lets say, you have 10x room A, 10x room B and 10x room C. Instead of having those 10x in your .bsp file, there is only one instance of every room. Then as soon as someone buys a room, he’s teleported to that room, which he shares with a max of 9 other people, but the stuff, chat and voice from other people are not seen because you are in your own “virtual” room. I’ve been told this ages ago by someone who knows Lua and was trying to make something like that, but again, I’m not 100% sure.

I’ve never played gm tower but the way you described that is pretty much exactly what I’ve been working on http://forum.facepunch.com/showthread.php?t=1390094&p=44785500#post44785500 (the video doesn’t exactly show that, but I describe it like that)

I think they just made multiple rooms since it plays music and had custom posters and all that good stuff.

If you open the map in sanbox you see the rooms are inside the map. GMT teleports players to different places on the map, outside has it own area, game modes have their own area and suites have theirs.

it’s definitely do-able but there is little application for this sort of thing in my honest opinion.

Look at the devinity 2 page. It’s map size is massive (might as well be considered infinite) because of some advanced Lua trickery (you remain stationary, but the map moves). It would be difficult to apply such a thing to sandbox though.