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

1
vote
0answers
21 views

Pixel Check With Node.js

I'm trying to check if a pixel of a certain color at (x,y) has moved within a boundary of [(x1,y1),(x2,y2)] and also update its new position to console. I'm doing this as a desktop application so no ...
1
vote
0answers
94 views

Isometric map (2D) - Click detection - Mouse mapping - How to implement it? [duplicate]

I'm building an isometric engine. I use TILE_SIZE * TILE_SIZE (minecraft like) tiles. (I'm using 64 * 64 tiles but I can change the number when I want) I can access for each tiles to this ...
1
vote
0answers
19 views

Rectangle in object-layer has wrong coordinates in game

I extended the SuperKoalio LibGDX Example about an Tiled Object Layer in the Tiled Level-Editor and draw a rectangle on this layer. Now I would like to draw this rectangle in my game using the ...
1
vote
1answer
56 views

Virtual game dimensions - how to implement?

I'm creating a fighting game in LibGDX with a static board, camera moves only right<>left. There are 5 screen aspect ratios in Android and Apple so I have created 5 different background graphics: ...
1
vote
1answer
41 views

How can a player exist at a location that is not expressly defined?

How do video games like Minecraft know how to place characters on an infinitely complex plane? For example, the game knows the character's place up to 10 or more decimal places and can display them at ...
0
votes
0answers
15 views

Coordinate code for moving the object from one side to others side

I'm trying to make a 2D games, like airplane in android. To play the airplane, the user must shake the phone and then the airplane will move from left side to right side. And I don't know how to move ...
0
votes
1answer
30 views

Unity 2d square position not lining up with its size

I want to have one square that rests at the Unity 2d coordinates (5,5). Using transform.localScale I make the square be 3 units by 3 units large. So I thought that if I made another square that is the ...
0
votes
1answer
54 views

Evaluate 2D point in a 3D triangle?

Given three points, (x1, y1, z1) (x2, y2, z2) (x3, y3, z3) and given a point "A" at (x, y), how would I find "A'", at (x, y, z)?
0
votes
1answer
24 views

How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar ...
0
votes
1answer
56 views

Project camera-to-pixel ray in world coordinates

I'm trying to implement a very simple ray tracing function but I have a problem with projecting the camera ray (from camera to pixel) to the world space. In the screen coordinates have the pixel ...
0
votes
2answers
97 views

How to use the SDL viewport properly?

I'm very confused about the SDL2 viewport, I did some googling to find out how to implement it but people keep mentioning things like "world coordinates" which I don't have in my game. Question : Do ...
0
votes
1answer
33 views

Position of an object relative to another in a 2D plane

I have two objects, A and B, each of them has a set of coordinates (x,y). How do I understand where is A in relation to B's position? If I where to just check each coordinates I could do it like this:...
-2
votes
0answers
56 views

Motion related databasing with SVG and SQL [closed]

In my game I have two elements moving towards each other, meeting in the middle of the screen. Something like this: (the image will be two slowly converging mouth-like objects, but it's not finished ...
1
vote
0answers
44 views

Pixel Perfect Texture Sampling

Right now I am using the following two shaders to render a sprite from a texture used as a sprite atlas onto a canvas that has canvas_size pixels in screen coordinates. I use a static quad as input ...
1
vote
1answer
60 views

Vertically mirroring the screen in LibGDX

I'm developing a game in which the screen layout is different for right and lefty players, so i'll put a button in it to mirror the screen vertically. For displaying textures and fonts, i use a ...
0
votes
0answers
46 views

glOrtho and VBO

I'm trying to send triangles to OpenGL using screen coordinates. Using the deprecated glBegin and glEnd I could just set up an orthographic projection and use screen-space coordinates as the triangles/...
1
vote
1answer
93 views

Coordinate system for a strategy game

I am working on a personal project of developing a simple 3D strategy game. I am working on my own game engine (let's assume that I have to have my own) and I have one theoretical question. How to ...
0
votes
0answers
207 views

Converting Transformation Matrices from OpenCV to Unity

I am working on an AR project, which uses OpenCV and Unity 3D. OpenCV uses Right Handed Coordinate system (different from OpenGL, because OpenCV camera looks along positive Z axis), while Unity has ...
3
votes
1answer
123 views

LibGDX Overlay Game with Stage

I have been working on a 2d game that is similar to billiards/pool. I've got the basic game down and now I'm working on some visual effects. One of the things I would like to do is have have numbers ...
1
vote
2answers
73 views

How define coordinates for bodies in outer space

What is a simple way of representing celestial bodies in outer space using a coordinate system? There are actual scientific coordinate systems (see https://en.wikipedia.org/wiki/...
1
vote
1answer
92 views

Converting normalized device coordinates to world space coordinates flipping my sprites

I'm trying to convert my game's camera system to use world space coordinates rather than OpenGL's default normalized device coordinates, however in doing so my sprites are being rendered improperly as ...
8
votes
2answers
301 views

BRDF and Spherical coordinate in ray tracing

I developed a ray tracer that use standard phong/blinn phong lighting model. Now I'm modifying it to support physically based rendering, so I'm implementing various BRDF models. At the moment I'm ...
2
votes
1answer
54 views

How to change XNA coordinates directions?

Usually XNA increases X coordinate to right and Y to down. Like this: But in my project i have 2D map. Drawing tile with bigger Y coodinate below OX looking strange (usually people imagines these ...
1
vote
1answer
28 views

Is it necessary to use texture filtering if I use texture coordinate system?

I have one question about using texture filtering. It's clear when I used normalized texuture coordinates (in any API) for example from (0,0) to (1,1) it is necessary to use texture filtering because ...
7
votes
1answer
180 views

Get local coords from global coords

I need to get local coords from global coords. I did not find ready-made examples. Please help me how to do it on the example image. Thank you! UPDATED: Here's the method in the java, created ...
1
vote
0answers
31 views

Explanation of the parameters in the line intersection code

I am trying to understand a C code that moves the mesh nodes for each time step and i am totally struck on the parameters t1 and t2 please help me sorting this out. So here is what the function gets (...
1
vote
1answer
113 views

Anchoring a sprite to a specific x & y on another, regardless of rotation [Gamemaker]

I have a sprite, sDetritus, with a corresponding object, oDetritus, and an sTurret and oTurret. If I apply no rotation (i.e. changing the image_angle) to oDetritus, I can anchor the oTurret to a ...
1
vote
1answer
282 views

Finding relative x and y value on a sprite [Gamemaker]

I'm having a little conundrum that may just result from a lack of knowledge of Gamemaker's functionality. I've attached two images to aid explanation. I have a sprite of a turret (with a gun ...
5
votes
3answers
771 views

Is a custom coordinate system possible in Unity

Is it possible to create a custom coordinate system (i.e the one using double for coordinates or the one dividing the world into 'chunks' of safe size) not constrained by the floating point precision ...
6
votes
3answers
537 views

Overcoming float limitations for planet-sized worlds in Unity

As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues. Making a world more than 1M units in radius would require ...
1
vote
0answers
98 views

Getting screen coordinates of actor

I'm trying to tell if an actor exists at a screen position so I can do something if the actor is clicked on. To do this, I first need to get the screen coordinates of the actor so I can compare it to ...
1
vote
0answers
22 views

Proper way to wrap sprite for Z dimension

I am using SFML, but I need to add some emulation of 3D by wrapping the sprite with a Z component. When sprites are drawed (or when objects moved?), their X and Y will change depending on Z. My ...
1
vote
1answer
72 views

Find x and y position with angles in 3D world

I'm actually creating a Tracking Camera (or 3rd person camera), and to do so, I used two angles (X and Y) for the rotation of the camera and an other floating value for the distance between the target ...
1
vote
0answers
166 views

Matrix transform from one coordinate system to another

I have been beating my head against the wall for weeks on this and it is time I just break down and ask for help. I need to move a 3D camera from an in house system into Unreal 4. The two use ...
1
vote
0answers
38 views

Can I “Pre-rotate” VBOs while loading them in LWJGL?

It is possible to flip VBOs horizontally and vertically by swapping around destination coordinates. Is it possible to rotate an image by any angle, such as 45 degrees, using different destination ...
1
vote
1answer
137 views

Using glm to rotate the modelview matrix based on the cursor position

I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
0
votes
2answers
261 views

2D Coordinate Based Game [duplicate]

I want to make a game for Android that has a 10x10 Grid Plane as UI.In this game users going to touch on a grid and tihs grid will be painted. My question is how do I understand which gird or tile ...
0
votes
0answers
30 views

Platformer Tile Map Collision Help

I've been working on a small platformer as a simple project but, I'm having troubles with my collision detection. What I want is that as the player falls due to gravity, it will stop when it touches ...
2
votes
1answer
183 views

convert mouse coords to zig-zag isometric

I was wondering, how do I convert mouse coordinates to zig-zag isometric coordinates? I already know how to convert to isometric using the Diamond approach, so I just need to know about the zig-zag ...
0
votes
1answer
38 views

Box2d Coordinate System

In the game I'm trying to code I got to have two bodies. One StaticBody and one DynamicBody. I want to have the DynamicBody on top of the StaticBody. Somehow all I get is this: Is it possible that ...
0
votes
0answers
25 views

How do I generated cubic UV coordinates for a mesh?

I'm trying to add a utility function to my game engine that generates cubic texture coordinates for a specified mesh. I've attempted to come up with my own algorithm but I can't get it to work ...
5
votes
2answers
160 views

How can I represent location in a massive world?

I've been thinking about No Man's Sky a lot recently and all the technical challenges they must face. For example, how on earth do you store a players location in a world that is so enormous? I ...
0
votes
1answer
2k views

Unity3D Get object size in order to be used in Vector3 coordinates

I have a plane in Unity in 3D project, and I want to get its boundaries so I can use them in random function for getting Vector3 coordinates. Currently I am trying like this GameObject ground; void ...
1
vote
1answer
154 views

Error in projecting coordinates from FitViewport to screen in LibGDX

i'm using a FitViewport to render my "game world". Viewport virtual dimensions are fixed 400x240. I use viewport.unproject method to scale input touches from screen coordinates to world coordinates, ...
1
vote
3answers
147 views

What does it actually mean by World, Window and Viewport?

I am studying Computer Graphics myself. I am stuck with the concept of World, Window and View-port. As far as I understood: (1) World - is an abstract and imaginary space that is imagined to exist ...
5
votes
1answer
1k views

How do I convert screen coordinates to isometric tile map coordinates in libGDX using matrices

I know this has been asked many times but my question doesn't quite fit the others. I have an IsometricTiledMap and I need to get the tile under a set of screen X and Y coordinates. Here is a picture ...
-1
votes
1answer
185 views

What is the best way to send/receive data about user coordinates and other properties?

For example If I have 2 users, and each of them have an object, and that object has: x coordinates, y coordinates, angle, state, and other properties... I use java let'say the game changes at 30 ...
1
vote
1answer
98 views

Coordinate System - Movement from A to B

I've got the following code snipped : var distanceFromDestinationSquared = ( Math.pow(this.orders.to.x - this.x, 2) + Math.pow(this.orders.to.y - this.y, 2)); ...
3
votes
2answers
184 views

Isometric Tile Selection with rectangular bounding boxes

I am having problems trying to determine which tile I have selected with the mouse. Currently it selects two tiles, rather than one. Producing the following results: My tiles height, is half their ...
1
vote
2answers
261 views

Easy method of obtaining texture coordinates for sprite sheet

In my (OpenGL ES 2.0 Android) game, I use 2 types of Sprite Sheets. In one type all sprites/frames are of equal size and in the other they are all different shapes and sizes. It is the latter one to ...