Making a Physics Engine - Devlog[0]

LuaBubble Physics Engine

The 2D Physics Engine for Roblox - Devlog Index 0

Hey everyone, its me again.

Since the past few days, I have been developing a physics engine for guis. Somewhat similar to Unity’s 2 dimensional physics engine. I have been brainstorming and researching a lot, and have ended up with something cool. The basic physical collisions are done! The first devlog is pretty eye opening for me, since what I achieved today is a stepping stone for a full fledged physics engine.

Firstly, I’d like to thank everyone who follow my posts and like my work, I truly appreciate each and everyone of you.


I achieved smooth physics collisions!


And yes, those are all Gui frames. Nothing else. The collision detection part was very easy, the tricky part was finding the velocities of both circles after collisions. And for that, I used trigonometry! Found a few research papers and came with a conclusion.

I also plan to make this physics engine, COMPLETELY open sourced in #resources:community-resources. I hope you enjoyed reading this short devlog. More soon. Thanks!

Feedback, suggestions and questions are high appreciated. Feel free to share them!

(Also the lag in the video isn’t the game, its my pc being slow because of recording :grin:)

6 Likes

Also, in the video you might have noticed, the physics engine is in the form of a game. I plan to make a library + a game. The library will be the usable version of the engine, which you can use in your 2D games and the game will be an uncopylocked place for showcasing :+1:

Also, any of you got a good name for the engine? LuaBubble is the first thing that came to my head :joy:

1 Like

LuaU 2D Physics (Filling the limit)

2 Likes

LuaU2D would be my idea for a name,also i saw that the circle have a tiny collision problem in the video where sometimes the circle clips tiny bit into the other one but otherwise the its cool also i have an idea where you can have attributes called CanCollide in the gui where the gui collides based on that attribute

1 Like

Cool name. Yeah, they do clip a bit. I’ll fix that.

Yes, of-course, I’ll be created collidable and non collidable objects!

1 Like

also a can you give me the link for you physic engine?

1 Like

Here! Hold the left mouse button to spawn the circles.

1 Like

wow i tested it out and it works great i spawned alot of circles and it still works great even when i have a very crappy potato pc lol

good luck in completing this im looking forward to use it when you open-source it

2 Likes

I remember trying to make one and giving up as soon as I tried to make GUI collisions. The furthest I got was the gravity.

This is a m a z i n g.

1 Like