The physical location of an entity inside the game space, be it visible or invisible, absolute or relative.

learn more… | top users | synonyms

0
votes
0answers
24 views

Resize gameObject when it has extended a restricted area

So here i have an image will provide a better understanding of my problem. So currently i have some white blocks and within the white blocks i have some cyan bordered boxes. So the current problem i ...
-2
votes
1answer
91 views

How do I choose where to position a mini-map in the HUD? [closed]

In a game with a minimap, what factors should be considered when choosing where to put the minimap on the screen HUD? What choices are typically made when wanting to emphasize a particular factor?
1
vote
2answers
89 views

Formula for Planetary Alignment

I am attempting to create a game where there is a universe of two 16-bit addresses ranging from -32768, -32768 to 32767,32767, or in hexadecimal, each value can run from $8000 to $FFFF then 0 to ...
2
votes
2answers
77 views

How can I make an object move in four directions relative to its rotation?

I want to make a game object move in directions relative to the direction is facing. That is, If the user presses the "W" key the object goes "forward" if its presses "D" the object goes to its left. ...
0
votes
1answer
62 views

Move camera from wherever camera is to pinned point

So, I need to switch/ move/ animate camera from point X (not point A,as I don't know where the camera is at that momemnt) to point B (place where you want your camera to move). This is for ...
-3
votes
1answer
41 views

How can I perfectly center an image in a window using Slick2d?

Dividing the window's width by two to position it in the middle of the x-axis did not work. What else can I do?
1
vote
2answers
114 views

Why does my ship look like it's going backwards instead of fowards? [closed]

I'm making an Asteroids-clone based on this tutorial. I'm stuck on the 5th part of the tutorial. For some reason my ship is going backwards instead of forward or it looks like its going forward, but ...
0
votes
1answer
60 views

How do I get a SphereCollider's global origin in Unity?

I've been following this tutorial: Understanding Steering Behaviors: Collision Avoidance but I'm having trouble implementing one of the functions correctly in Unity, here's the code: private ...
-1
votes
1answer
58 views

If object is bellow another object… do something [closed]

I have 2 objects in scene. When pillar is bellow target, pillar object needs to animate. I get this error: "NullReferenceException: Object reference not set to an instance of an object". var pillar : ...
0
votes
2answers
115 views

which quarter of a triangle the point is in

I've got a world made out of squares. The square are devided in four triangles like this: The corners have their heights stored in a 2D array and the center height is the average of the corners. To ...
0
votes
1answer
74 views

3d rotation of a Gunner unit to shoot the target

I'm developing a scenario to shoot incoming targets by a specific gunner unit, however I'm confused to actual logic of shooting an object with a gun. I'm working in 3D environment. I'v target's ...
1
vote
1answer
1k views

How to match user click and the sprite object position in libGDX framework

I am using libGDX Java framework for developing a practice game in Eclipse. My game is in landscape mode and I am using sprite image for game assets. Actually I am trying to follow the Kilobolt ...
0
votes
1answer
112 views

Relative Position/Rotation calculation

I have 2 objects each with a 3x3 Matrix (Orientation) and a Vector3 (Translation). Both are relative to world coordinates. How do I calculate the position and orientation of object B in relation to ...
0
votes
1answer
499 views

OpenGL Reconstructing Position from Depth

I know this has been asked a lot of time before but none of those answers fixed my problem. I try to implement deferred shading and to do so I need to reconstruct the world space position from the ...
0
votes
3answers
387 views

Why is my texture drawn in a different place when in fullscreen?

I'm trying to draw a texture (with a crescent moon) in the middle of the y-axis: public void draw(SpriteBatch batch) { batch.draw(lune, 0, Gdx.graphics.getHeight() / 2); } It renders this when ...
0
votes
1answer
186 views

Ground contact point for animated character sprites in an isometric game?

I'm working on an isometric game. I have the 3D pre-rendered sprites for directions per state (walking/running, etc.) per frame. Now I need to know where a particular character stands on the ground to ...
0
votes
2answers
118 views

very simple math destination and speed calculation

My player goes to (destinationX, destinationY) His position is: (x,y) and the player has an update event function update() { this.x = this.x + dx; this.y = this.y + dy; } what is the formula ...
0
votes
2answers
75 views

Angluar movement

I'm making a little game where you are a spaceship and you fly around in 2d using the A and D key to rotate and the W key to accelerate. Now my problem is if i turn my ship it doesn't go into the ...
1
vote
1answer
237 views

Java: See if Mouse is hovering/clicking Sprite

The game I am developing is in which you defend the Cell from the Viruses, and I need the sprites to have a MouseListener for when the mouse clicks on that sprite, it will get destroyed, and I cannot ...
1
vote
1answer
75 views

An approach for storing points in space

I am going to work on my next game project, however there are some issues I want to correct since my last one. Here is one of them: This is a problem I think I can already solve, but I'd like to hear ...
3
votes
1answer
432 views

Java: AI to make a mob face the player working half-way correctly

While creating some basic AI for my "ghost" mob that is just up for testing at the moment, I thought of allowing it to face the player, depending on the player location. I get it to work correctly, ...
0
votes
1answer
2k views

How to position two objects relative to each other

I am trying to make a modular vehicle editor similar to Kerbal Space Program. The user selects an initial vehicle part which is spawned in the center of the "work area". To add another part to the ...
0
votes
2answers
1k views

How to set the object's world position in bullet?

In my Ogre3d application I am first changing the parent of a node like this: // save object "Cube" into node*; then ... Vector3 absPos(node->_getDerivedPosition()); Quaternion ...
3
votes
3answers
547 views

MMOFPS Choosing protocol for high-traffic network (UDP or TCP)? [closed]

my question about the player position sender protocol. In this article, he says "Never use TCP for networking a multiplayer game". Ok but UDP datas are not ordered. In this case, if somebody walking, ...
1
vote
2answers
85 views

Mapping of positions on images in different frames

I am looking for a possibility to map different positions on a 2D Image which has different frames. Let's say I have an image, consisting of three frames, which shows a spaceship. The first frame ...
-1
votes
2answers
895 views

Android bitmap placing

I've recently added an explosion in my game, for when enemies get killed, and it works fine and all, but the explosion wont "spawn" on the enemies x and y. The problem is that I'm not drawing the ...
0
votes
1answer
905 views

Ligdx Box2d : convert box2d coordinates into screen coordinates

I'm new in libgdx and i have a little problem. I created a body in box2d and i want to assign it a sprite; for that i need to get the position of the body,then insert into the main loop the updated ...
4
votes
3answers
3k views

Smooth Sprite Movement - Don't Add Velocity to Position?

I am trying to figure out if there is a way to move a sprite smoothly on the screen at different speeds without stuttering, but keeping the effect that it's moving smoothly; especially at faster ...
-1
votes
1answer
82 views

differences in UDK map on different installs

My goal is to create a simple groundplane in UDK (11/2012 version, fresh install) that the user will be able to run around on. My requirements are therefore very basic and I tried to whip something up ...
1
vote
2answers
446 views

Moving an object around the the circle to the specific location in circumference

Well I have run out of ideas how to approach this particular problem.See the picture below: So the idea is that the object (dot in black) has to get to a point mark X (red X mark).However the ...
0
votes
1answer
173 views

How to calculate the position of an attached model after rotation?

I'm programming a basic game on XNA. I started to place an object (eg weapon) attached to the right arm of my player. When I move my character forward behind left or right all right. But when I ...
1
vote
4answers
162 views

Logic that can traverse all possible layouts, but not checking every combination of identical pieces?

Suppose we have a grid of arbitrary size, which is filled by blocks of various widths and heights. There are many 2x2 blocks (meaning they take a total of 4 cells in the grid) and many 3x3 blocks, as ...
3
votes
1answer
152 views

How to make an object stay relative to another object

In the following example there is a guy and a boat. They have both a position, orientation and velocity. The guy is standing on the shore and would like to board. He changes his position so he is ...
0
votes
2answers
560 views

Shuffle tiles position in the beginning of the game XNA Csharp

I'm trying to create a puzzle game where you move tiles to certain positions to make a whole image. I need help with randomizing the tiles start position so that they don't create the whole image at ...
5
votes
2answers
463 views

Get position of tile in tileset

How can I get the position of tile 14 (or any other) when only knowing the following: Tile ID: 14 Rows: 4 Columns: 7 The end result should be 2x4.
0
votes
2answers
984 views

XNA - positioning after rotation

I have a turret with a 2 gunbarrels. The turret rotates towards my mouse. So far no problem. When it creates a few bullets and positions them at the end of the gun barrels. Here is the problem. It ...
2
votes
1answer
407 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 ...
1
vote
1answer
1k views

Positioning a sprite in XNA: Use ClientBounds or BackBuffer?

I'm reading a book called "Learning XNA 4.0" written by Aaron Reed. Throughout most of the chapters, whenever he calculates the position of a sprite to use in his call to SpriteBatch.Draw, he uses ...
3
votes
1answer
326 views

Retrieving model position after applying modeltransforms in XNA

For this method that the goingBeyond XNA tutorial provides, it would be really convenient if I could retrieve the new position of the model after I apply all the transforms to the mesh. I have edited ...
3
votes
2answers
178 views

Camera placement sphere for an always fully visible object

Given an object: With the bounds [x, y, z, width, height, depth] And an orthographic projection [left, right, bottom, top, near, far] I want to determine the radius of a sphere which allows me to ...
2
votes
1answer
448 views

multiply matrix by vector: what to do if need to change y-up to z-up?

I multiply a matrix with a position vector to get a new position, however, now I need to change my matrix from y-up coordinate space to z-up. Changing only the matrix won't work: how to apply the ...
0
votes
1answer
264 views

Why set the position of both b2Body and Box2DSprite?

In a game, we add a body for each sprite, the method is: createBodyAtLocation:(CGPoint) forSprite:(Box2DSprite*)sprite In which we create the body and we attach it to the sprite in parameter: ...
3
votes
2answers
1k views

Positional sound with headphones?

I've have read this interesting question, where is explained how to simulate positional sound with the left and right channel; but still I wonder: is it possible to simulate positional sound (with ...
2
votes
2answers
824 views

Making mouse pos realtive to a moving object

I'm coding my first actual game, trying without following tutorials, just trying to use my knowledge so far to make something playable. I'm creating (attempting) a simple side-scrolling shooter. I ...
1
vote
1answer
4k views

Looking at the mouse position in a top down Unity game?

I'm trying to make a simple top down game where the player looks at wherever the mouse is pointed. The player is only going to rotate on the Y axis. Here's what I have so far but I can't seem to get ...
2
votes
1answer
312 views

delay camera xna

I read this tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Camera_delay.php but i didnot unsterstand it. Is there another way to delay the camera position movement without this ...
0
votes
1answer
227 views

How to move the camera in XNA only after few moments?

I made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the ...
0
votes
1answer
311 views

How to compute tile offset for different isometric angles?

I am working on an isometric game and the designers want to use a different isometric angle than the default one, where I simply had to do a 2/1 offset based on tile size. I know what the new ...
1
vote
3answers
4k views

Find Point with only angle and distance

I'm working on a school project and we have to create a tank team with the programming game Robocode (tank battle with self programmed bots in Java). I have to program a scout bot that scans, finds ...
3
votes
1answer
314 views

Entity position: In map or in script?

I'd like to know how others have handled the issue of storing the entity's position. (Or maybe it's not an issue and I just make it too complicated.) I'm undecided on whether to store the position of ...