Would it be possible to make Garry's Mod 2D?

The title pretty much speaks for itself. I have seen a gamemode in 2D before, but I don’t remember the name. Anyone knows how to make it 2D? I know that it probably isn’t easy, but i will be more than happy if you tell me. I am going to make a Mario like gamemode, but i can’t get started before i know how to make it 2D. If no one knows, i guess i could make it normal 3D, but it would be cooler the other way. :v:

(User was banned for this post ("Wrong section" - mahalis))

yes its possible

He Asked if it was possible or not :stuck_out_tongue:

Do you know how to?

Lots of gamemodes do this. I suggest taking a look through their sources.

Here’s just a few examples:

Mario Boxes.
Ascension. (Fretta)
Gamemaster. (Fretta)

And DeathRun 2D

Deathrun 2D by Hurrricane? Is it realeased?


Mind telling me? Lol.

Camera Poses, remove the ability to move left and right = 2D

If you could tell me the code to do so, I would be very glad. I have searched through the whole code of Ascension now, and I don’t know if I’m blind or something, but I can’t find anything that would do what you wrote above.

It’s not like there’s exactly one set of code that instantly makes the entire game 2D. There are many ways to achieve such a thing. If you want to do it, I suggest you learn Lua and practice with GMod.

I have learnt a lot of Lua, but I have no idea how to make such thing as this. And I don’t like using 30 years guessing my way to victory. Also can’t find any tutorials on how to do it.

Then open up the **[wiki

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Main_Page)** and start coding. There’s a Lua questions/requests section as well, if you have any questions.


Hook the “Move” function on serverside, set velocity, forward-speed, up-speed, side-speed all to zero and then set the velocity based off of player:KeyDown() IN_MOVELEFT and IN_MOVERIGHT are the arrow key enums.

You can simulate gravity, or you can just not set up-speed to zero and you can’t change the z value on the velocity’s vector.

This is all assuming if you’re using players instead of entities. I suggest using players, because they have the neat ability to snap onto the ground and not bounce around like a frictional square.

Thank you really much for the answer! :slight_smile:

http://wiki.garrysmod.com/?title=Cam.Start3D set the fov to 0 and it SHOULD become an orthographic view, which is completely 2d without any perspective at all.