Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 61

Thread: Multiplexity: MechaChess

  1. #21

    Multiplexity: MechaChess

    What do you mean, "bewtween 0 and 1"?

  2. #22

    Multiplexity: MechaChess

    0..1 means the multiplicator of time since last frame, where 1 is one second and 0.5 is half a second, 0.25 is a quarter of a second etc....
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  3. #23

    Multiplexity: MechaChess

    That doesn't work at all.

    Code:
    NewtonUpdate&#40;NewtonWorld, &#40;1/100&#41;*&#40;deltatime/1000&#41;&#41;;
    I think that is what you were thinking of, right?

    Well, that's way too slow. My objects are hanging in the air, as they should not.

  4. #24

    Multiplexity: MechaChess

    deltatime / 1000?

    What happens if you use just deltatime?
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  5. #25

    Multiplexity: MechaChess

    Deltatime is in milliseconds.

    Anyway, I tried it out. They fall faster, but still not fast enough in fullscreen mode. Which means, there is still a speed difference between low FPS and high FPS.

  6. #26

    Multiplexity: MechaChess

    If you want to free your physics calculation from rendering use accumulative time stepping, as it's the way to go for doing fps-independent physics. Do a search on the Newton forums, there is a thread about this topic which includes all necessary information.

    I'm using that method too in my newer newton demos like the NewtonPlayGround and my physics calculation run always at the same speed no matter at what FPS the application runs at.

  7. #27

    Multiplexity: MechaChess

    Just seconds before you wrote your post, I stumbled upon this: http://walaber.com/newton_wiki/index...ewtonUpdate%3F

    I now do it like this:
    Code:
      inc&#40;FTimeSlices, DeltaTime&#41;;
    
      while FTimeSlices>16 do
      begin
        NewtonUpdate&#40;FNewtonWorld, 16/1000&#41;;
        dec&#40;FTimeSlices, 16&#41;;
      end;
    Works fine. Thank you two.

  8. #28

    Multiplexity: MechaChess

    (Posting here, cause 3_of_8 isn't online on ICQ, and people might want to know in general)

    If you've got your framerate stuck at 50/60/85 fps, watch out for VSync! the graphics card will then sync the render loop with the screen's frequency.

  9. #29

    Multiplexity: MechaChess

    Quote Originally Posted by 3_of_8
    Code:
      inc&#40;FTimeSlices, DeltaTime&#41;;
    
      while FTimeSlices>16 do
      begin
        NewtonUpdate&#40;FNewtonWorld, 16/1000&#41;;
        dec&#40;FTimeSlices, 16&#41;;
      end;
    What happens if its not the video card which is the reason for low FPS but the processor, because your AI, pathfinding, physics etc are too complicated to achieve good results on slow CPU's?

    In my opinion, your code would let the game stall very soon, because you "punish" the CPU for being slow by giving it more physics to do

    So every cycle the CPU would call NewtonUpdate more often, which results in higher Deltatime, resulting in more NewtonUpdate-calls... is this the way to go? I don't know... just my thought... or am I wrong?
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  10. #30

    Multiplexity: MechaChess

    I know what you mean.

    I have no idea if this is right or not.

Page 3 of 7 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •