VoltAir VS liquidfun-play-2

Compare VoltAir vs liquidfun-play-2 and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
VoltAir liquidfun-play-2
1 1
318 28
- -
0.0 0.0
over 7 years ago almost 2 years ago
C++ TypeScript
Apache License 2.0 -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

VoltAir

Posts with mentions or reviews of VoltAir. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-07-29.

liquidfun-play-2

Posts with mentions or reviews of liquidfun-play-2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-07-29.
  • Show HN: WASM and WebGL Fluid Simulation
    11 projects | news.ycombinator.com | 29 Jul 2021
    yeah, I've played around with a few approaches for running the timestep and for some reason I don't feel like I get the same results as liquidfun.js.

    their loop [0] is pretty simple; it's scheduled by `requestAnimationFrame`, advances time by 1/60th of a second, and runs their default of 3 particle iterations. it completes the physics simulation within 3.9–5.5ms, which is easily in time for the 16ms deadline. the rendering is WebGL, which I assume fits easily into that 16ms budget too.

    my loop [1] is more complicated; I don't hardcode the timestep to 1/60 seconds, because requestAnimationFrame may be scheduled less frequently than that. so instead I advance time by the time elasped since I was last scheduled. hm, I think there's a mistake there — `lastMs = nowMs` is probably on the wrong side of the physics calculation.

    there's an additional technique I use: I put a `Math.min()` over the simulation interval, so that I don't attempt to simulate more than 20ms (this can happen if you get scheduled infrequently due to hot CPU or backgrounding the app) — simulating too much time will make us fail our frame deadline anyway.

    furthermore, if we are calculating more than 1/60th of a second, I employ more particle iterations (i.e. 3 particle iterations for every 1/60th of a second that passes). this gave me good results, but turns out it is based on incorrect assumptions (iterations are unrelated to timestep)[3]. moreover, I may be making mistakes in my decision of whether to round this fraction up/down.

    if too few particle iterations for a timestep: the particles will bounce. if too many: the particles will look too incompressible[4]. I think that's the "solid-like" structure you're describing.

    the main reason I complicated this is because the last one I did[5] made me feel motion-sick. I think if "every 1/60th, or 1/30th, or 1/20th of a second: you simulate a 1/60th of a second of time": the result (if you're not scheduled consistently) is that the world speed keeps changing. I think liquidfun.js's approach should be vulnerable to this, but for some reason it looks fine to me. maybe they get scheduled more consistently than me (even though by my measurements, my physics runs slightly faster, so should be able to achieve similar results).

    I think I need to remind myself of what happens if I program the timestep in the simple way that liquidfun.js did. will try that out at some point.

    [0] https://github.com/google/liquidfun/blob/master/liquidfun/Bo...

    [1] https://github.com/Birch-san/liquidfun-play-2/blob/master/sr...

    [2] https://github.com/Birch-san/liquidfun-play-2/blob/master/sr...

    [3] http://google.github.io/liquidfun/Programmers-Guide/html/md_...

    [4] http://google.github.io/liquidfun/Programmers-Guide/html/md_...

    [5] https://birchlabs.co.uk/box2d-wasm-liquidfun/

What are some alternatives?

When comparing VoltAir and liquidfun-play-2 you can also consider the following projects:

LiquidFun - 2D physics engine for games

box2d-wasm - Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.

Box2D - Box2D is a 2D physics engine for games

box2d.ts - Full blown Box2D Ecosystem for the web, written in TypeScript