I made a physics engine in C++!
Вставка
- Опубліковано 5 лют 2025
- My GPU physics engine: • How did I optimize my ... 😱
My Game Engine: • Pika Game engine
My Minecraft C++ Clone: • Adding my own sounds a...
Join my Discord for cool resources 🤯😎:
/ discord
Check out my Steam Game Midnight Arrow:
store.steampow...
Join this channel if you want to support me 😻:
/ @lowlevelgamedev9330
Source Code 🧑💻:
github.com/mee...
Music:
SoundMHz - Angry Birds "The Mighty League Anthem", Full Version [Darude - Sandstorm Remix]
• Angry Birds "The Might...
MDK - Jelly Castle
Angry Birds 1 theme song.
Evan King - HIGH ENERGY CHIPTUNE
Evan King - o o g a
Evan King - Invisible Walls
Evan King - Let's Go
!www.youtube.co...
Welcome to the world of physics simulations!
I know your pain.
Since I knew that solving rotations and stacks of objects would be an absolute pain, I decided to try and write a softbody simulation in my free time. It is slowly coming along. Currently working on constraints, quite more complicated than I expected.
It's impressive you've done so well with so little prior knowledge and experience. Keep going!
Wish you a lot of joy when it will finally works the way you want it to!
What solver are you using for softbody?
Your videos and editing are getting better and better
thank you bro 💪💪😌
I tried making a physics engine a little while ago. And it was absolutely AGONIZING! So much so that I gave up on it.
Really looking forward to how your project will come out; maybe it will give me some motivation to try again :)))
yeah it is hard ngl, try the respurces on my discord maybe they help 💪
@@lowlevelgamedev9330 Will do, thanks :D
I just started Building my first 2D Game Engine with C++ yesterday.
Thanks for showing that this is achievable!!!
My plan is to get good at C++ because I plan to create some games with Unreal Engine 5 in July 2025.
This is the best! I have been thinking about making my own 2D physics engine too last summer. :D
Go for it! definitely a mammoth challenge, but very rewarding and you learn a lot! I would suggest not implementing rotation until the end
Absolute madlad
had to do it 😎
There is a book in German, named 'Numerische Physik', which is devoted to solving numerical problems by Gnu Scientific Library. One example there is like throwing cube in the air with resistance forces. Actually physics sooner or later transforms into solving systems of differential equations. Thus you may give it a try. However it's HolyC hardcore AF, but the book and examples from GSL docs are awesome. Just pick one you like and rewrite completely according to your needs.
Numerically solving differential equations is only half the puzzle for a physics engine, and it's the easier half. The tricky part is numerically solving systems of equations for constraints
@@mariovelez578Totally agree. Pile of breakdancing corpses in fps games is really funny. They can not lay in peace. Just a few changes to physics may solve it.
angry birds and physics in the same sentence. i'm just like :D
Hi Sir.
Check out GJK and EPA algorithms.
The GJK algorithm is an amazing, and fast way to detect collisions between any 2 convex polygon.
Also with GJK you can implement specific colliders like sphere collider to fasten up the algorithm.
EPA is an algorithm to detect the depth and normal vector of the collisions between any 2 convex polygon, and the algorithm uses the GJK output as an input.
I agree. Although with 2D, there isn't much difference between GJK and using SAT if the only colliders are polygons and spheres. In 3D GJK is pretty much necessary
Your videos are awesome honestly, really motivating too.
thanks bro 💪
My game only needs AABB/Circle collision, separation, broadphase, and velocity/acceleration, because it's all about world scalability. Not sure why I can't find a single existing library that covers that. Complex physics engines that can only handle 10,000 objects aren't going to cut it.
hm I mean you can implement that yourself it isn't that much 💪
I made a complex 2D physics engine that can handle 15,000 on one core, so it is possible.
try a GPU implementation. A hash grid or dynamic BVH could speed up the collision detection. I know bepu physics can handle a lot of collisions
Use ray casting for 2D collision detection and bouncing, it'll make it more accurate and you will get rid of the sinking issue. You can use the Runge-Kutta 4 integration method wich is a very accurate one. Also, you are not correctly modeling friction (or at least that's how I see it from your video). Dynamic friction is a force independent from velocity, but directly proportional to the normal force. Hope this helps!
Edit: also implement static friction 7:36.
0:14 Easter Balls 😂😂😂
yess 😌
Didn't expect that greenscreen not gonna lie
never in ever i could even get close, good work
Btw, you can improve your collision detection in the following way. Check each time if there is no collision on the next step using your integration. If yes, start some collision procedure, I mean instant velocity change of the collided bodies. Something similar was in quake3 hit detection.
okeey, no one is gonna talk about the background? 0:13
nah, nothing to see there 😌
very cool comrade!
Have you tried to add a minimal starting value? Like when you try to push a brick with your hand you can't push it with 0.5% of your strength you have to put in at least 5% to move it.
sometimes , reinventing the wheel is beneficial for your mental health because only then u can blame your self and not another 3rd party :D
Love the greenscreen
Very interesting video!
4:59 using _ as iterator is felony ☠️
@5:43 those are actually the same formula.
Good topic m8
Angry Birds + Amogus????
Funnily enough, I actually made exactly this except it's in Python and I used a physics library instead of making it from scratch.
bro living my dreams.. good work
👏👏👏👏
Dude on your Minecraft clone can you add some ray tracing like stuff......😅😅
I like the video style, but I think the ratio of information and jokes could be adjusted in the direction of information.
agreed, I'm trying things out rn, thanks for the feedback 💪
man is jacked
You shouldn't hide information behind a Discord server. That sounds really dumb. The description exists for a reason. Discord isn't the Wiki.
Can you go into a more detail about this stuff??
how does hot reload work? do u recompile the changed file and inject as shared library or how does that work?
I compile the game logic in a dll and the engine reloads it, the engine also needs to mamage the memory so that means custom allocator and using only thsmst one very careully
Is there any good physics library for opengl
Physics is completely separate from graphics. If you want, you can use OpenGL compute shaders to make a GPU implementation. The closest thing I know is NVIDIA's PhysX engine, which uses CUDA cores, so a compatible NVIDIA graphics card is necessary
❤❤🎉
HELP! I added balls to my physics engine, but when I spawn too many of them, they start vibrating. Also my balls gain energy with every bounce and I changed the numerical integrator a couple of times to a better one.
Please help 😭😭
you might transform into the new jdh
that would be cool ngl
hows minecraft clone going
PHYSICS
what didn't you make in c++
good question, I wrote an emulator in c once 😂😌
Can RTX 2050 run Pika?
yes I made it on my old laptop that had a 1050 😂
Isnt physics just checking if normals are colliding?
Isn't graphics programming just making pixels different colors?
@liambelh9556 thats what im saying dude its just... Things
Isn't programming just writing text with a weird syntax?
isn't thinking about physics just atoms interacting with eachother to understand other atoms ?
i mean, you're right, but don't say that to engine developers please
Are you working in a game Industry?🤔
why you angry bird
😂
why
because I always wanted to know how they work
@@lowlevelgamedev9330 i dont even remember comment that lmaoooo but fair enough
chatgpt wont help
is it just me or his lips and voice don't sync
Bro pls quit adding flash effect. It's torture to watch it like that.
thanks for the feedback, I tuned them down for the next video
@@lowlevelgamedev9330 Keep up to good work btw. Your knowledge and wise advices give me inspiration.