| bio | website | thewebsiteabout.me |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 5 months |
| seen | Mar 31 at 3:49 | |
| stats | profile views | 15 |
|
Feb 18 |
comment |
Get timing correct with client side prediction Yes, you shouldn't let the client say "I ran a timestep of 9999999999999ms". Instead, you should keep track of the last time the client sent an input packet. Check the time in between receives, and if the time is more than what you measured by some error, then the player definitely sent a modified packet. As for sending input, I just fire away the input packets each frame unreliably. |
|
Feb 17 |
comment |
Get timing correct with client side prediction Don't wait for the server -- just run the prediction as normal. When the server receives an input packet, it should check if there are anymore timesteps it needs to run, and if there are, it should run all of them before accepting the new input. The server should also keep track of the last ID received and send the ID along with the server's calculated position. |
|
Feb 17 |
comment |
Get timing correct with client side prediction Unfortunately, doing something like this complicates rewinding/replaying when corrections need to be made (timesteps are different, so it's hard to extrapolate which frame to use). What I do is send an ID and how long the last frame took to the server. The server sets a "totaltime" variable equal to that, and updates in chunks of that time. After the totaltime has been depleted, it sends the position that it believes the player should be at. |
|
Jan 17 |
comment |
Cast ray to select block in voxel game This works pretty well with my engine; I use an interval of 0.1. |
|
Jan 15 |
comment |
Curious Transparent Holes Render Artifact Worked like a charm! Thanks, guys. |
|
Jan 14 |
comment |
Curious Transparent Holes Render Artifact Thanks! I'll try this tomorrow. |
|
Dec 29 |
comment |
Smooth Voxel Terrain That cleared things up! Thanks. |
|
Dec 29 |
comment |
Smooth Voxel Terrain Are you saying that I should just store the height values for the corners and not store height values of the "intermediate" points? |
|
Dec 28 |
comment |
Smooth Voxel Terrain Thanks for the reply! I tried doing exactly that, but I got some unfavorable results. At first, I tried simply rounding the height values at the edges (when x is 0 or 4, or z is 0 or 4), but that got me: i.imgur.com/eQW7Y.png (pastebin.com/Lr8vyyHB) Next, I tried smoothing out the points in the middle, so I added a "fix heights function": pastebin.com/AazQ07Xm That, however, also gave me a more angular, but also bad result: i.imgur.com/q1JVP.png Perhaps something is wrong with my noise function? |
|
Dec 28 |
comment |
Smooth Voxel Terrain I just tried implementing this, and I ran into some confusion - what do you mean by "interstices?" Do you mean the integral grid coordinates? |
|
Dec 27 |
comment |
Smooth Voxel Terrain Amazingly detailed! Thank you. |
|
Nov 24 |
comment |
Scaling Sound Effects and Physics with Framerate It worked! Thanks |
|
Nov 23 |
comment |
Scaling Sound Effects and Physics with Framerate I want to be able to support any framerate. Am I correct in understanding that you want my physics loop to update with the timestep, but have the render method draw at whatever FPS? That would defeat the purpose of running the game at a higher FPS though. |
|
Nov 23 |
comment |
Scaling Sound Effects and Physics with Framerate If I use Math.Max, my velocity ends up getting capped, which doesn't really solve any issues. It also makes the movement not a parabola anymore, making the transition jarring. |
|
Nov 23 |
comment |
Scaling Sound Effects and Physics with Framerate That only partially solved the issue -- the jump is much closer to the jump at 60 FPS now, but at 120 FPS, the player is able to jump ~2x the height that a player at 60 FPS can jump. As for sound, I'm using XNA with XACT, and so the sound is played asynchronously by the framework. I'm simply telling the framework to play a sound effect each time a bullet is fired. |