Questions tagged [movement]

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

Questions in this tag deal with how in-game entities move about in the world, such as:

  • How to track the movement of an entity
  • How to plot out complex and patterned forms of movement (like a sin wave)
  • Altering the method of movement to emphasize or de-emphasize realism.

This is only about movement with respect to positional change. For body movement of an entity, like walking legs, see .

1036 questions
14
votes
3 answers

Technique for objects following each other in complete movement?

I'm wondering how objects follow each other where they move over the previous position of the object in front of them. When the leading object stops, all that are following should stop at their position. So how is this achieved? Like…
Sidar
  • 3,577
  • 2
  • 15
  • 28
5
votes
2 answers

Is it safe to set FPS rate to a constant?

I learned from game class that in update function, every movements must be time dependent for the sake of linearity in movement. We made a simple game. Every move like going left, right or jump is written time dependent. But, in some other…
Ozan
  • 53
  • 5
5
votes
1 answer

Why would a bigger game move the gameworld around the Player instead of just moving a player within a gameworld?

So, this might be a little random since I can't remember any specific examples but this question just popped into my head 30mins ago and wont leave me alone. I remember hearing about some big game with decently sized gameworld that would move…
Fowo
  • 51
  • 1
4
votes
1 answer

Updating object position

An object - a player or npc or whatever - has a position, direction and speed and such. Before drawing each frame, we want to compute the current position of each object. How do you do this? If you take the elapsed time since last frame, you run the…
Will
  • 6,977
  • 4
  • 36
  • 59
3
votes
1 answer

Theory behind worm like movement?

I don't want code or anything that will make this too easy for me, but I'm just starting the development of a little game and I want to add worms to it, I want the worms to be Terraria like. My current idea is to make the worm be composed of…
Shaun Wild
  • 583
  • 2
  • 5
  • 23
3
votes
1 answer

How can realistic 3D body-part movement be implemented?

Say you create a person, monster or robot, with arms, legs, head(s) ... in 3D in a game. How do you coordinate the body-part movement to achieve the fluidity of real living beings? Is there some theoretical base, or do you just try until it looks…
Sebastien Diot
  • 631
  • 5
  • 12
1
vote
2 answers

Scene - human speed correlation

I am writing a really simple game with a scene (horizontal plane) and a human moving to the right of the plane (watching the simulation from the +z axis). The scene contains some trees, which I am moving towards -x axis in order to create the…
Chris
  • 153
  • 1
  • 6
1
vote
6 answers

How do you simulate frictionless movement?

I am building a game in which I want to simulate smooth movement of an object upon pressing a key or any other event. Could someone advice me to get that feel of gliding of an object, sliding on a frictionless surface. How could I have that?
noddy
  • 647
  • 1
  • 7
  • 15
1
vote
3 answers

How do you program diagonal movement?

I'm wondering how a diagonal element that moves along a diagonal path that hops at each tick of the computer clock is able to travel a greater distance along the screen than an element moving at each tick along left-right or up-down paths (since…
Winterstorm D
  • 19
  • 1
  • 3
1
vote
0 answers

Game Maker Studio: How to make Player Circular Movement

I want to make a player move in circular but not that he move automatic but manual. Similar like in the game Zero Refelx.
domityson
  • 11
  • 1
0
votes
2 answers

how to make a sprite jump or fly and fall slowly

I'm a beginner in java and im suffering to make a 2d game. I already wrote a simple code that makes the character or the sprite jump by increment his Yposition when key is pressed and do the reverse when released ,but it doesn't satisfy me because i…
GoForIt
  • 3
  • 3
0
votes
2 answers

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 I found until now: Just move the player from (xi,…
Totty.js
  • 139
  • 8
0
votes
0 answers

How can I efficiently load and unload regions of a world as the player moves?

I am creating a game with infinite terrain. Sections of the terrain are broken up into regions of fixed size for handling (similar to chunks in Minecraft). I would like to load and unload them as needed as the player moves so that every region…
CPlus
  • 143
  • 11
0
votes
0 answers

What is cutoff when calculating speed in this equation?

I saw a twitter post mention the following as way to make movement frame-rate independent: changeRate = 1 - exp(-2.0 * PI * cutoff / fps) speed -= speed * changeRate What is cutoff? And is fps a constant or the actual fps? As someone unfamiliar…
0
votes
0 answers

Unable to use a velocity value when using KeyInput

Heres the code for the KeyInput public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); for(int i = 0; i < handler.object.size(); i++) { GameObject tempObject = handler.object.get(i); …
1
2