TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rapier is a set of 2D and 3D physics engines written in Rust

341 点作者 excsn大约 1 年前

23 条评论

evrimoztamur大约 1 年前
I built a game using Rapier! Using its deterministic mode, I built an online multiplayer game whereby players take turn slamming bugs against the other team and capture the hill.<p>It doesn&#x27;t have a single-player mode yet (writing an AI for it is a bit more challenging than the chess-like I made) but check it out at <a href="https:&#x2F;&#x2F;evrimzone.itch.io&#x2F;crittershowdown" rel="nofollow">https:&#x2F;&#x2F;evrimzone.itch.io&#x2F;crittershowdown</a> and the physics&#x2F;game logic source code at <a href="https:&#x2F;&#x2F;github.com&#x2F;evrimoztamur&#x2F;crittershowdown&#x2F;blob&#x2F;e4d9a1928146197f271b526a38bf8224a9dbf1c3&#x2F;shared&#x2F;src&#x2F;logic&#x2F;game.rs#L146">https:&#x2F;&#x2F;github.com&#x2F;evrimoztamur&#x2F;crittershowdown&#x2F;blob&#x2F;e4d9a19...</a>.<p>I plan to write a post about how I wired it together and what I learned, but overall very solid library and well-thought of Rust-y API that enabled me to do everything I needed it to.
评论 #39521102 未加载
评论 #39537763 未加载
评论 #39523339 未加载
infogulch大约 1 年前
I got sucked down a Geometric Algebra rabbit hole a few months ago, which seems like a remarkably concise and intuitive way to work in a very wide variety of geometries, including 2D, 3D, 4D+, non-euclidean etc. I&#x27;ve wondered if GA would make a good foundation for a physics engine...<p>There are a few small rust libraries that look interesting [1][2], but none with a lot of traction.<p>Has anyone looked into this?<p>[1]: <a href="https:&#x2F;&#x2F;crates.io&#x2F;keywords&#x2F;geometric-algebra" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;keywords&#x2F;geometric-algebra</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;geometric_algebra">https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;geometric_algebra</a><p>If you dare, a good place to jump in might be Freya Holmér&#x27;s Why can&#x27;t you multiply vectors? - <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=htYh-Tq7ZBI" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=htYh-Tq7ZBI</a> - Then <a href="https:&#x2F;&#x2F;bivector.net&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;bivector.net&#x2F;index.html</a>
评论 #39520898 未加载
评论 #39522615 未加载
评论 #39527307 未加载
评论 #39523663 未加载
评论 #39521719 未加载
评论 #39526898 未加载
GenericCanadian大约 1 年前
I wrote a guide on the Bevy plugin for Rust which you can read here: <a href="https:&#x2F;&#x2F;taintedcoders.com&#x2F;bevy&#x2F;rapier&#x2F;" rel="nofollow">https:&#x2F;&#x2F;taintedcoders.com&#x2F;bevy&#x2F;rapier&#x2F;</a><p>An interesting alternative in the Bevy space is Bevy XPBD which I also wrote about: <a href="https:&#x2F;&#x2F;taintedcoders.com&#x2F;bevy&#x2F;xpbd&#x2F;" rel="nofollow">https:&#x2F;&#x2F;taintedcoders.com&#x2F;bevy&#x2F;xpbd&#x2F;</a>
评论 #39526815 未加载
评论 #39521012 未加载
评论 #39520795 未加载
porphyra大约 1 年前
Dimforge is really doing god&#x27;s work. I would be so excited if nalgebra + Rust can replace Eigen + C++ for robotics stuff like localization and mapping.
评论 #39520370 未加载
评论 #39521161 未加载
评论 #39533522 未加载
rollulus大约 1 年前
From building a rigid body physics engine decades ago I remember that stacking was a very hard problem. The best solution at the time to avoid objects sinking into the ground was to create a directed acyclic graph, starting with the ground and pushing bodies outward. It required multiple iterations to converge and felt very hacky. Does anyone know if this problem has been solved nowadays? I couldn’t find any mention of stacking in this project.
评论 #39522931 未加载
评论 #39524849 未加载
mtoner23大约 1 年前
Rust keeps proving the stereotype true lol. 50 game engines written in rust but only 5 games made in rust.
评论 #39525416 未加载
评论 #39526931 未加载
iercan大约 1 年前
I tried to build a small web demo with Rapier too <a href="https:&#x2F;&#x2F;github.com&#x2F;iErcann&#x2F;NotRoblox">https:&#x2F;&#x2F;github.com&#x2F;iErcann&#x2F;NotRoblox</a> (no rust)<p>What I like : - Good documentation compared to AmmoJS (you need to read pybullet)<p>- Recent<p>- You can run it server side (Node) &amp; client side (Browser), here I&#x27;m running it server side but it&#x27;s possible to do both and implement client side prediction + reconciliation<p>- Small bundle (AmmoJS was like 2 MB?)
评论 #39525376 未加载
calebpeterson大约 1 年前
Really good JS interoperability too: <a href="https:&#x2F;&#x2F;www.rapier.rs&#x2F;docs&#x2F;user_guides&#x2F;javascript&#x2F;getting_started_js" rel="nofollow">https:&#x2F;&#x2F;www.rapier.rs&#x2F;docs&#x2F;user_guides&#x2F;javascript&#x2F;getting_st...</a>
评论 #39520248 未加载
sillysaurusx大约 1 年前
I’ll never be able to read &quot;rapier&quot; and not think of <a href="https:&#x2F;&#x2F;youtu.be&#x2F;K_rZ27Jdc00?si=rqibtrXl-Wpa49gr" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;K_rZ27Jdc00?si=rqibtrXl-Wpa49gr</a>
LoganDark大约 1 年前
These guys (Dimforge) used to have a physics engine called nphysics that supported soft bodies and multibodies. It&#x27;s now been deprecated in favor of Rapier, which doesn&#x27;t support those or half the other things that nphysics did. As a result, nphysics is so old that it can&#x27;t be used with the modern ecosystem, but Rapier is so new that it&#x27;s far less capable.<p>This has happened before as well, they used to have a fluid simulation library called Salva that supported two-way coupling with nphysics, and ran on all GPUs&#x2F;CPUs, but that&#x27;s deprecated in favor of Sparkl which doesn&#x27;t, and also only supports CUDA. As a result, Salva is about as old as nphysics, but Sparkl is so new that it&#x27;s also far less capable, <i>and</i> it also has no cross-platform support. Seemingly intentionally! (Rewrite to make this code less cross-platform.)<p>Hopefully one day the constant rewrites will stop and they&#x27;ll settle on something that actually supports everything it should. Until then though, I don&#x27;t see the dimforge ecosystem working out for me if they keep losing features each rewrite. After all, how do I know that Rapier isn&#x27;t going to get deprecated in favor of something even newer that doesn&#x27;t support half the features Rapier does?<p>Sure, give them a break. It&#x27;s new! It doesn&#x27;t support all the features that the more mature nphysics does. And that&#x27;s exactly why the more mature nphysics is completely deprecated and unmaintained in favor of... oh, wait.<p>These would be unrealistic concerns only if dimforge didn&#x27;t already have a track record. :(<p>I get that one day Rapier might be up to feature parity with what nphysics already had five years ago, but that&#x27;s a completely arbitrary five-year setback for developers who want to build on these features that are currently missing.
sebular大约 1 年前
I made a simple web game using Rapier that takes advantage of the deterministic physics to prevent cheating by running physics and computing win&#x2F;loss states on the server (though I stupidly haven’t implemented the high score board yet).<p>It’s an homage to the old Taito electric arcade game “Ice Cold Beer”<p><a href="https:&#x2F;&#x2F;beerbubble.xyz" rel="nofollow">https:&#x2F;&#x2F;beerbubble.xyz</a>
bambax大约 1 年前
On the same topic I really like Matthias Müller&#x27;s lectures and simple and readable JS code &quot;Ten Minute Physics&quot;<p><a href="https:&#x2F;&#x2F;matthias-research.github.io&#x2F;pages&#x2F;tenMinutePhysics&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;matthias-research.github.io&#x2F;pages&#x2F;tenMinutePhysics&#x2F;i...</a>
amne大约 1 年前
What is the main feature? I hope it&#x27;s not &quot;Rust&quot;.
评论 #39525387 未加载
评论 #39524231 未加载
评论 #39522515 未加载
alex_suzuki大约 1 年前
Anyone know how this compares to something like Box2D? (apart from also supporting 3D)
评论 #39520512 未加载
catapart大约 1 年前
Oh awesome! I was just putting together some utilities for a barebones, no-bundler, vanilla javascript game library, and was wondering what kind of physics engine would work for demonstrating it. This looks perfect! I love that you already have the compatibility libraries available.<p>Actually, now that I take a look at the webpage, I really love everything this company is doing. Very interested in working with these libraries!
anasrin大约 1 年前
Using rapier along side three js, overall I really like it. But lack of documentation on wasm make me jump back and forth on rust version
coolvision大约 1 年前
I tried to make a robot simulator with rapier, with a mixed sucess: <a href="https:&#x2F;&#x2F;grgv.xyz&#x2F;blog&#x2F;simulator4&#x2F;" rel="nofollow">https:&#x2F;&#x2F;grgv.xyz&#x2F;blog&#x2F;simulator4&#x2F;</a> The performance is great but realism of joints and motors is lacking, and not suitable realistic simulation.
ixxie大约 1 年前
If you are into Svelte we have a nice API for you: <a href="https:&#x2F;&#x2F;threlte.xyz&#x2F;docs&#x2F;reference&#x2F;rapier&#x2F;getting-started" rel="nofollow">https:&#x2F;&#x2F;threlte.xyz&#x2F;docs&#x2F;reference&#x2F;rapier&#x2F;getting-started</a>
xpe大约 1 年前
Related to 3D but different from physics engines: for those interested in BREP (boundary representation) CAD kernels, you might be interested in the open source Rust project called Fornjot.
评论 #39527984 未加载
hnben大约 1 年前
How good is it suited for neuro evolution? i.e.:<p>* Can it do multiple concurrent headless simulations on GPU?<p>* Can it handle many Mobs&#x2F;NPCs interacting with each other? (1.000? 1.000.000?)<p>* Is there a limit on the frame rate?
评论 #39524257 未加载
prashp大约 1 年前
The demos don&#x27;t work on Firefox 123.0 for me
WanderPanda大约 1 年前
How does it compare to MuJoCo?
shdh大约 1 年前
How does it compare to Jolt?