Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lag]

A visible delay between input and screen update.

0
votes
1answer
73 views

How do online games deal with lerp overshooting?

From what I understand, when you lerp in an online game, you travel from point a to b based on the elapsed time since the last update. The problem is when you have a higher latency, and you start ...
0
votes
1answer
62 views

lag compensation for slow bullets (opposing players perspective)

I have figured out how the server is suppose to "rewind" for bullet collisions so that when you hit a player on your screen, the server will also say you hit them. However, when you press a key to ...
1
vote
1answer
117 views

My Java Game's movement looks awfull. Maybe Problem with Thread.sleep

I have a big problem with my Java games. In every game I make the movement of the player and objects just looks awfull. The framerate is 60 fps without any problems. But the movement looks extremly ...
1
vote
0answers
18 views

Handling game message packet loss at low speed and at a microcontroller level

I read this: How do I handle packet loss in a client-server network model? ...But I'm looking for more advice. Currently I'm implementing my own lazertag vests. I'm programming hardware (8051 ...
0
votes
1answer
146 views

Lag Compensation in a Real-Time Game

I have been trying to implement some lag compensation techniques for a real-time game, I've found some good resources online, but I don't think I fully understand the server-side part of the problem. ...
0
votes
0answers
42 views

Use both entity interpolation and extrapolation

I'm working on a multiplayer HTML5 game using playcanvas and websockets. The server is developed using Node.js. For now, the server doesn't run physics. It will be added later in particular to ...
1
vote
0answers
57 views

How should I implement lag compensation in my racing game?

I've looked around and I see a lot of discussion about lag compensation for FPS's, but none for racing games. I know Mario Kart uses some sort of interpolation for other racers, but it doesn't ...
0
votes
0answers
66 views

The websocket messages in my online game are being served too slow

Im attempting to make a online game in python, though I have ran into a problem. Basically I want the game to be playable in many regions, but the websockets are to laggy to be played in farther ...
0
votes
1answer
419 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 ...
0
votes
0answers
33 views

Lag in Construct 2

Whenever I test my game, it starts lagging after awhile, then stops. I don't even have many objects so I doubt it is because of that. Does anyone know how to help? Edit: I did a debug, and it says ...
0
votes
3answers
169 views

Alternative to canvases (unity)?

I have a Unity project which requires a bunch of Canvases and, surprise surprise, they're creating a lot of lag. I've already turned off the graphics raycaster for every single one, but they still ...
1
vote
1answer
517 views

Delayed linear interpolation for networking

I'm trying to implement the delayed snapshot interpolation presented at Valve's article and also Gambetta's. My current implementation is almost identical as described in the 'Multiplayer object ...
0
votes
2answers
896 views

MMO Server with C# asynchronous sockets performance

I have developed a 2D RPG MMO client / server. The server is developed in C# with asynchronous sockets. It is a pretty simplet implementation. The server gets the client's input / coordinates and ...
3
votes
2answers
820 views

Server reconciliation for multiplayer games

Reading the usual resources on multiplayer games (1, 2, 3); I have started working on my own multiplayer game. I used a naïve approach that for every input I receive from a client, I immediately run ...
0
votes
1answer
214 views

How Many Entities can the Unity Game Engine Handle Before it Starts to Lag?

I am building a player model for my game, the model is very complicated due to its ability to be customizable. A single player entity can have 70 + entities including the head, parts to the face, arms,...
2
votes
1answer
355 views

How to solve “server lag” problems that break the game

How do real-time multiplayer games deal with latency problems (or “server lag”)? Imagine an online fighting game where 2 players battle head-to-head in real time. When a player performs an action, ...
0
votes
0answers
150 views

Unity has extreme lag while deleting trees from terrain

So I have a terrain with sections of water in it. I just placed a whole bunch of trees in the scene with mass place. However, it spawned trees in the water which I obviously want to remove. But when I ...
1
vote
1answer
116 views

How to prevent clients from stuttering while keeping the game in sync in multiplayer Pong?

I wrote Pong in multiplayer. The clients all run their own game, but I have an authoritative server which enforces its ball position onto the clients. The game is in sync and playable, however, there ...
0
votes
1answer
171 views

Lag in collision detection

I am a beginner with PyGame and am currently making a simple game using but I am having difficulty with the collision detection. When the game runs, the response to the collision detection (printing ...
0
votes
1answer
60 views

JVM voxel game engine lag spikes

I'm experiencing short lag spikes after some voxel chunks have been created while not moving the camera around. I profiled the application: the JVM implementation uses a lot more memory, about 2.5 ...
3
votes
1answer
637 views

LibGDX - FPS drops

I've been trying to record some gameplay footage of the game I'm currently working on, using the Android SDK and ADB to do it. Whilst the game runs at constant 60 fps in my medium-end phone, as soon ...
1
vote
4answers
1k views

A* pathfinding takes too long, shortcuts needed

So I have a game where the player can move on a grid 108 X 192 large. It uses a simple A* path-finding algorithm to move. Unfortunately, After 0.03 seconds, it would have only looked at about 300 ...
0
votes
2answers
166 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 ...
0
votes
0answers
165 views

Pygame image blitting makes game lag

So I have a tile-based game that is 216X384 units large. Each square in the cell_array is grass, which I pre-loaded with convert_alpha(). Each time it draws (I have fps at 30), it cycles through the ...
1
vote
1answer
157 views

OpenGL Applications Bring computer to halt

Whenever I run any application that utilizes the OpenGL interface, my entire computer comes to a halt, but it doesn't do this when it utilizes the DirectX interface. I run both Linux (Ubuntu 15.10) ...
0
votes
2answers
2k views

How can I simulate the effects of network latency to test my lag compensation?

I am trying to observe the effects of lag compensation in my game by increasing my ping to 200+, adding loss, and by the limiting bandwidth to simulate wide area network delays using Network Emulator ...
1
vote
1answer
299 views

Too many if statements cause lag? [closed]

I am trying to make a vertical scroller game with collision tiles on both sides. I'm using Libgdx and android studio. The problem is that i have made every tile as an object with a rectangle for ...
3
votes
2answers
2k views

2D Game has very bad lag because of one script?

I am making somewhat of a flappy bird clone (mostly for practice) and everything works fine, but it is just really slow with a low FPS of 13 and a max FPS of 28. Why would this be? So I ran a check ...
5
votes
1answer
334 views

Applying the input for the always-moving player in the multiplayer game

I've read several articles published on gambrielgambetta.com, gafferongames.com plus some pages about how Valve handles multiplayer networking in its games but I still can't get it how to implement ...
3
votes
1answer
2k views

How to measure packet latency?

In the context of lag compensation, one needs to know when the command is instantiated on the client (this can be named as "command execution time" as well). AFAIK, there can be 2 methods for this: ...
2
votes
1answer
175 views

Lag compensation in rocket game context

I have read a lot of papers recently to understand the lag compensation concept recently. They were all about the same context: shooter game where bullets move in infinite velocity. The most ...
2
votes
2answers
2k views

What makes Minecraft so CPU intensive, and what could be done to improve it? [closed]

Recently I've been searching for VPSes that allow Minecraft servers to be hosted, and surprisingly very few do. Most allow for games - but Minecraft in specific is disallowed by many. Now it's fairly ...
1
vote
1answer
1k views

What's the most recommended transmission format using websockets for a MMORPG? [closed]

(note: I'm not asking for the supported formats in the RFC, but the format I should develop to send/receive the messages, say, in the Application layer). (note 2: Please help me retagging this post ...
1
vote
2answers
259 views

Client Tells Server What Gamestate Data to Send Back

I'm just stepping into the world of MMORPGs and how they function, so assume I know very little. in a game, a client doesn't see everything that the server does. For example, the client can't see ...
1
vote
1answer
3k views

Unity game in edit the scene mode all of a sudden became incredibly slow/“laggy”

So I recently have been working on a game. So far I have very few assets in the game, which are a point light, a piece of terrain (which is textured), a player controller and a tree. Everything was ...
1
vote
1answer
894 views

LibGDX Touch Delay

So I'm trying to make a game in which you have to tap things fast, but the thing is - after you touch something (the area I chose), it takes like 2 more seconds to register another touch. Now, I think ...
1
vote
2answers
625 views

How do I handle game lag due to background apps

I'm developing a game using libgdx and have noticed on several occasions that other background apps running can cause lag in my game - especially when those apps are being updated in the background. I'...
1
vote
1answer
252 views

Why is there a huge update-delay in my client/server code?

I'm working on my Java game with Libgdx and having trouble with the network code. I can create a server, make multiple clients connect to it, but there is a huge delay between the player's input and ...
7
votes
3answers
11k views

How do I handle packet loss in a client-server network model?

In a client-server network model, the clients only send commands to the server (i.e. coordinates of a click, fire gun, etc.) and the server then runs those commands to produce a game state. But what ...
-1
votes
1answer
360 views

java tile based game :tile lag fix

hi I have a game where it reads a txt file and loads a map 0 represents air and 2 represents dirt I have a class for each tile as well as a tilemap I will show u my code. the problem is it lags like ...
1
vote
3answers
288 views

Lag created when detecting collision

I'm fairly new to gamedev and have encountered a problem with the collision detection system. The collision is essentially worked out like this: ...
1
vote
2answers
899 views

Movement doesn't look smooth (slight lag)

Currently I'm using a variable time step and when the FPS drops by even a small amount you can easily notice a slight lurch forward of the player. I'm making a platformer and I'm wondering whether I ...
0
votes
1answer
575 views

Why can a certain DirectX mode produce display lag?

I have written two small test games using DirectX 9. One uses presentParams.Windowed = false; presentParams.PresentationInterval = D3DPRESENT_INTERVAL_ONE; and ...
3
votes
1answer
184 views

When using MVC, what is the proper way to handle a view refresh when the model isn't ready?

I'm about to start building a game and am having trouble understanding the proper course of action when it's time to refresh the screen, but the model hasn't finished its calculations. I assume this ...
0
votes
1answer
723 views

XNA cursor lag

I'm trying to understand if this is avoidable, or it's something I just have to deal with when using XNA. I made a new game project and loaded simple 16×16 cursor image to draw each frame at exact ...
20
votes
5answers
3k views

Tricks in game mechanics to avoid dealing with network lag compensation?

Implementing network lag compensation is hard, how to avoid it? Maybe it's possible to use tricks and build game mechanics in such a way that lag would be percieved as a non critical or even as a ...
4
votes
1answer
456 views

How to properly do weapon cool-down reload timer in multi-player laggy environment?

I want to handle weapon cool-down timers in a fair and predictable way on both client on server. Situation: Multiple clients connected to server, which is doing hit detection / physics Clients have ...
2
votes
1answer
563 views

How can I detect and compensate for system related lag?

The best example I can think of is Doom 3. It seemed to me that if there was any kind if lag the game would pause and then resume without "fast forwarding" to catch up. I'm trying to figure out a good ...
7
votes
2answers
1k views

Mitigating the noticability of a frame drop in XNA

I have been having some minor frame drop issues in a 2D XNA game. To start with, I am a vsync'ed, mixed timestep. That is: ...
-3
votes
3answers
274 views

Game getting progressively laggier?

I have a small game in HTML5 that uses socket.io to communicate with a node.js server. Now my problem is that, ever since I did my last update on it it seems to have something "chunk up" in the ...