Earlier quoted context omitted.
That is only true if you write your own physics. Otherwise, your physics framerate should be fixed, usually at 30FPS. Many physics engines don't support variable timestep, and in the ones that do, it can lead to instability and general weirdness.
Weird statement. All games and game engines I've worked with have used frame deltas to modulate everything from animation and movement to AI and UI's. I've worked on mobile games to AAA games. Can you link to a physics engine that doesn't support variable timestep?
Interactive 3D ASCII scenes
51–60 of 62 posts
Re: Interactive 3D ASCII scenes
#52Love it! Just a note, it is not actually 3D, it is an isometric representation of a 2d scene, as same as Monument Valley. Game devs call it 2.5D :)
Why doesn't it count as 3D? I seem to be able to move the character in 3 dimensions. Some parts of the floor are higher than others. What else does 3D mean? Could you represent this map using just two components for each point? I don't see how.
To distinguish them from “true 3D” libraries, a name had to be found. 2.5D seemed fitting.
Re: Interactive 3D ASCII scenes
#53Re: Interactive 3D ASCII scenes
#54Earlier quoted context omitted.
That is only true if you write your own physics. Otherwise, your physics framerate should be fixed, usually at 30FPS. Many physics engines don't support variable timestep, and in the ones that do, it can lead to instability and general weirdness.
Weird statement. All games and game engines I've worked with have used frame deltas to modulate everything from animation and movement to AI and UI's. I've worked on mobile games to AAA games. Can you link to a physics engine that doesn't support variable timestep?
Box2D User Manual > We also don't like the time step to change much. A variable time step produces variable results, which makes it difficult to debug. So don't tie the time step to your frame rate (unless you really, really have to).
https://stackoverflow.com/a/21273467 (Bullet) > maxSubSteps: Should generally stay at one so Bullet interpolates current values on its own. A value of zero implies a variable tick rate, meaning Bullet advances the simulation exactly timeStep seconds instead of interpolating. This feature is buggy and not recommended.
Edit: The archived version of the (404-ing) Bullet Wiki also says "Bullet maintains an internal clock, in order to keep the actual length of ticks constant. This is pivotally important for framerate independence. The third parameter is the size of that internal step."
Re: Interactive 3D ASCII scenes
#55Earlier quoted context omitted.
Bullet, Box2D and PhysX all highly recommend using a fixed timestep, and no, you should definitely be using requestAnimationFrame with a fixed timestep, just like in the fix-your-timestep article. The number of frames to advance the simulation by is still determined by the screen's refresh rate, after all.
That really depends. Pegging your fixed timestep engine to rAF could have the consequence of dropping frames when you have a large gap between two frames and enough physics frames get called at once that the next rAF window gets missed. If your performance is bounded by the physics simulation, you could potentially trigger a spiral of death and never catch up. Of course there are ways to mitigate this, but that just…
Re: Interactive 3D ASCII scenes
#56Love it! Just a note, it is not actually 3D, it is an isometric representation of a 2d scene, as same as Monument Valley. Game devs call it 2.5D :)
Why doesn't it count as 3D? I seem to be able to move the character in 3 dimensions. Some parts of the floor are higher than others. What else does 3D mean? Could you represent this map using just two components for each point? I don't see how.
Re: Interactive 3D ASCII scenes
#57Since the movement speed is tied to requestAnimationFrame, the speed of the game changes with the update frequency of the user's monitor. Since all my monitors are at 144Hz this game is ridiculously fast for me.
> Since the movement speed is tied to requestAnimationFrame, the speed of the game changes with the update frequency of the user's monitor. Since all my monitors are at 144Hz this game is ridiculously fast for me. Damn. I just checked this and you're right: https://developer.mozilla.org/en-US/docs/Web/API/window/requ... . Learned something there so thanks for pointing this out. I'd always believed that callbacks were…
Re: Interactive 3D ASCII scenes
#58Earlier quoted context omitted.
> Since the movement speed is tied to requestAnimationFrame, the speed of the game changes with the update frequency of the user's monitor. Since all my monitors are at 144Hz this game is ridiculously fast for me. Damn. I just checked this and you're right: https://developer.mozilla.org/en-US/docs/Web/API/window/requ... . Learned something there so thanks for pointing this out. I'd always believed that callbacks were…
I was surprised to learn that many commercial HDR 4K TVs have a 50Hz real refresh rate. Sub 60Hz screens are bountiful and common.
Re: Interactive 3D ASCII scenes
#59Woke up this morning feeling quite crappy. Then saw this. All faith in humanity (And the internet) has been restored. Thank you! [On a sidenote: How would one go about learning to build this? Any learning resources on understanding all the math and physics behind this?]
For the physics, I'm basically colliding against a grid of tiles, so this might be a helpful tutorial to do the same: https://jonathanwhiting.com/tutorial/collision/
Re: Interactive 3D ASCII scenes
#60Woke up this morning feeling quite crappy. Then saw this. All faith in humanity (And the internet) has been restored. Thank you! [On a sidenote: How would one go about learning to build this? Any learning resources on understanding all the math and physics behind this?]
This was built through incremental edits from a Python proof-of-concept, which you can see here: https://github.com/yeahpython/ascii-renderer/blob/master/fun... It doesn't have any real physics, but reading through it might help reveal how the rendering works. For the physics, I'm basically colliding against a grid of tiles, so this might be a helpful tutorial to do the same: https://jonathanwhiting.com/tutorial/coll…