Tagged Questions

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

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
vote
1answer
240 views

C++ Using clock() with IsKeyDown

I am trying to replicate the game Asteroids as a class project. I am having trouble measuring the time elapsed while the "W" key is pressed. This code is supposed to increase the force applied to the ...
1
vote
2answers
399 views

How can I move an object over a drawn tile map in HTML 5 without constant buffering?

I've been messing around with HTML5 for quite some time now but this is something that I guess I haven't figured out how to handle well yet. I'm sure there's an extremely easy solution and I just ...
1
vote
1answer
135 views

Increase restitution (bounciness) of an object in a JavaScript formula

I'm going slightly around the houses on this one. I originally started a thread over on Stack Overflow about it but then it seemed to diverge into mathematics, with no joy from the SO community over ...
1
vote
2answers
352 views

Controlling player and camera movement in a 3rd person game with keyboard and mouse

In many action games with a third person view, joystick controls typically map the left joystick for player movement and the right joystick for camera movement (or more precisely camera's direction ...
0
votes
1answer
175 views

DPad style movement for AI without using A*

What is the easiest way to implement DPad style movement (No diagonal) for AI without using and A* algorithm? I thought about having the enemy catch up to the player in the Y axis first then the X ...
2
votes
2answers
880 views

Making a player move to my mouse when clicked?

How can I get my player to move to the mouse when it is clicked (like in Warcraft)? So far I have tried: if (Mouse.isButtonDown(0)) { if (X < Mouse.getX()) { X += Speed; } if ...
1
vote
2answers
445 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 ...
3
votes
1answer
200 views

Figuring out which direction my object is facing on a 2D plane?

My friend and I were messing around in XNA 4.0 making a 2D racing game. Kind of like this one: Ivan “Ironman” Stewart’s Super Off Road. The problem we are having is knowing which direction the car is ...
3
votes
1answer
215 views

AI surrounding algorithm suggestions

I am building up a simulation where predator groups (tribes) try to hunt other agents in the simulation (whom also are clustered in groups). Now I got to a point where members of a group follow their ...
1
vote
0answers
596 views

3 Button Multi-touch for Android

OK, my multi-touch system was somewhat convoluted, but was working perfectly OK until I tried to run my game on my Nexus 10 which is running Jellybean. Crashing all over the place! So I removed my ...
4
votes
3answers
3k views

How do I calculate how an object will move from one point to another?

Here's the problem: A player starts the game in the 0 coordinate (x=0,y=0). When the user clicks on the screen, it returns the coordinates of the destination. Now the player has to move from its ...
0
votes
2answers
980 views

How to make a smooth movement in XNA?

I'm trying to make a nice controls for my game, but I can't achieve enough SMOOTHNESS. if (kbState.GetPressedKeys().Length != 0 && _direction != Vector2.Zero) { ...
2
votes
2answers
939 views

Non-physics character movement in a Box2d Environment

I am in the process of creating a physics platformer. However, I want the player movement to feel very old-school(as in: non-physics like), which means that the character: Should always move equally ...
2
votes
2answers
506 views

How to get the height at a position in a triangle

I have a heightmap, and I store the heights in a giant array. However, when I move, it's quite choppy on the Y-axis, so I need a way to get the height at a certain point in a triangle. I currently ...
1
vote
2answers
365 views

Make a 2D character stop moving and going back when encounter an obstacle

I am using a 2d character who is sliding infinite ( huge incrementation of the X or Y value ) when moving. He can only move up, down, left, right inside a virtual grid, made of multiple squares. Now ...
1
vote
3answers
607 views

Moving a 2D character on a straight line

I am trying to create an Android Game and I am facing my first big problem. After reading blogs, tutos ... I am able to easily move a character with a drag and drop, make it move move to a touched ...
2
votes
1answer
360 views

How to handle slopes/bridges in a 2d grid turn based strategy game [duplicate]

I was wondering about the following: In a 2D turn-based strategy game (using some grid(i.e. tiles, isometric hexagons) as movement), what techniques do they use to determine where a character moves ...
1
vote
2answers
1k views

Moving player in Box2d without forces

How do I move player with keyboard without applying forces? If I do playerBody.setLinearVelocity(new B2Vec2(0, 2)) it moves the player but when I release the key for movement, the ball is continuously ...
2
votes
1answer
1k views

Stopping on a slope in Box2d

I am creating a simple platformer using Box2d. I've implemented a variant of the technique described here. To make the player character move more 'platformer-like' I want him to stop on (shallow) ...
9
votes
2answers
2k views

How can I make a character walk on uneven walls in a 2D platformer?

I want to have a playable character who can "walk" on an organic surface at any angle, including sideways and upside-down. By "organic" levels with slanted and curved features instead of straight ...
1
vote
1answer
530 views

How do I make camera follow the player within some bounds?

I am creating a simple ambient/explorer platformer. Because I want the player to only be able to see a new area once they have reached it, I decided to split up the world in rooms. To not make things ...
9
votes
2answers
413 views

How to handle entity path-finding and movement in a large networked world?

Considering the image above with tiles split into 32x32 boxes, I have an entity which is marked to 'aggro' nearby players that come close to it. I'd like this monster to ideally chase the player (and ...
1
vote
2answers
258 views

Basic plane kinematics

I never did physics in my life and this is really hard for me. I am currently trying to implement movement in the X and Y axis of a plane, in a video game I am making. What I want to do is, given a ...
7
votes
2answers
467 views

Simulate movement towards the screen in a 2D world

I need to create the illusion of someone kicking a ball to the screen. For that, I have a initial position of the ball (about the middle of the screen), and I put the sprite of the ball scaled at 0.2 ...
0
votes
1answer
312 views

Player movement behind objects

I was playing around on RPG JS and Browser Quest, and the player, when moving, can give the effect of walking behind the trees or houses etc, so the player effectively disappears while it is "behind" ...
-5
votes
2answers
570 views

A* mouse movement javascript top-down game

Im trying to implement a* path finding for my character movement in my game. The game is written in javaScript along with jQuery in a canvas. I have read up on A* so i believe i understand what it ...
1
vote
1answer
135 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 ...
0
votes
1answer
731 views

XNA - move camera over tilemap

I am trying to build a game based on Advance Wars in XNA. I am so far where the tiles are placed on the screen, except here starts my problem. During the game, I ofcourse want to move the camera ...
6
votes
4answers
448 views

Implementing AI to hide behind obstacles

I am developing an AI simulation of predator and prey. I would like to simulate the AI hiding behind obstacles, if it is being chased. But I am still trying to figure out the best way to implement ...
-1
votes
1answer
199 views

simple escape algorithm: enemy escapes when hero approches

I need some clues on a "escape" algorithm. My scene a 2D rectangle (0,0,1000,1000) I have enemy sprites on this scene. They are immobile until distance from hero <100. If distance<100, enemy ...
6
votes
1answer
347 views

Swaying Camera when Walking

You can see the effect in many games. The camera sways or wiggles a bit while walking to make the movement feel more realistic. I have implemented a camera in my game. (Who'd have thunk it?) So is ...
0
votes
2answers
165 views

I would need an idea on how to animate a player in a board game that is top-down and 2D?

I'm planing a 2D board game and I cannot figure out how to make the animation of the player from tile to tile. Note that tiles are not in a grid, they are flexible (x, y) points in the map. The ways ...
9
votes
2answers
224 views

Interpolating between two networked states?

I have many entities on the client side that are simulated (their velocities are added to their positions on a per frame basis) and I let them dead reckon themselves. They send updates about where ...
1
vote
1answer
1k views

Moving sprites on a graph in libGDX

In my game I'd like to move sprites on a fixed path. Until this point I was trying to stick with the tools already provided by libGDX, like the Tiled map renderer classes so I'm looking for a solution ...
2
votes
2answers
300 views

What's the best way to move cars along roads

I am implementing car movement game (sort-of like Locomotion). So 60 times a second I have to advance the movement of each car. The problem is I have to look ahead to see if there is a slower car, ...
0
votes
1answer
249 views

Rotate/Translate object in local space

I am just trying to create a movementcontroller class for game entities. These class should transform the entity affected by the mouse and keyboard input. I am able to calculate the changed rotation ...
3
votes
4answers
3k views

How to move a sprite automatically using a physicsHandler in Andengine?

I use a DigitalOnScreenControl (knob with a four-directional arrow control) to move the entity and the entity which is bound to a physicsHandler. physicsHandler.setEntity(sprite); ...
0
votes
1answer
128 views

enemy behavior with boundary to change direction

I'm doing space shooter kind of game, the logic is to reflect the enemy if it hits the boundary. With my logic, sometimes enemy behaves like flickering instead of changing the velocity. It's like ...
17
votes
2answers
1k views

Eight or infinity sign trajectory

When I want to move object around point I do: point.x *= cosf(timer.timeElapsed); point.y *= sinf(timer.timeElapsed); How to make point move on eight or infinity sign trajectory?
2
votes
1answer
622 views

Pygame Tile Based Character movement speed

Thanks for taking the time to read this. Right now I'm making a really basic tile based game. The map is a large amount of 16x16 tiles, and the character image is 16x16 as well. My character has its ...
1
vote
0answers
98 views

What are the disadvantages of client-side prediction?

There's lots of talk of server-side prediction, but I haven't seen a client-side alternative implemented anywhere. My game uses mouse-based movement, so it's easy to predict the player's location ...
3
votes
1answer
334 views

Moving the jBullet collision body to with the player object

I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
-2
votes
1answer
398 views

C# XNA 2D Multiple boxes collision detection and movement

Hi, I've been making simple game where you shoot boxes that are coming towards you. All game objects are simple rectangles. Now I have problem with collision detection; how to check where the ...
2
votes
1answer
233 views

Movement on the X an Z axis are combined?

This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, ...
3
votes
1answer
402 views

Scaling sprite velocity / co-ordinatesin Android

I'm trying to find the answer to a question that I've had for a long time, but am having trouble finding it! I hope someone can help :-) I'm trying to find information on how to scale sprite velocity ...
3
votes
2answers
177 views

Is there a expected set of button mappings games commonly use?

I am making a game that will support a XBox 360 controller but I would like to try and keep the default button mappings to be what is expected from a user's past history from playing other games. Is ...
2
votes
2answers
226 views

What sort of data should be sent for mouse-based movement in a multiplayer game?

I'm new to the Multiplayer Rodeo here so please bear with me... I am just getting started and I'm trying to figure out how to deal with movement. I've looked at the question Best way to implement ...
0
votes
2answers
285 views

XNA move from start position to target position exactly in 3D

If I have a list of positions that map out a path a character should follow. What would be the best way to move at a constant speed to each position making sure the character lands exactly at each ...
10
votes
2answers
647 views

How to limit click'n'drag movement to an area?

I apologize for the somewhat generic title. I'm really don't have much clue about how to accomplish what I'm trying to do, which is making it harder even to research a possible solution. I'm trying ...