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.
17
votes
4answers
3k 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 ...
12
votes
1answer
206 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 ...
10
votes
4answers
945 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?
9
votes
2answers
628 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
1k 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
900 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
2k 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
5answers
3k 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
3answers
3k 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
251 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
4k 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 ...
5
votes
1answer
518 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
3answers
1k 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 ...
5
votes
1answer
426 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
486 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
987 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
2answers
452 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
540 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
459 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
3answers
329 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
45 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 ...
4
votes
1answer
363 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
1answer
113 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
3answers
621 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
224 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 ...
3
votes
3answers
412 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
281 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
291 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
208 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
365 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
420 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
3answers
2k 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 ...
3
votes
1answer
285 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
842 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
1answer
121 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
2answers
2k 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
3answers
522 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
458 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 ...
3
votes
1answer
136 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
383 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
2k 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
137 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 ...
3
votes
1answer
102 views
Calibration of a 6 DOF tracking device
Setting: In our facility we have a 3D laboratory with 3 large displays (two edge-to-edge on orthogonal walls, one on the ground, also edge-to-edge). Its primary use-case is exploring 3D virtual ...
2
votes
3answers
2k views
Get points on a line between two points
I'm making a simple space game in JavaScript, but now I've hit a wall regarding vectors.
The game view is top-down on a 2d grid. When the user clicks on the grid, the space ship will fly to that ...
2
votes
2answers
154 views
Transition Player Position
I'm currently working on a Java MMO with a pretty solid start, but I've come across an issue I need a little help with.
I'm working on player positions. Meaning their X/Y on the screen, if the ...
2
votes
2answers
243 views
Why does handedness matter at all?
I'm really trying to understand this from a mathematical viewpoint. After all, numbers are numbers, the chirality or handedness depends on how one interprets it.
Say I've three basis vectors x (1, 0, ...
2
votes
2answers
104 views
Calculating specific coordinate along a path
Let's say I have a path comprised of a sequence of points that are connect by lines and arcs. The entire path has some specific length. Let's call that length 100.
What would be the mechanism to ...
2
votes
2answers
627 views
Converting from different handedness coordinate systems
I am currently porting a demo from XNA to DirectX which, as I understand it, both have coordinate systems with different handednesses.
What are the things I need to bare in mind when converting ...
2
votes
1answer
435 views
What are the texture coordinates for a tetrahedron
EDIT This is the WebGL code for initializing the tetrahedron points. You may want to skip to the second code block, because you may be able to answer without this.
//Making a tetrahedron with ...
2
votes
2answers
378 views
Swapping axis labels between 2D and 3D coordinates
My game world is 3D.
The map is only 2D, however.
It is natural to think of the map as having an X and Y axis.
And it is natural to think of the world has having an X, Y and Z axis, where Y is ...