A simple term for "translation", the change of position of an entity typically on the route of going from point A to point B.

learn more… | top users | synonyms

0
votes
2answers
172 views

How to move an object using X and Y coordinates in JavaScript

I am making a 2d baseball game with JavaScript and HTML5 and am trying to move an image that I have drawn with JavaScript like so: //canvas var c = document.getElementById("gameCanvas"); ...
1
vote
1answer
550 views

LibGDX: Smooth movement on a grid based game

I'm making a game with LibGDX where the player is on a grid (like a Chess board). For now, I'm moving the player by teleporting him 16px in a direction. I'd like to use the delta time to make smooth ...
2
votes
2answers
297 views

Frameskipping in Android gameloop causing choppy sprites (Open GL ES 2.0)

I have written a simple 2d platform game for Android and am wondering how one deals with frame-skipping? Are there any alternatives? Let me explain further. So, my game loop allows for the ...
1
vote
3answers
339 views

Interpolation using a sprite's previous frame and current frame

Overview I'm currently using a method which has been pointed out to me is extrapolation rather than interolation. As a result, I'm also now looking into the possibility of using another method which ...
0
votes
2answers
112 views

What design pattern should I employ for validating character movement?

I'm developing a RPG in Java and have a Map class, which will contain all the MapObjects (the Player, Enemies, Walls, etc.): Map.java public class Map { private int width; private int height; ...
0
votes
0answers
12 views

SpriteKit Random Movement/Action [duplicate]

So basically i want a sprite to start from a random position and head to a random direction then take a random turn halfway through using CGPathAddCurveToPoint. The part i fail in is how to make it ...
3
votes
2answers
191 views

RTS Movement + Navigation + Destination

I'm looking into building my own simple RTS game, and I'm trying to get my head around the movement of single, and multi selected units. (Developing in Unity) After much research, I now know that its ...
-1
votes
2answers
76 views

Problems with my interpolation inplementation

When I interpolate my sprite's movement (code below), I'm curious as to whether the part where I actually apply the interpolation to the sprite's current X position (in my render call) is correct. ...
0
votes
1answer
158 views

Unity-Animation parameters are not being set

I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); ...
0
votes
0answers
188 views

SpriteKit Random Action/Movement

So basically i want a sprite to start from a random position and head to a random direction then take a random turn halfway through using CGPathAddCurveToPoint. The part i fail in is how to make it ...
1
vote
1answer
1k views

Unity Move sprite from point A to point B

Pretty new to Unity and i'm trying to make a very simple iphone game. , I'd like to know how to move a sprite (2D) move from random point A to random Point B not just that, but i want it to change ...
0
votes
2answers
69 views

Why does my side-scroller character move in the wrong direction?

I'm trying to understand why my rectangle moves in the opposite direction I want it to. I have a float for translation: glTranslatef(translate_x, 0, 0); if ...
0
votes
2answers
438 views

Libgdx: movement of scrolling background is not smooth even at 60fps

I'm developing a game and I want to make a sliding background. The background is not scrolling smoothly. I logged the fps, but it was ok. This is my code, I don't know what I'm doing wrong, any ideas? ...
-2
votes
1answer
106 views

in a 2D game that has an array as a map how to make graphics look nice?

I have a map that's stored in a 2D Array with 1s being walls, 0s being roads, and 2s being houses. There is a character that is not stored in the map but its position is always checked against the map ...
2
votes
2answers
221 views

How do I make a puzzle piece move smoothly between locations?

I'm building a 2048 clone to sharpen my Libgdx skills, but I don't know how to ease a tiles between board locations. When I slide my finger, the tile moves rather swiftly. How I can make the movement ...
0
votes
1answer
51 views

Revert to closest non intersecting position

First, let me start by saying: Please forgive me if this question have already been asked. I've tried to search but didn't find any solution. (It might be due to my lack of terms). I have two ...
0
votes
1answer
77 views

my movement is working good on keyboard but on android its not

So basically here is what my movement is like for keys: key down if (keycode == Keys.LEFT) { mishi.getAcceleration().x = -13; } key up if (keycode == Keys.LEFT) { ...
1
vote
1answer
120 views

Mixing interpolation with extrapolation in multiplayer game

I am creating a multiplayer drag racing game and have difficulties mixing extrapolation and interpolation. To save network bandwidth i am getting information from the opponent only on his button ...
1
vote
0answers
419 views

Checkers make move and take move algorithm

I'm coding a checkers game and I encountered a problem and I'm 99% sure is about how the move is done and taken back. The structure of my game data is: an 8x8 array containing my board squares. ...
51
votes
7answers
6k views

Can I prevent diagonal movement from exploring more of the map?

In a tile-grid where movement in any of 8 directions takes exactly the same amount of turns (chess-board style rules), can I prevent diagonal movement from showing more new tiles than orthogonal ...
2
votes
1answer
208 views

Animating feet seperately from the body

I have a character and I would like to animate a walking animation for it. However i get the following result when I animate it: (ignore the green lines/ markers/ sound) As you can see the foot ...
2
votes
2answers
407 views

Intelligently move aircraft using curves

I am trying to code a script to move an aircraft entity from point A to point B and at some point in the middle of moving have the aircraft forward vector face Point C (to fire a missile at an enemy ...
1
vote
1answer
2k views

How can I translate a game object towards a position?

I am instantiating my game objects (spheres) through scripts. I want my spheres to move from one location to another. but I don't know how to do this. Update is called once per frame. Is that what I ...
0
votes
1answer
89 views

How to make character gain acceleration?

I want to create more realistic physics for my 2D games. Currently, the character and the other game objects in my games start moving instantly (achieve maximum speed instantly) and stop instantly ...
5
votes
2answers
183 views

Handle movement with QuadTree

I currently have a QuadTree that contains all my Entities. It works well and I've optimized it pretty decently, but the one thing that hurts is that I am removing from and inserting to it almost ...
0
votes
0answers
50 views

Issue with implementing friction for player movement

I have been writing a 2.5D FPS engine in the same style of Doom and Duke Nukem 3D. The game is 3D rendered but the world is represented in 2D. This is my current position update code for an entity ...
0
votes
0answers
37 views

Sprite won't travel properly to a point

I am creating a game in which I would like the player to be able to click a location and have the character travel to it. This is the code I am trying to use for this: if (Mouse.GetState().LeftButton ...
0
votes
3answers
87 views

How can I calculate force and acceleration?

I have problem of calculating the movement of the object. At the moment, I have a vectors calculated from the center of the screen minus the position of the object. direction vector = centerScreen ...
1
vote
1answer
380 views

Why is my Texture becoming slower when it approaches it's destination?

I have a texture drawn on screen. Whenever I click on the viewport it remembers its destination and starts moving towards it, until it is there. This is the code I am using therefore: //Check if ...
1
vote
0answers
50 views

How do I make a game object move at an angle in an integer-indexed grid? [duplicate]

I'm making a game in SDL2 and C++. I want a way to make any game object move in a specific direction. I've thought of assigning each object a direction in radians, from 0 until 2 PI where 0 would ...
1
vote
1answer
119 views

TopDown 2d player control

Whats the usual way to control a player in a top down game? We have to look in the direction of the mouse cause the player hold a torch. My first try was: to to make it absolute like W move to ...
4
votes
1answer
248 views

How do I make a cube move by rolling?

I am learning jMonkeyEngine by making some small games with it. I have a simple rectangular cube that I want the player to be able to roll around the game world. When he presses the arrow keys, the ...
1
vote
1answer
135 views

Calculating How To Intercept a Moving Object [duplicate]

So I have two objects, Target and Interceptor. Target's position, direction of movement and movement speed are known, and Interceptor's position and movement speed are also known. Both movement speeds ...
1
vote
3answers
92 views

Getting sprites to move exactly the same on different devices

Background When moving a sprite along the X axis, this is my code: spriteXReal = spriteXReal + (spriteXVel * dt); //.5 would be halfway point of, 1 would be right hand side screen etc... ...
0
votes
1answer
167 views

How can I move the view in a DirectX game?

I'm making a game in C++ using Direct3D 9. How do I move the camera at constant rate? I'm making a Flappy Bird type game and I'd like to move the camera forward through the level.
0
votes
0answers
112 views

Farseer Player Movement and Collision

I have added a video link for any one who whats to see what the problems are by watching the game. I am trying to create a player movement system and there are small problems that I am running into. ...
1
vote
1answer
238 views

Player Movement Systems

I am working on a project were in class my group of students help produce a video game. We are creating a 2D platformer and was trying to make a pixel based system collision witch fell through. Now I ...
1
vote
1answer
150 views

Ice sliding physics

I am trying to implement ice sliding physics on a plane for my game. There are a lot of N64 games that implemented them perfectly well, like Banjo-Kazooie, Super Mario 64, Zelda: OoT and MM, etc. ...
0
votes
1answer
104 views

What's the best way to time a character AI movement on android/java?

I'm creating an android game and I'm trying to figure out the best way to time a character position change, something like this: public void move() { //this.posX += 5; this.posY += 5; if ...
0
votes
0answers
173 views

Make bitmap moviment on android canvas using timer or handler/Runnable/postDelayed

Im trying to to move enemies on a android canvas, i have to update its x and y position every x time (run enemy.move() every x time). I got 2 problems: Currently im implementing my canvas redraw ...
0
votes
1answer
669 views

How can I delete an enemy's bitmap from a canvas?

I'm learning to create an Android shooter game where I'll have multiple enemies. I must control the position on the screen and be able to delete each of then (via, for example, a die() function). ...
0
votes
1answer
676 views

How to clamp player movement correctly?

I have a 2D space shooter game. I looked up some questions from unity community and came across this solution. Below is the code for my player's movement: //horizontal <- || -horizontal -> ...
-1
votes
2answers
93 views

Camera movement bug

In my game, the player's movement script and the camera's movement script are separate. Both of them use "W", "A", "S", and "D" to move. The camera can also use "Q" and "E" to rotate around the ...
0
votes
1answer
130 views

How do I implement following behavior with a state-based AI? [closed]

I'm making a 2D game with two spaceships flying around shooting each other. One spaceship is controlled by the user, the by an AI. I want to use a simple Finite State Machine (FSM) for the AI. I'm ...
0
votes
2answers
66 views

Improving the performance of smooth movement up and down

I would like to achieve a smooth movement of a game object up and down. The way I have always seen this done is via a sine wave, and adding the value of y for a specified X to the game objects value ...
1
vote
3answers
472 views

How to move an object along a vector

Let's say I got an object A and object B in a 2D game. I create a vector leading from A to B. It's name is AB. How can I make A move along the vector AB and reach B? One way I was thinking of doing ...
2
votes
2answers
316 views

How can I rotate an Object towards a point in JMonkeyEngine

From time to time in my game, enemies spawn in different positions and they move toward a point. I need to rotate their body in such a way that their "face" is rotated towards the point. For enemies ...
0
votes
1answer
187 views

How can AI compute movement in 2D games

I know how to create a basic AI for a game, where the AI simple creates units that only march forward. The AI only decides when to create a new unit, taking into account a number of considerations. ...
1
vote
2answers
330 views

Change AI steering behavior's direction to 8 directions

I am making a 2d soccer game, all players move in 8 directions, so I need to convert AI steering behavior(like arrive and pursuit) into 8 directions. Here are three example situations: Player(now is ...
0
votes
0answers
18 views

Making an object fly in an arc (a parbola) [duplicate]

I'm making a game where there should be a robot throwing ball-shaped objects at another robot. The balls thrown should fly in the shape of a symmetrical arc. Pretty sure the math-word for this is a ...