# Tagged Questions

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

1k 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 ...
142 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 = ...
81 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 ...
4k 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 ...
4k 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. ...
6k 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 ...
658 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 ("right"...
1k views

### How do I calculate the z-coordinate for a perspective-camera in 2D?

I'm new to LibGDX and trying to use DecalBatch with PerspectiveCamera, simply to have Z-coordinate for my sprites, as SpriteBatch does not offer that. However, I don't know how to calculate the Z-...
4k 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 -...
442 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 ...
714 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 ...
10k views

### What is the view perspective angle of most 2.5D isometric games [closed]

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 ...
7k 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 ...
1k 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 ...
507 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 ...
845 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) ...
447 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 ...
663 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 ...
642 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: ...
3k 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 ...
2k 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] = -(zFar*zNear)/(...
525 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 ...
888 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 ...
511 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 ...
2k 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 ...
1k 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 ...
8k 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 ...