An approximate representation, on a flat surface, of an image as it is seen by the eye.

learn more… | top users | synonyms

15
votes
2answers
3k views

What is the view perspective angle of most 2.5D isometric games

I examined several quite popular games to determine what perspective angle they are using. For the purpose I created a grid that is 45 and 60 degrees isometric viewed and put it onto a screenshot (of ...
13
votes
5answers
2k views

An object twice as close appears twice as big?

So I was thinking about creating a 2D game where you can also move along the Z-axis, by changing in which layer you are. Depending on the depth I want to scale my 2D sprites. Once, someone had shown ...
12
votes
5answers
4k views

Examples of faking 3D

Does anyone know of any good examples of 3D being faked in 2D (not necessarily code, but games I could look up)? The player has the perspective that they are going 'into' the screen and things are ...
12
votes
2answers
2k views

Why is 90° horz / 60° vert the default FPS Field of View?

As far as I understand it, vertical Field of View should be adjusted to: fov = 2 * arctan(0.5*screenHeight / distanceEyeScreen); That is, Field of View should match a user's distance to and size of ...
6
votes
2answers
2k views

Matrix for 2D perspective

I'm trying to determine whether what I'm attempting to achieve is even possible mathematically. I'm obviously not a seasoned game developer so I'm having trouble even coming up with the terminology to ...
6
votes
2answers
1k views

Vector games (Wireframe, Elite-like) theory and implementations?

I'm interesting in knowing more about how vector games like Elite and Star Wars Atari were built from grounds up. The question is not how to implement vector graphics with modern 3D APIs like OpenGL ...
5
votes
1answer
278 views

How can I draw a perspective-correct quad?

I'm trying to draw a quad in 2D (in SharpDX, but that is basically XNA). But texture correction is not working, and I'm getting only an affine textured quad. I'm using BasicEffect to render it. ...
5
votes
3answers
2k views

Mapping 3D object coordinates to 2D screen coordinates with perspective projection

Sort of following on from where this person was in their topic: Matrix for 2D perspective What I have at the moment is a transformation matrix that's defined as follows: http://pastebin.com/GM6BhP0R ...
4
votes
1answer
680 views

The Depth buffer and Perspective

I'm having trouble understanding the behaviour of my OpenGL program; and in drawing my Z-Buffer out to the screen. It will probably be best to just start with code, here is my GLSL shader: in vec3 ...
3
votes
2answers
417 views

Is this aiming mechanic usable in a third-person top-down game?

Long story short: I've switched to a third person - top down perspective. The camera is fixed and looks down at the player. How can I implement 3d aiming ? The player needs to aim left and right as ...
3
votes
1answer
1k views

How do I know if a perspective matrix is right or left handed coordinate system?

For example, if I define my perspective matrix as the following: m[0] = 1.f / ( aspect * focalLength ); m[5] = 1.f / focalLength; m[10] = -zFar / (zFar - zNear); m[11] = -1; m[14] = ...
3
votes
1answer
337 views

How to do perspective projection “parallax” but without changing the scale or offset of objects?

Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
3
votes
2answers
532 views

Trying to understand 2D vector -> projection space conversion

I'm trying to understand how I can transform 2D vectors (x, y) to projection space. Something hasn't quite clicked for me yet. As per my previous question, here's the effect I'm trying to achieve: ...
3
votes
1answer
392 views

How to compute the 2D equations of 3D circular arcs?

I'd like to obtain these equations for the ellipses produced by the perspective projections of (3-dimensionally transformed) circles. This is useful for rendering in 2D contexts which provide curve ...
3
votes
0answers
79 views

Creating Animal Crossing style world rendering with Python [duplicate]

I've dabbled a bit with writing 3D rendering code in the past, although I'm interested in knowing if there is existing code (libraries) written for/with bindings to Python that might facilitate the ...
2
votes
3answers
497 views

How would you draw a tile map with perspective?

I want the maps in the game I'm working (in Java) to be draw with perspective just to sugar coat it, but I'm not sure how that can be done. If anyone has an article about the math behind it or ...
2
votes
1answer
491 views

OpenGL fovx question

To boil my question down to the simplest form, I fear I am oversimplifying how mat4 perspective works. I am using mat4.perspective(45, 2, 0.1, 1000.0) (the binding is WebGL fwiw). With a fovy of ...
2
votes
1answer
173 views

Best visual way to build a “near isometric” 2D view

I'm working hard in a 2D platform game, as far as I got is a standard 2D view (only x and y are visible) But I want to change the perspective so I can see the floor also. But the MapBuilder I ...
2
votes
1answer
319 views

How to crop camera's viewport?

I'm making an Android game using LibGDX. I want to do something hard to explain but I'll try nonetheless. Look at this camera view (it's from 3ds max): I can get same exact view in LibGDX without ...
2
votes
4answers
3k views

2D camera perspective projection from 3D coordinates — HOW?

I am developing a camera for a 2D game with a top-down view that has depth. It's almost a 3D camera. Basically, every object has a Z even though it is in 2D, and similarly to parallax layers their ...
2
votes
1answer
378 views

Position Reconstruction from Depth by inverting Perspective Projection

I had some trouble reconstructing position from depth sampled from the depth buffer. I use the equivalent of gluPerspective in GLM. The code in GLM is: template GLM_FUNC_QUALIFIER detail::tmat4x4 ...
2
votes
2answers
464 views

Physics in a 2D oblique perspective game

So, just to clarify, because I'm still fuzzy on the terms for perspectives in older games myself, examples of an oblique perspective can be seen in many older RPGs (Earthbound, Final Fantasy, Secret ...
1
vote
3answers
634 views

How to: create a 3rd person view, multiple layer 3d world

Imagine a game world like in Dungeon Keeper or Sim City with an (possibly rotatable) 3rd person view, where the game world can be accessed in all dimensions (in discrete steps). For example digging ...
1
vote
1answer
434 views

What is the logic behind a 3D Projection 'Camera Perspective'? [closed]

Suppose I had a 3D Cube on a 2D plane (screen). And I wanted to use the keypad to move and rotate it. Without referring to a 3D Game Engine that could do this for me can you explain me the logic or ...
1
vote
2answers
239 views

Drawing cube in SharpDX, wrong perspective

I want to draw a cube. This is what i currently have: As you can see, the perspective is VERY wrong. The the size in the z-direction is too small and the difference between the front and back size ...
1
vote
1answer
116 views

Why are there different ways of building projection matrices?

Matrix.PerspectiveFovLH documentation page says that this method uses the following formula to build a perspective projection matrix. [w, 0, 0, 0] [0, h, 0, 0] [0, 0, zFar/(zFar - zNear), 1] [0, 0, ...
1
vote
1answer
408 views

Strange 3D game engine camera with X,Y,Zoom instead of X,Y,Z

I'm using a 3D game engine, that uses a 4x4 matrix to modify the camera projection, in this format: r r r x r r r y r r r z - - - zoom Strangely though, the camera does not respond to the Z ...
1
vote
1answer
132 views

Where is the error in my perspective projection implementation?

My question is not really a game development question, but since it's based on 3D programming, I thought it would fit best here. I've got a line made out of Point3D objects where the value of x, y, ...
1
vote
1answer
137 views

Cartesian Coordinates & Layout [duplicate]

The way cartesian coordinations are presented and used is kinda confusing. When working with 2D the vertical axis is Y, though when working with 3D the vertical axis is Z and Y becomes the "depth" ...
1
vote
1answer
164 views

Implementing axonometric bird-view in XNA

I made all kinds of logic (waypath, aso) for my strategical game, based on XNA (monogame). Now I "misused" the Vector2 a little bit: As I'm working from a "top-down" perspective, I'm using the Y-axis ...
1
vote
2answers
322 views

Creating a 2D perspective in 3D game

I'm new to XNA and 3D game development in general. I'm creating a puzzle game kind of similar to tetris, built with blocks. I decided to build the game in 3D since I can do some cool animations and ...
1
vote
3answers
327 views

Constant size geometries

How can I display objects in a 3D perspective projection that look like as if their size does not change, despite of the camera's position? I am using DirectX 9.0. I know of PositionTransformed ...
1
vote
1answer
32 views

Fit a bounding box in the scene modifying FOV

Suppose I have a radius for a spherical bounding box around a mesh. My goal is to render the scene such as when the camera moves, the bounding box whose centre the camera look at, occupies always ...
1
vote
1answer
250 views

3D/perspective Top down shooter bullet issues

I'm developing a top-down shooter with multiple levels (ground for ground units, middle level for buildings, top level for air unity). The problem is the collision. Though I can make the collider ...
1
vote
0answers
52 views

Is it possible to reverse perspective projection with simple scale and translate? [duplicate]

Basically I'm asking this question (which seems to have gone un-answered): How to do perspective projection “parallax” but without changing the scale or offset of objects? I'm using perspective ...
1
vote
1answer
73 views

Shadow Map field-of-view

I'm implementing a shadow map algorithm with a spotlight (a spotlight that always "looks" at a given object). My issue is that for some configuration, part of the object the light is "looking at" is ...
0
votes
3answers
187 views

How to calculate size of object depending of its height on the screen?

I am programming a mostly 2D game on Android (with Andengine), but the player is a bouncing ball (kinda in 3D). I wanted to make the bouncing of the ball the most realistic possible, using quadrilic ...
0
votes
2answers
365 views

How do I implement a 2D camera in JPanel?

I'm trying to create a mario-esque game in Java and am at the point of implementing a camera. Following normalocity's example, I understand the difference between the GameWorld and the Camera that ...
0
votes
2answers
754 views

Screen or World Coordinates to tile Coordinates

I have Plane made of tiles in opengl. I start drawing them at (0, 0, -20) after that i do my translations so that the view is rotated somewhat similar to an isometric (kind of) perspective. I'd now ...
0
votes
1answer
224 views

Ways to “invert Z-axis” in shader-based core-profile OpenGL?

In my hobbyist shader-based (non-FFP) GL (3.2+ core) "engine", everything in world-space and model-space is by design "left-handed" (and to stay that way), so X-axis goes from -1 ("left") to 1 ...
0
votes
1answer
64 views

How to properly generate walls simulating perspective around stone in a cave-like level made of squares?

Long story short. My levels tiles currently look like this: And i want them to look like this: My levels are designed as 400x400 squares of proceduraly generated 0's and 1's, 0 representing ...
0
votes
1answer
135 views

Measuring distances on 2D perspective beat'em'up

I'm making a 2-D beat'em up. The tech demo is here. As you can see, the game is in perspective, pretty much like all old school brawlers. What I want to do is measure the distance between objects on ...
0
votes
1answer
123 views

What are the correct angles in the Top-down perspective?

In the following picture it says that in the Top-down perspective the angles are 90°, but if it would be 90° then you shouldn't see the front of the building and the roof at the same time... So what ...
0
votes
0answers
48 views

Tunnels in pseudo 3D racing game

How would one go about doing tunnels in a pseudo 3D racing game ? The main problem I have at the moment is perspective - I cant think of a way, beyond having to Z sort the sprites and tunnel ...
0
votes
0answers
15 views

3D Perspective scrolling background [duplicate]

I'm not sure exactly how this is called, I'm talking about that kind of background, where your character is supposed to walk towards the center of your screen to the horizon, while in reality he is ...
0
votes
1answer
81 views

Distorted LookAt When Looking Up or Down?

I have a weird problem and I have no idea what's going on with it. Recently started doing some OpenGL programming, going pretty well, hit some rough spots but worked my way through them and otherwise ...
0
votes
0answers
137 views

Correct way to calculate Perspective Matrix [duplicate]

I have seen at least 3 different ways to calculate the perspective matrix and I'm confused as to which one I should be using and what the differences are? OpenGL says to do it this way: f = ...
0
votes
1answer
2k views

perspective camera with libgdx

I am trying to setup a viewport using perspective camera. I am trying to render a scene like this I read an official blog post about the cameras and found a few tests within gdx test suits. ...
-1
votes
1answer
503 views

How to fix OpenGL Co-ordinate System in SFML?

My OpenGL setup is somehow configured to work like so: (-1, 1) (0, 1) (1, 1) (-1, 0) (0, 0) (1, 0) (-1, -1) (0, -1) (1, -1) How do I configure it so that it works like so: (0, 0) (SW/2, 0) (SW, 0) ...
-1
votes
2answers
234 views

How do I draw tile in a side-on perspective? [closed]

All the tutorials I've found regarding using tiles in game engines refer to games with an isometric or top-down view, much like this: I want to make a "beat em up"-game, where the view is tilted. ...