Orthographic view -- The Problem?

Hello, all…

What is “Breaking” the screen? it says that Ortho does this: “… Orthographic mode seems to break the screen, no error however.” so I think I’m gonna have a problem making New Super Mario Bros. PC, because I need an orthographic camera to do the 2D levels. I want to know what:
A: Causes the breaking
B: What the breaking IS…
C: Can it be fixed?
D: Does it render at least one view properly?

[editline]12th January 2013[/editline]

brandonj4, GO AWAY!!!

How about you actually explain the whole problem in a way we can understand it?

Uhm, I’m quoting the wiki. I want to make a Mario-Style camera, but supposedly it breaks the screen… I don’t know what that means, though. I want to know enough information so that, if possible, I can try to fix it.

The old wiki contains tons of deprecated and incorrect data.

[editline]12th January 2013[/editline]

An ortho-view does not break anything, except you are using it wrong.

a b and c are basically all the same.

like what i really have no clue what you’re talking about at all honestly the way you worded all of this is bizarr

I use the Maurits.tv wiki… But if it works fine, then never mind… thank you for that information, or: ありがとう。

[editline]12th January 2013[/editline]

Actually, now my problem is getting Garry’s Mod to stop crashing when I try to start a level… at Loading Resources. Could I please receive a link to the correct forum section to ask for help?

And how do I do this?

function Swep:CalcView( PLAYER, PLAYPOS - Y*<Var>, <Angle that faces the world, with background behind the player>, 90--[[FOV]] )
    local View = {}
        View.angles=<Angle that faces the world, play in front>
        View.Ortho=true or View.ortho=true
    return View

You better read up on how to actually do this, otherwise this thread will end in a nasty math lesson.

Hmm? I’ve never used it, before… maybe you can tell me how?

[editline]13th January 2013[/editline]

Let me clear that up… how do I make a CalcView that is Orthographic?

[editline]13th January 2013[/editline]

And you say a “math lesson”, but my Step Father knows a LOT about math… he knows of perspective, but not orthography.

English isn’t my native languages so I don’t know all the terminology. Can someoen explain what orthographic view/mode is?


The left one is Orthographic. The right one is Perspective. Perspective is real life, 3D. Orthographic is a 2D version, where things that are farther away still look just as big as they do when they are right in your face.


[editline]13th January 2013[/editline]

What I want is the left one. Mario uses Orthography, except for the worlds you select levels from. Even then, I think it’s still orthography, just that if the camera moves to the left/right, you will see the sides of the castles.

There needs to be a “Bad Grammer” rating!

There needs to be a “Bad Spelling” rating!

btw overv has made quite a few 2d things i think if you wanted help you should ask him.

Okay… and yes, my spelling is bad, but my grammar is decent. I can read past most spelling errors, but grammar confuses it all. Also, I have spell check on my chrome, so that shouldn’t have happened.

[editline]13th January 2013[/editline]

My spelling was borderline perfect a while ago, but… long sob story short: My brain has been practically destroyed, so… not anymore.

Try to explain the problem again. What’s breaking and what is your code?

I was just quoting the wiki. I CAN’T test it right now, though. I just want to know HOW to make the code!

[editline]13th January 2013[/editline]

I have no problem, simply because garrysmod won’t even load a level! I did not change or add any code, so… I don’t know why it keeps crashing!

How about you tell us what you are trying to load, what your addons are etc?

Because I highly doubt the game would just start crashing the next day.

MY ADDONS DON’T LOAD!!! They haven’t worked since the last update, or july 13th…
The game crashed a little before, but I would just restart the game and it would work.
But I didn’t change ANYTHING between the last time it worked, and the crashes started. I didn’t change any code, add any files or code. I didn’t change, add, update, or otherwise affect the game between the last time it worked and when the crashes started!!!

[editline]13th January 2013[/editline]

And when i say that, NO ONES addons work. I have to work out of the regular files, not the addon folder, so all of my lua is located under gmod/gmod/lua, not gmod/gmod/addons/blah/lua

[editline]13th January 2013[/editline]


Can someone PLEASE tell me how to write this in code?

function SWEP:CalcView(Player, Origin, Angles, FieldOfView)
    local View = {}
    View.player = self.Owner
    View.origin = Origin
    View.angles = Angles
    View.fov = 90
    View.ortho = true
    return View

function TwoDView(ply, pos, angles, fov)
    local view = {}
    view.origin = pos
    view.angles = angles
    view.fov = 90
    return view

hook.Add("CalcView", "MyCalcView", MyCalcView) 
hook.Add("ShouldDrawLocalPlayer", "MyStuff ShouldDrawLocalPlayer", function(ply)        return true end) 

In that gamemode case, the problem is getting 3D enabled for 3D levels.

[editline]13th January 2013[/editline]

Damned double post…

There was GMod 12, when addons worked perfectly.

Then the world of GMod had alot of changes during a big update, now we’re in GMod 13.

tl;dlr Garry changed alot of things in GMod 13 including the addon system, so you need to fix your addons and convert them to GMod 13 format, or download the new version off of steam workshop.

And GMod 13 wasn’t July 13th… also typing in all capitals isn’t correct grammar.

Lol, I was offended… and that doesn’t matter, though, at least not a lot… because my gamemodes don’t work, either. And it doesn’t matter if I download it, or make it.

[editline]14th January 2013[/editline]

It crashes for ANY gamemode I try to load with, at the same point. I’m going to have to re-install, I guess…

How do I make this calcview, though? With gamemode, or SWEP, with SWEP preferred. I want to only do it for 2D levels. And how do I get GMod to stop crashing when I try to load a level with ANY gamemode?

How would I do this?

function SENT:CalcView(Player, CalcOrigin, Angles, 90)
    local CalcdOrigin = Vector(0,0,0)
    local CalcdAngles = Angle(0,0,0)
        <code to set CalcdOrigin>
        <code to set CalcdAngles>
    local NewView = {}
    NewView.origin = CalcdOrigin
    NewView.angles = CalcdAngles
    NewView.fov = 90
    NewView.ortho = true
    return NewView

Is that Code Block how I would do it, or do I have to do Hook Add?

Hey, look, I’m just going to double post because I want anyone who still views this thread to be redirected here.