[WIP!] Let's build a physics engine

As of now, none of the blocks have functionality, so it is not a usable physics engine yet, rather one in development.

I know that there are other physics engines and collaborations of such and that I should coalesce makes into an existing one rather than start entirely new works from scratch. But at the end of the day, the other physics engines I know are just forgotten. I felt like starting a new one - this, and I promise I will not forget about it. Additionally, my other collaboration, a UI engine, was paused until Snap! 12.

As with my UI engine, the goal of this collaboration is to hopefully be a physics engine that is full-fledged and others can enjoy using it for free!

Blocks (WIP)
Todo

Add functionality to blocks

Log

2026-03-24T00:00:00Z: Collaboration published.
2026-05-03T00:00:00Z: Revival!

Feel free to spit out your thoughts or suggestions!

Sounds cool! I will for now work on a few setter blocks ;)

Have them set sprite-local variables to sprites, and how they affect physics will be all calculated in the step blocks.

When you are done, just drop the link of your copy of the project!

I would absolutely love to join! Just lmk what to do and make and I’ll try to get on that.

BTW, I want to add a flag which makes it so that all sprites can automatically step in the physics engine (using a Turtle sprite stepping the rest of the sprites). May I?

You can either give me recommendations for features in this physics engine, or if you know realistic physics, you can have a crack at it.

Maybe. Just tell me how this will work.

Is the gravity system global or sprite wide?

I am rather young, but I have a very great understanding of basic physics. I’ll try to help in any way I can

Supposed to be global, but I think we can implement sprite-local gravity.

I am reviving... or should I say... revving up this physics engine.

After a month or two, I finally got around to adding functionality to some blocks. However, the physics still does not have the basics working.

Finally got the velocities and angular velocities working.

I know it has been some time since the last post but I figured out how to add gravity and some turning physics (not that advanced)

Feel free to share to us how :). All contributions are welcome.

Okay so the collision is not ready but the wind system works :)

wind 
script variables ((turning))
set [turning V] to (pick random (5) to (10))
if <touching [edge V]?> {
stop [all V]
} else {
turn (turning) degrees
change x by (turning)

I’m still working on the collision.
maybe better

I forgot to mention that I am aiming for a realistic physics engine over a cartoony one (sorry!).

First, it looks like you accidentally made the sprite move towards the top-right based on how fast it turns. How fast a sprite moves laterally, how fast it moves vertically, and how fast it spins should be all independent.

Second, I don't think objects snap to their upright orientation when it touches walls. If you throw a cone (whatever it is, could be a party hat) at the floor, the walls, or the ceiling, either way, it wouldn't just magically point up in an instant, right?

At least you tried to contribute, which I still appreciate! Just try and build on your code to see if you can inch closer to a realistic one.