Questions tagged [movement-prediction]

Movement prediction is the estimation of where an object will be in the future based on current and/or past information about that object's position.

Filter by
Sorted by
Tagged with
0 votes
2 answers
45 views

Using the boids algorithm for multidirectional boids

I have some difficulties with my basic collision system in croweded places as it is based on simple box to box or radius detection. Sometimes characters are stuck to something or stopped because there ...
philB's user avatar
  • 129
0 votes
0 answers
151 views

Explaination of Extrapolation from Game Programming Patterns

I'm looking for help because there is one thing from the game loop which I don't clearly understand. I'm in some way of doing implementation of my own 2D game engine based on book „Build Your Own 2D ...
Jakub Kowalski's user avatar
0 votes
0 answers
296 views

Latency handling methods in a fast-paced multiplayer game with moving objects

I am working on a real-time multiplayer soccer game. Currently, on my game, I created an architecture like that: Every client has a copy of the game state, also the server has it too. Clients send ...
Mustafa Akdeniz's user avatar
1 vote
0 answers
122 views

How can I predict if a Guided Projectile can hit a stationary Target (with no adjustments to aim)?

I'm trying to predetermine if a projectile will hit a target (before the projectile has been fired). The projectile settings include an Initial Speed, Acceleration, Max Speed, and a Turn Rate. I'm ...
Charles S.'s user avatar
1 vote
1 answer
673 views

Simulating movement input in server-side, with different tick rates

I'm designing a simple MMO game server with the help of ENet (reliable UDP library) and the Godot engine for client-side. I've read tons of articles, guides, stack exchanges questions regarding ...
Mdr's user avatar
  • 11
1 vote
0 answers
99 views

Calculate 2d rotation to target (uniformly accelerated rotation, constant speed)

I'm trying to calculate an uniformly accelerated rotation for the autopilot module in my 3d space game shooter. The autopilot should fly the spaceship to any given point in the 3d space on the ...
user2850375's user avatar
1 vote
1 answer
381 views

Rollback netcode: how to avoid teleportation?

I've currently implemented rollback netcode with a central, authoritative server (wooh!). I'm running into issues where if players have zero input delay, the other players see them "teleport"...
sailormoon's user avatar
0 votes
1 answer
285 views

How do I predict where a player will be next in Forge/MCP?

I am trying to predict where a player will be next based on where they are now in Java. I have their XYZ position, their XYZ motion, but I don't have their speed. How can I predict where they will be ...
Day Trip's user avatar
0 votes
0 answers
74 views

How to predict future position of body in solar system?

I have a solar system where each body interacts with each other by force F = Gm1m2/R^2 Is it possible to predict future position of some random body after t seconds since bodies velocity and position ...
Robotex's user avatar
  • 251
2 votes
0 answers
95 views

Client Side Prediction Doesn't Work with Fluctuating Latency

Ive been working on a prototype for client side prediction in multiplayer games, Ive managed to make it work but for some reason the prediction breaks when the latency fluctuates. For example if I ...
Graziano Bolla's user avatar
0 votes
1 answer
56 views

Prediction in deterministic netcode: Mixing predicted and non-predicted elements in display code. How do?

This one is a bit complex. So, I'm working on an FPS game that uses deterministic lockstep netcode, it can predict certain things like the player's own movement, weapon firing, and sounds. Entities ...
Jordon Moss's user avatar
6 votes
2 answers
560 views

Networking a fast-paced game (2D) - Forced Movement - Server / Client

I started a new project, a fast-paced online game (some sort of 2D MOBA). I encountered a problem with the part of netcode about client prediction & server reconciliation. Game Mechanics: 2D - ...
saqirmdev's user avatar
0 votes
2 answers
180 views

Moving ship to new destination when already having a velocity?

Feel free to skip to the bottom and see the actual question. NOTE: Question updated below based on comments I am trying to make a space game and implement basic movement, unlike most, this is a ...
TyCobb's user avatar
  • 339
0 votes
1 answer
652 views

Sever-side physics simulation and client 'inputs' send rate in a fast multiplayer game

I am building a very tiny first-person multiplayer game. I'm just aiming to get the basic rights: client-side prediction and reconciliation + entity interpolation. I have read many articles on these ...
user115675's user avatar
2 votes
1 answer
445 views

How to calculate trajectory on a planet with drag factor

I'm curious what is the valid calculation of a projectile trajectory in case when: surface is not flat but spherical like a planet drag is enabled (for example 0.1) and we are in 3D I've found ...
Panthesilea's user avatar
3 votes
3 answers
717 views

How to predict where the soccer ball should be intercepted by an AI player after being kicked?

This question has been asked many times before, but most of the answers give solution to the problem where ball (target) is assumed to be moving at a constant velocity. In my scenario, I'm making a ...
Ashish Gogna's user avatar
0 votes
0 answers
48 views

Calculate the starting position of a turning aircraft with inertial force to make it stop at desired position and heading

Continued from the answer here, I have some problem when the aircraft in my game has inertial forces after going forward and turning itself. To illustrate, from the following image (https://i.stack....
IndyKuma's user avatar
0 votes
0 answers
93 views

Leading a target with edge casting

I am trying to write a movement prediction code. I have found the quadratic method with these topics: [1]: How to calculate shot angle and velocity to hit a moving target? [2]: http://...
Dicaste's user avatar
3 votes
2 answers
206 views

most compact way to represent dice face translations rolling in cardinal directions

I'm making a 2-D dice rolling game in BASIC (think mechanics similar to Devil Dice on the Playstation, but top-down 2D graphics). I'm trying to accurately represent the transitions of a die when ...
OxC0FFEE's user avatar
  • 131
1 vote
0 answers
82 views

Keeping simulations in sync over long periods of time

I'm working on a multiplayer game which involves a huge amount of predictable AI enemies, and a few other players. The enemies are the most important to be accurate, because the game involves pixel ...
Stovoy's user avatar
  • 11
1 vote
2 answers
106 views

How to move the object with same pace regardless their target distance?

so I tried to get those first and third ball to be able to move with same pace no matter how curvy their target path is, I tried to get the y position of the target that the ball is moving to, but I ...
Mira's user avatar
  • 139
1 vote
1 answer
218 views

How do I determine how far to move an object in the client when using client-prediction?

I have a game server which, for testing purposes, is updating once per second, or 1hz so I can correctly implement client-side prediction. Everything is running locally at the moment so there is no ...
jjmcc's user avatar
  • 233
6 votes
2 answers
2k views

How can I maneuver an AI pirate ship for a sea battle?

I'm trying to picture in my head what would be required to make an AI controlled enemy do the following in a top down pirate sailing game: Approach the player ship Bring player in line with port / ...
Chris Morris's user avatar
0 votes
1 answer
3k views

how to do client side prediction with server side collision detection?

I recently started working on my first multiplayer game and learning multiple game server mechanics. The game itself uses mouse movement. For the first version I used a very simple approach, where ...
SpeekaDievs's user avatar
3 votes
0 answers
137 views

AI Agent realistic leap to a player in a MMO

In the last month I have been struggling with an issue, movement synchronization of a leap of an AI agent in a MMO. I know some theory and basic movement was not a problem with interpolation and stuff,...
Alakanu's user avatar
  • 705
25 votes
6 answers
7k views

How to make sure spinning objects hit a target with the right end?

I'm working on a throwing knife type weapon where a player free aims and then throws a knife. The knife spins through the air and on collision stops spinning and parents itself to the object it ...
FrontEnd's user avatar
  • 1,697
2 votes
1 answer
144 views

Movement-networking for a Worms-like game

I want to implement a strategy/artillery game, similar to Worms/Arcanists. As game-development (and game-networking especially) is new to me, I was wondering whether this would be a good/performant ...
Jasper Catthoor's user avatar
4 votes
2 answers
2k views

Client side prediction physics

I'm trying to build a simple networked game and I'm having trouble keeping a jump in-sync on the client and server. I've read the free gaffer on games articles and it's helped somewhat but I'm still ...
user1157885's user avatar
3 votes
1 answer
1k views

How Do You Handle Timed Events In Prediction/Reconciliation Client Model?

I'm currently designing and implementing a multiplayer game server for a fairly basic 2D tile game (somewhat similar to old Zelda games like LttP). The PvP aspect of this game involves fast paced ...
RelicBloodvayne's user avatar
3 votes
1 answer
612 views

Clientside interpolation - update rate fixed to client framerate

I am trying to implement client side prediction as in this article http://www.gabrielgambetta.com/fpm2.html Currently I'm doing it like this: the game runs at 60 FPS. 60 times per frame I check if an ...
skmr's user avatar
  • 51
15 votes
2 answers
2k views

How to compensate for moving objects with client side prediction?

I'm implementing a game server that supports Star Control-like melee. So you have ships flying and shooting, with super simple velocity/acceleration/dampening physics to drive movement. I've read ...
OpherV's user avatar
  • 655
2 votes
1 answer
1k views

Multiplayer game server sync

I am building a 2d multiplayer game with no physics and my own authoritative server. Already have all players getting synced each with other but their movement isn't so smooth yet. Here is the ...
Devester's user avatar
  • 133
0 votes
2 answers
257 views

The tolareable lag range in a multiplayer game

I am programming a multiplayer game. I calculate the ping in ms as : ping = the_time_i_recieved_pong - the_time_i_sent_ping I implemented client-side prediction ...
Oğuz Eroğlu's user avatar
1 vote
1 answer
118 views

Efficiently detect shoot direction with gravity playing a role?

How could I efficiently calculate shoot direction for enemy AI in order for it to hit the player? Things I know: player position, player velocity, gravity, bullet spawn position, bullet initial ...
Gintas_'s user avatar
  • 467
2 votes
1 answer
2k views

Client-side prediction for movement?

How would client-side prediction for movement work? From how I understand it, the player inputs "Move Forward" and the character on the player's computer instantly starts to move forward. It also ...
JPtheK9's user avatar
  • 2,031
1 vote
1 answer
788 views

How to predict future position of an object(bullet sync)?

There is a multiplayer game and server sends to all clients a message when a shot happens, containing bullet position, bullet velocity and timestamp. By having timestamp, we can calculate the lag, let'...
Gintas_'s user avatar
  • 467
14 votes
3 answers
6k views

Unity - How to move a ship realistically to a point in a 2D top-down game

i'm trying to move a sailing ship to the point where i clicked with the mouse. this movement should be realistic (oar at the back where the ship moves around) so if the mouse click is left and in ...
DavidT's user avatar
  • 141
3 votes
1 answer
469 views

Minimizing bandwidth for player movement

I am programming a multiplayer game and I am concerned about the bandwidth dedicated to player movement. Imagine a 2D top down game where players can move towards any angle using the joystick. The way ...
oxysoft's user avatar
  • 703
2 votes
0 answers
367 views

2D Physics library for multiplayer in c++ [closed]

Im trying to create a top down shooter with multiplayer functionality. So far im using Box2D for my physics Simulation. The last few days I played around with syncing movement between Clients and ...
sro5h's user avatar
  • 141
2 votes
0 answers
2k views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
Ssiro's user avatar
  • 85
1 vote
1 answer
591 views

Can UNet do Rigidbody2D prediction? (i.e. using gravity)

Having a NetworkTransform with transformSyncMode set to SyncRigidbody2D (as opposite to a ...
o0'.'s user avatar
  • 3,370
4 votes
2 answers
2k views

Authoritative movement with client side prediction

I don't fully understand how client side prediction works with authoritative movement. Let's say we have: client at position(0,0) server at position(0,0) Now the client wants to move forward and ...
Maik Klein's user avatar
0 votes
1 answer
682 views

Calculate future 3D Position of object(Unit)?

I've looked around and almost all examples is see have a velocity vector which I do not have, or at this point am unable to figure out. Im trying to find the 3D position where i can launch a trap in ...
Richard's user avatar
3 votes
3 answers
2k views

Prevent movement cheating in MP games

I have read a lot about movement in multiplayer games, but not so much on preventing cheating. Let's say a client sends moves packets whenever the player press a movement button, then the server ...
Newbe763547634's user avatar
10 votes
2 answers
2k views

How to handle realtime random movement with client side prediction

I'm building a realtime multiplayer game that runs the same 'physics' loop on client and server. I'm using a steering behavior 'wander' that is essential random movement. The client and server ...
kevzettler's user avatar
1 vote
1 answer
117 views

Calculating aim point to pass through other point

We know for an object: Initial point O(x,y) Initial speed (s_x,s_y) Constant vector module aceleration (A) A point P(i,j) where we have to pass through in the future. We need: A point W(x, y) so ...
freesoul's user avatar
  • 393
1 vote
1 answer
2k views

How to implement a hint-system for nearby matches (in a Match-3 puzzle game)?

Taking Candy Crush as an example: In a Match-3 game, how would you figure out which nearby tiles are 1 move away from creating a match? Do you basically have to do it by trial-and-error on every ...
chamberlainpi's user avatar
2 votes
1 answer
553 views

Using peer to peer for prediction in a client-server network model

By implementing peer to peer connections between clients in a client-server network model I should be able to increase the prediction fidelity as this theoretically would provide the client with other ...
Willem's user avatar
  • 231
8 votes
1 answer
812 views

How can I predict player-to-projectile collisions in Box2D?

I'm making a real time shooting game with Box2D as the physics engine. The gameplay is mostly about trajectory, like Angry Birds. I want to make a slow motion effect and move camera to the player when ...
Arch1tect's user avatar
  • 297
1 vote
1 answer
472 views

Packet Loss Affecting Client-Side Prediction

I have been reading about client-side prediction lately and I have been thinking of ways to implement it into my multiplayer game. I think I have a pretty good understanding of client-side prediction ...
hyrumcoop's user avatar
  • 113