JoshuaBaker

Members
  • Content count

    64
  • Joined

  • Last visited

Community Reputation

235 Neutral

About JoshuaBaker

  • Rank
    Member
  1. Ok everyone, for the love of all that is holy plz plz plz understand the difference between a franchise business and its corporate counterpart. MANY of the restaurants and business you patronize are NOT corporate owned. They are administered by private local business owners, and usually they only have 10-20 locations if that. These are small businesses, they have less revenue and different problems that large corporate entities. So stop with all the complaining when they do what they have to...
  2. Tony Scott, suicide? I was a big fan of all his work. Ashame
  3. When money and power is concentrated in a central location, no one should be confused or angry when the lords and ladies line up in droves to pay homage to those who control it. I cannot understand the notion that this problem can be fixed by centralizing even more money and power and believing that it will be evenly distributed is some way. Philosopher-kings just do not exist, I would sooner trust in an invisible hand.
  4. Jumpy movement with fixed timesteps

    Iv been able to eliminate this issue in another way, rendering more boxes...i render 1000 of teh same box in the same place and the stutter vanishes, its as if the GPU is getting ahead of itself or something.
  5. I have been searching for a solution to a problem for a while now and i think iv narrowed it down to some sort of driver/opengl issue. You can read more about it here as i began thinking it was a issue with my timing code. [url="http://www.gamedev.net/topic/629585-jumpy-movement-with-fixed-timesteps/"]http://www.gamedev.net/topic/629585-jumpy-movement-with-fixed-timesteps/[/url] Iv since come to the conclusion it must be some kind of driver issue or something. Basically i get very erratic movement even in very simple code, simply drawing a box that moves from left to right using a fixed timestep with interpolation. It looks as if the box moved ahead of itself and then jumps back. If i turn off Desktop Composition i get very smooth movement. I have tried the windowing setups in OpenTK as well as SFML.net and the same issue presents itself. Is there any know issues with Desktop Composition/NVIDIA/OpenGL that might be causing this? I have tried the same code on an ATI card and had no problems. Sadly the NVIDIA forums are down or i would try there as well. Specs Win7 x64 NVIDIA 650 Ti and another PC with a little olderNVIDIA card with the same issue
  6. Jumpy movement with fixed timesteps

    [quote name='krippy2k8' timestamp='1345093146' post='4970061'] Yes, I'm using Win7. I'm still only seeing it jump rarely - maybe once every 10-20 seconds, but when I do it always seems to correspond to a timing issue. i.e. on my system with a 60hz refresh rate, I'm seeing a typical frame time of ~0.0167 seconds. Whenever a jump occurs I'm seeing a frame time of something like 0.04 followed by a couple of short frames like 0.006 or 0.004. So if what I'm seeing is the same as what you're seeing, then the issue is probably not your code. It's probably SwapBuffers blocking for more than one refresh and then compensating, which would explain why it's not happening when you turn off vsync. [b]Update[/b]: checking the timer before and after the call to RenderWindow.SwapBuffers indicates that this is indeed where the lag is occurring. [/quote] Well i see a terrible amount of jump, not what you describe. Oddly enough it disappears when i disable desktop composition i get something perhaps similar to what you say, smooth with perhaps a small skip every now and then, but i would say that is to be expected? So the question almost points to some driver/OpenGL issue i think, i might take this into the OpenGL forum if that is the case. I tried it on another PC, something not to fast with an ATI card and it seems fine. Sadly this seems related to an issue i had even when using SlimDX, something about Win7, vsync, and dual monitors is causing funky issues. [quote] Update: checking the timer before and after the call to RenderWindow.SwapBuffers indicates that this is indeed where the lag is occurring. [/quote] Swapbuffers is supposed to block with vsync, spo unless it is an inordinate amount of time i would say this is expected.
  7. Jumpy movement with fixed timesteps

    [quote name='krippy2k8' timestamp='1345007975' post='4969738'] I see a very rare jump on my system. What I'm seeing actually seems more like a timing spike to me. Some things to try: 1) Try it in full screen mode if you haven't already. 2) Add something that displays a visual or audio indicator if while (accumulator >= dt) loops more than once in a frame, and see if it corresponds to any jumps. 3) Log the timestamps, translations and interpolations on each frame. You can just accumulate them in a memory buffer and then write it out when the game exits to avoid any lag for writing log entries to disk buffer for every frame. Then you can analyze the data to see if there are any anomalies like translating farther than the norm on any frames, or a translation that is behind the previous translation. If still no joy then try to create the most minimal reproduction that you can to demonstrate the issue without disclosing any proprietary IP and post the complete source code. [/quote] Attached a very minimal amount of code to achieve the same issue, This red box moves very jumpy on my computer. I am logging a number of things to a file, but no numbers look out of place to me.
  8. Jumpy movement with fixed timesteps

    [quote name='krippy2k8' timestamp='1345007975' post='4969738'] I see a very rare jump on my system. What I'm seeing actually seems more like a timing spike to me. Some things to try: 1) Try it in full screen mode if you haven't already. 2) Add something that displays a visual or audio indicator if while (accumulator >= dt) loops more than once in a frame, and see if it corresponds to any jumps. 3) Log the timestamps, translations and interpolations on each frame. You can just accumulate them in a memory buffer and then write it out when the game exits to avoid any lag for writing log entries to disk buffer for every frame. Then you can analyze the data to see if there are any anomalies like translating farther than the norm on any frames, or a translation that is behind the previous translation. If still no joy then try to create the most minimal reproduction that you can to demonstrate the issue without disclosing any proprietary IP and post the complete source code. [/quote] hmm, i see somethign fairly regular and apparent. Ill build a very basic program and see what happens. Iv tried it in fullscreen, if you change the settings file you can too [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]. I have checked for multiple update loops and sometimes it will happen once at startup, it does not happen after that from what i can tell. The logging i have done seemed ok, but ill try something more formal. Are you running win7?
  9. Jumpy movement with fixed timesteps

    Iv attached a compiled version of the file, just a testing thing we made. If you check the gameplay testing part, it shows a moving box, this does not use physics, just translating the transform. The physics test uses WASD to pilot a ship, both tests should demonstrate my problem. Perhaps this will help diagnose. You need .net to run it.
  10. Jumpy movement with fixed timesteps

    [quote name='krippy2k8' timestamp='1344982921' post='4969617'] [quote name='JWBaker' timestamp='1344980241' post='4969604'] Just tested this, i set my timer interval to 0.5 and only rendered at _prevPosition, it looked correct, obviously it jumped far when it moved, but it was not jittery or jumping back and forth. When i start interpolating again it get jittery, so it must be the interpolation. [/quote] That doesn't necessarily mean it's the interpolation, doing such large jumps could just be hiding the symptom. How exactly are you calculating _prevTranslation and _nextTranslation? Are you directly copying _nextTranslation to _prevTranslation in your update function? [/quote] The positions are being updated by Farseer Physics. Yes i directly copy [CODE] public override void Update(float deltaTime) { _prevTranslation = _nextTranslation; _prevRotation = _nextRotation; _prevScale = _nextScale; base.Update(deltaTime); } [/CODE]
  11. Jumpy movement with fixed timesteps

    The issues seems to go away when i turn of vsync, I wouldn't think though, if interpolation was the problem that it would atter.
  12. Jumpy movement with fixed timesteps

    [quote name='alvaro' timestamp='1344952371' post='4969458'] I would try setting the fixed interval to something like 5 seconds, so you can actually see how exactly the jumps are happening. It could be that the interpolation is doing nothing, or that you are using alpha instead of (1-alpha), but it will be much easier to see this in slow motion. [/quote] Just tested this, i set my timer interval to 0.5 and only rendered at _prevPosition, it looked correct, obviously it jumped far when it moved, but it was not jittery or jumping back and forth. When i start interpolating again it get jittery, so it must be the interpolation.
  13. [url="http://gafferongames.com/game-physics/fix-your-timestep/"]http://gafferongames.com/game-physics/fix-your-timestep/[/url] Read this until your understand it.
  14. Jumpy movement with fixed timesteps

    [quote name='krippy2k8' timestamp='1344923363' post='4969317'] I don't see anything that looks too suspect there. What happens if you don't interpolate and just render at _prevTranslation each frame? [/quote] This also seems to jump, if i remember, don;t have the code to try right now. But it seemed to show the same issue, while obviously being quite choppy with the low frame rate. I am using farseer physics to update positions, but i don't think that is the issue as i had this working perfectly in SLimDX, but when i moved to OpenTK, now my rendering is jumpy.
  15. Jumpy movement with fixed timesteps

    [quote name='l0calh05t' timestamp='1344934121' post='4969364'] [quote name='serumas' timestamp='1344931223' post='4969355'] [sup]i think you pass to render alpha. Why? I dont know what internalupdate do, but i think render must not to have calculations dependant on time, all calculations must be done before, and with one time delta (dt), owervise why to chop accumulation to dt if you use alpha ...[/sup] [sup]Must be: [/sup][sup]Update(dt); [/sup][sup]Render(); no alpha I think[/sup] [/quote] Interpolation between states is absolutely critical in a fixed simulation step method such as the OP posted, otherwise you will get significant jitter. Re the original topic: The line [quote][source lang="cpp"]float lerpRotation = _nextRotation * alpha + _prevRotation * (1.0f - alpha);[/source][/quote] Seems suspicious to me. What happens if prevRotation = 6.266 (359°) and next Rotation = 0 (0°)... the interpolation should result in 359.5°, but instead will result in 179.5° which is probably wrong, and will probably cause a jump in rotation [/quote] This is the Lerp function Gaffer shows to use, but rotation does not seem like it is an issue. The real jump is in the translation. Is there a better Lerp function to use? I am tempted to dump my project here, but its fairly large at this point.