Numeric representation of the location of an entity in the game space. There are multiple forms of coordinate systems to cater to a variety of methods to map position.

learn more… | top users | synonyms

19
votes
3answers
917 views

What's so different/complicated/useful about vectors?

Forgive me if this isn't considered a real question, but it is something I am genuinely confused about. I constantly hear other game developers talk about how using vectors are very useful, but also ...
19
votes
4answers
5k views

How to deal with differences between 2D screen coordinates and Cartesian coordinates

Most 2D screen/bitmap coordinate systems have the positive Y axis pointing down (with the the origin in the upper left corner). This is counter to how most people think geometrically with the ...
13
votes
1answer
406 views

Orthographic unit translation mismatch on grid (e.g. 64 pixels translates incorrectly)

I am looking for some insight into a small problem with unit translations on a grid. Update and Solved I solved my own issue. See below for details. Everything in this part of the post turned out to ...
11
votes
4answers
2k views

Why is Y up in many Games?

I learned at school that the z-axis is up. It is the same in modeling software like Blender. However in many games the y-axis is up. What is reason?
10
votes
2answers
452 views

World Bounds - (0, Size) or (-HalfSize, HalfSize)?

When creating a game space in which to move, draw and collide objects, is it better to have the (0,0) point, or the (0,0,0) point, be in the very center of your space, such that the bounds of the ...
9
votes
2answers
710 views

Half-Life 2 BSP Lightmaps

I'm writing a BSP viewer for a university project. So far I have the main geometry loaded properly, and the PVS working. Now I'm trying to apply the lightmaps, but I can't seem to get the texture ...
8
votes
4answers
3k views

Staggered Isometric Map: Calculate map coordinates for point on screen

I know there are already a lot of resources about this, but I haven't found one that matches my coordinate system and I'm having massive trouble adjusting any of those solutions to my needs. What I ...
8
votes
4answers
2k views

How do I convert between two different 2D coordinate systems?

I'm trying to convert a coordinate from one coordinate system to another, so that I can draw it on an image. Basically the destination coordinate system is as follows: X range: 0 to 1066 Y range: 0 ...
6
votes
3answers
3k views

Left-Hand and Right-Hand Coordinate Systems

In Blender and other 3D modeling tools, the coordinate system is right-handed, while in Unity 3D and Orbiter Space Flight Simulator, they are left-handed, why this could happen? Why they don't simply ...
6
votes
1answer
7k views

Blender - exporting .obj with texture coords

I'm writing a game which uses obj files. I created an object in blender and I applied texture without UV coordinates and my question is: how to export this object to obj file, but with texture ...
6
votes
3answers
3k views

2D isometric: screen to tile coordinates

I'm writing an isometric 2D game and I'm having difficulty figuring precisely on which tile the cursor is. Here's a drawing: where xs and ys are screen coordinates (pixels), xt and yt are tile ...
6
votes
5answers
4k views

Changing coordinate system from Z-up to Y-up

Blender's coordinate system is different from what I'm used to, in that Z points upwards instead of Y. What would be the simplest way of converting all the world data (so that all animations, texture ...
5
votes
4answers
464 views

How do I convert from the global coordinate space to a local space?

Given an entity named EntityA, I want to define a local coordinate space, where the position of EntityA is the origin, its heading vector is the X axis, and the normal of the heading vector is the Y ...
5
votes
3answers
4k views

Why / how does XNA's right-handed coordinate system effect anything if you can specify near/far Z values?

I am told repeatedly that XNA Game Studio uses a right-handed coordinate system, and I understand the difference between a right-handed and left-handed coordinate system. But given that you can use a ...
5
votes
4answers
272 views

detecting the coordinates where a bullet hits a mesh

I have a lot of complex objects in a scene and I'm looking for an efficient way to find which object a fired bullet hits, and to find the hit coordinates. It would be best if there was a lightweight ...
5
votes
1answer
573 views

Tile coordinates

Simple question I have here. Say my tile map is based on 32x32 tiles for an 800x600 image so let's say 25 tiles across and 19 down. So now I have that cell 0 of any row contains the first 0-31 ...
5
votes
1answer
472 views

Calculate the Z of a line intersection given the XY coordinates?

I'm intersecting a line in 2D and I calculate the X,Y coordinates of the intersection point. What I need is the Z of the intersection point given the X,Y,Z of the line points, and the X,Y of the ...
5
votes
4answers
778 views

How does a wow server handle which player position to set to each nearest players?

I already understood how game developers could create very large game levels, bypassing the floating point precision limit. This was my very first mind boggling question, and I understood it when I ...
5
votes
2answers
1k views

Coordinates from 3DS Max to XNA 3.5

My problem is this. I have a simple box made in 3DS Max 2009, the Box is 10x10x10. I've tried to load it on XNA and traslate the camera for 15 units, but I can seem to find the values needed to see ...
5
votes
1answer
131 views

How to flip coordinate system in Pyglet?

Is there any way I can flip the coordinate system in Pyglet vertically so that y = 0 is at the top of the screen and a higher y value is closer to the bottom? It is really confusing trying to use ...
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 ...
5
votes
2answers
733 views

Draw a 3D object at specific coordinates on the screen

I'm creating an application which allows the user to manipulate 3D models. I would like to draw 3 axis representing the world coordinate system in 3D in order to give the user an idea where he is. ...
5
votes
3answers
597 views

Is there any algorithm for creating 3D lightning?

Is there any algorithm for generating lightning? Lets say, you input the starting and ending coordinates (x,y,z) and out comes an array of coordinates to show where the lightning goes. It doesn't have ...
4
votes
2answers
844 views

Get world coordinate under mouse (at a ground plane for Warcraft 3 like movement)

I want to let a unit follow the mouse like in any RTS (Warcraft 3, Starcraft, ...). For that I have a "ground plane" which is defined through 2 vectors, the X and Z axis. Now I need to get the world ...
4
votes
1answer
121 views

Can you help me solve the paradox that has confused me about the glViewport and glOrtho functions?

suppose that I have an image that I want to apply as a texture on a geometry (at time we don't consider texture mapping but this image has a certain width and height here it is a 512x512 image) I want ...
4
votes
3answers
485 views

Convert point to its barymetric coordinates

I'm making a 2.5D game engine (in JavaScript) and I'm trying to get it to detect whether a block is under the cursor. This would be a simple task were it restricted to single-level isometric ...
4
votes
1answer
522 views

Isometric Screen View to World View

I am having trouble working out the math to transform the screen coordinates to the Grid coordinates. The code below is how far I have got but it is totally wrong any help or resources to fix this ...
4
votes
3answers
4k views

OpenGL ES and Screen Coordinates

Is there anyway I can make OpenGL ES 2.0 to accept coordinates (for Vextex for example) in int meaning the pixels instead of the default float system? Also how can I set the point (0,0) to be at the ...
4
votes
1answer
332 views

2d coordinates vs x/y screen positioning

I have a 2d top-down view tile map game, that generates random color tiles (water colors) as you move the character. I've been positioning elements on screen using the x/y coords (finding a way to ...
4
votes
1answer
316 views

Translation from one coordinate system to another having Z-offset issues

I'm using ARToolkit to do an augmented reality application, but my problem is really with the 3D coordinates. In this application, I use my webcam to generate the scene. I have two markers (printed ...
4
votes
1answer
629 views

Most efficient way to handle coordinate maps in Java

I have a rectangular tile-based layout. It's your typical Cartesian system. I would like to have a single class that handles two lookup styles Get me the set of players at position X,Y Get me the ...
4
votes
1answer
1k views

Obtaining a world point from a screen point with an orthographic projection

I assumed this was a straightforward problem but it has been plaguing me for days. I am creating a 2D game with an orthographic camera. I am using a 3D camera rather than just hacking it because I ...
3
votes
3answers
717 views

Spot the difference game design help

I'm thinking of making a spot the difference game. But immediately I stumbled over a problem. I'm thinking of storing a "difference area" in the form of a x,y coordinate. However, because on a ...
3
votes
1answer
710 views

Spherical to Cartesian Coordinates

Well I'm reading the Frank's Luna DirectX10 book and, while I'm trying to understand the first demo, I found something that's not very clear at least for me. In the updateScene method, when I press A, ...
3
votes
3answers
449 views

The ship “shudders” in scrolling Asteroids

In my Asteroids game the user can scroll through space. When scrolling, the ship is drawn in the centre of the window. I use interpolation. I scroll the window uing glOrtho, centering it around the ...
3
votes
2answers
233 views

Real time data retrieval - database vs file system

I'm planning to develop a game in which I want to draw 3d models in real time using some given x,y,z coordinates. The coordinates will be given at an average of 30 coordinates per second. Drawing will ...
3
votes
2answers
455 views

Path-finding algorithms for Polar coordinate based maze?

Following on from my question about moving a sprite in a circle, assuming that you have a maze which is shaped like a a set of circles with holes in them and barriers between them. Location of a ...
3
votes
1answer
536 views

How do you get an object to orbit around a certain point on a 2d plane?

I had a concept for a game come to me this morning but I can't figure out how I'd go about implementing the movement. The general idea involves the left and right controls causing a sprite to go ...
3
votes
1answer
414 views

Does the projection matrix flip winding order in right handed systems?

I am using a right handed coordinate system for my world coordinates (so, positive x goes right, y is up, and z is towards you). However, after projection and the w divide, nomalised device ...
3
votes
1answer
1k views

Generating spherical world from heightmapped terrain

I am using a standard heightmapped procedural terrain in my project. However, I want the terrain to appear spherical when the user zooms out. This is an attempt to simulate the appearance of a ...
3
votes
1answer
966 views

Ray-plane intersection to find the Z of the intersecting point

I have a rectangle in 3d space (p1, p2, p3, p4) and when the mouse rolls over it I need to calculate the exact Z of the point on the rect, given the mouse coordinates (x, y). Would a Ray-plane ...
3
votes
2answers
88 views

How can I read the color of a specific pixel in XNA?

I want a way to find out if, for example, the pixel at Vector2(2, 5) on the game window is color Color.Red, or some other color or set of coordinates. How can I do this?
3
votes
1answer
105 views

Float-based screen coordinates, higher mouse precision

I wrote 2 weeks ago about problem with motion blur in my engine. When camera moves using keyboard, motion blur is smooth. But when I rotate camera using mouse motion blur is stepping (not sure if I ...
3
votes
1answer
236 views

Coordinates on the top left corner or center of the tile

I'm setting up a tile system where every tile has x and y coordinates. Right now I assume that the top left corner of the tile is positioned on it's coordinate on the screen, x = tileX * tileWidth and ...
3
votes
3answers
649 views

What are heterogeneous coordinate systems and reasons for using them?

The book I'm following for a computer graphics course only talks about homogeneous coordinate systems. But today, our teacher asked: What are the reasons for using heterogeneous coordinate ...
3
votes
1answer
342 views

Choosing the correct isometric character facing direction

I am currently building a 3D game presented from a 2D isometric viewpoint. The 3D coordinates start at the top left corner of the screen with x and y increasing towards the right and bottom edges ...
3
votes
1answer
972 views

Convert rotation from Right handed System to left handed

I have Euler angles from a right handed system that I am trying to convert to a left handed system. All the information that I have read online says that to convert it simply multiply the axis and ...
3
votes
3answers
3k views

Java Slick2d - How to translate mouse coordinates to world coordinates

I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen public void render(GameContainer gc, Graphics g) throws SlickException ...
3
votes
2answers
3k views

HTML5 canvas screen to isometric coordinate conversion

I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates. My code now is: var mouseX = 0; var mouseY = 0; ...
3
votes
1answer
152 views

Coordinate based travel through multi-line path over elapsed time

I have implemented A* Path finding to decide the course of a sprite through multiple waypoints. I have done this for point A to point B locations but am having trouble with multiple waypoints, because ...