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.
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
1answer
104 views
Texturing spherical terrain, seemingly arbitrary distortion
I'm using this algorithm to find texture coordinates on a sphere:
Wikipedia UV Coordinates
I get the famous seam due to the wrong interpolation, but I also get odd distortions on certain points on ...
-1
votes
0answers
38 views
snake game in java(snake is not being created) [closed]
trying to write 2d snake game in java just for fun. i have tile map as 2d array.
the problem is that its is not drawing player in level 2d loop.
let me know if there is better way to do this. only ...
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 ...
0
votes
1answer
49 views
Getting correct direction of the Car [duplicate]
I am building a car racing game using the coordinate system in which I have enemies's cars and the player cars. I want to ask that what is the best way to find the the direction of enemies's cars so ...
0
votes
0answers
42 views
AI in Car game using Coordinate System
I am making car racing game. I built the game in coordinate system. I have a enemies's cars and the player car. I am stuck with the AI of the enemies's cars. I am searching for the ways in which I can ...
1
vote
2answers
141 views
Converting hexagon grid coordinate system
As I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find ...
1
vote
1answer
49 views
How to handle scaled aspect ratio multiplayer player coordinates
I'm building a cross platform multiplayer game. I'm using pixel graphics and starting at a small 256x144 16:9 aspect ratio That gets scaled up to larger 16:9 resolutions. The graphics look ok however ...
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 ...
1
vote
1answer
82 views
How can I convert screen coordinates to world coordinates on the floor (when the y component = 0)?
I am using the Irrlicht Engine and would like to convert the coordinates of the mouse on the screen to the floor of my world. I am currently trying to use
getRayFromScreenCoordinates()
which ...
-2
votes
3answers
88 views
Check for obstacle [closed]
Programming language: Pseudocode
In my program there will be (among others) two variables, called varX and varY. They will have only positive values, but they may be of varying length. They will ...
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 ...
1
vote
0answers
66 views
Rotate Points with Object in world space
I posted this in the original stack overflow then realized that a game-dev specific one exists.
I am working on personal project that requires me to have 4 points surrounding an object (1 at each of ...
-2
votes
1answer
209 views
Game Editor - When screen is clicked, how do you identify what coordinate you clicked?
This is a follow-up to my earlier question:
Game Editor - When screen is clicked, how do you identify which object that is clicked?
Something I've noticed is that picking only calculates a ray and ...
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, ...
0
votes
1answer
71 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 ...
4
votes
3answers
620 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
...
1
vote
2answers
378 views
What is the Box2D coordinates system?
I know that for Box2d I need to translate pixels to meters which is easy peasy. However my problem is what is the orientation of Box2D coordinates system? Is this the same as screen one (right += x, ...
1
vote
1answer
206 views
In 2d game logic, should I use pixels or world coordinates?
Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed.
For example Box2D requires you to use ...
0
votes
0answers
148 views
Converting motionevent.getx and motionevent.gety to pixel or Object coordinates in the view
I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and ...
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 ...
1
vote
1answer
101 views
SimpleOpenNI: Check if user hand is in specific area on image
Concerning our Microsoft Kinect project, we need some help.
We control a robot with our movements tracked by the Kinect sensor. We display the depth image of the Kinect sensor on our screen, so we ...
1
vote
1answer
76 views
Blender 2.6: Move Mesh to X Coordinate of Another Mesh
An example:
There are two planes A and B with the following median points:
( X | Y | Z )
M_A ( 3 | 2 | 2 )
M_B ( 6 | 1 | 1 )
Now I want to move the plane A on the X-axis to the X coordinate ...
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?
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 ...
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 ...
0
votes
1answer
154 views
Curiosity on any Smartphones that Run on Android 2.3.3 with Different Screen Reoslution
I have a question regarding about any smartphones that run only in Android 2.3.3. Is the size of screen or the screen resolution is always HVGA or does it have capable of running this OS (Android ...
2
votes
1answer
140 views
Coordinate spaces and transformation matrices
I'm trying to get an object from object space, into projected space using these intermediate matrices:
The first matrix (I) is the one that transforms from object space into inertial space, but since ...
1
vote
1answer
74 views
XNA 3D coordinates seem off
I'm going through a book, and the example it gave me seems like is should work, but when I try and implement it, it falls short.
My Camera class takes three vectors in to generate View and Projection ...
1
vote
1answer
179 views
Precise Touch Screen Dragging Issue: Trouble Aligning with the Finger due to Different Screen Resolution
Please, I need your help. I'm trying to make a game that will drag-n-drop a sprite/image while my finger follows precisely with the image without being offset. When I'm trying on a 900x1280 (in X ...
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, ...
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 ...
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 ...
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
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 ...
1
vote
1answer
1k views
Converting world space coordinate to screen space coordinate and getting incorrect range of values
I'm attempting to convert from world space coordinates to screen space coordinates.
I have the following code to transform my object position
Vector3 screenSpacePoint = ...
0
votes
2answers
193 views
get coordinates of origin of coordinate system in second coordinate system by knowin matrices of one point in bith systems
Situation, two coordinate systems A, B. origins Oa, Ob. I have one point, for which i know modelview matrix (translatoin/orientation) in both systems. And what i need to get is modelview matrix of Ob ...
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 ...
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. ...
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 ...
0
votes
2answers
326 views
Screen coordinates to a multilevel isometric world
I have an isometric world that has stuff on multiple levels, i.e. it has an XYZ coordinate system, and tiles can be stacked on each other, accumulating screen Y offset as they go. I currently have an ...
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 ...
0
votes
1answer
106 views
How should I position and move objects in my 3D world in relation to terrain
I'm drawing a heightfield as a piece of 3D terrain using the fairly 'dumb' method of drawing triangles, like everyone does when learning this sort of thing. There's no fancy LOD, scenegraphs or other ...
0
votes
1answer
238 views
How to get xy coordinates along a given path
Say i have two points (x,y), (0,0) and (10,10). Now i wan´t to get coordinates along the line by stepping through values of x and y. I thought i solved it with the following functions:
fy = startY ...
2
votes
1answer
239 views
Detect if square in grid is within a diamond shape
So I have a game in which basically everything is a square inside a big grid. It's easy to check if a square is inside a box whose center is another square:
*** x
*o* --> x is not in o's ...
2
votes
3answers
510 views
XNA texture stretching at extreme coordinates
I was toying around with infinitely scrolling 2D textures using the XNA framework and came across a rather strange observation.
Using the basic draw code:
spriteBatch.Begin(SpriteSortMode.Deferred, ...
2
votes
2answers
201 views
how to transform child elements position into a world position
I'm making a 2d space game in Javascript with canvas. In this game there's a bunch of spaceships, positioned in world space, with turrets, positioned relative to their parent ships. These objects also ...
2
votes
2answers
644 views
Isometric to screen, screen to isometric for irregular projection
I have isometric assets that unfortunately can't change and need to work out the projection for those. Here is how a tile looks like:
The tile image width/height ratio is 0.(6) (height/widht = ...
-1
votes
1answer
139 views
Find a Rectangle by coordinates - XNA
I have 2 coordinates (X,Y). I have also a 10x10 array. By these coordinates I have to find the rectangle in which is my pointer at the moment.
How could I handle it?
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 ...