free web page hit counter
🛡️
Copyright Notice: This video is officially sourced and embedded from YouTube. For all copyright inquiries, reports, or removals, please contact YouTube's legal team here.
Zanzlanz

Zanzlanz

76,800 subscribers

👁 496,575 views

Coding a Physics Engine from scratch!

Video Overview & Insights

but man, rigid bodies got hands

Here's the obstacle course, playable in your browser (please use Chrome - Firefox is rather choppy): https://zanzlanz.com/g/Skater_Without_a_Crown
Is sub-30 seconds possible? I'm serious, I think it is! I'll repost whoever sends me the WR video on Bluesky after 1 week :D Good luck! Edit: https://bsky.app/profile/zanzlanz.com/post/3m5rhmo5rrc26

If you like what you see, become a Patron! It includes the Haxe source code for "Skater Without a Crown", music from this video, and much more: https://patreon.com/zanzlanz

— @zanzlanz

Really into it? Want the Haxe source code? Join my Patreon! https://patreon.com/zanzlanz

Obstacle course:

Now do it with AVX512 acceleration!

— @zimmerderek

- Play in browser (Use Chrome, please): https://zanzlanz.com/g/Skater_Without_a_Crown

HUGE thanks to @crypticsea for inspiring this video! Please follow his development on YouTube and Bluesky: https://bsky.app/profile/crypticsea.bsky.social

Is it open source?

— @YazanAlkhozaei

My other work mentioned:

- "The PowerPoint video": https://www.youtube.com/watch?v=SmYDGnwg4dA

thought he was giving us a tutorial for making physics in scratch

— @forza_jkr

- Infinite Bounce: https://zanzlanz.com/g/Infinite_Bounce

- Differential growth: https://zanzlanz.com/doodles?q=%23differential-growth

psychopath coder

— @roxxartis

Games mentioned or shown:

- Skate or Don't!: https://store.steampowered.com/app/1828310/Skate_or_Dont/

853

— @ktgeofficial

- World of Goo 2: https://store.steampowered.com/app/3385670/World_of_Goo_2/

- Unravel: https://store.steampowered.com/app/1225560/Unravel/

what coding language is this?

— @Peteypocalypse

- The Floor is Jelly: https://store.steampowered.com/app/295750/The_Floor_is_Jelly/

- Line Rider: https://www.linerider.com/

Dot product: I'm tired boss😭

— @touchme3996

- Gish (By Cryptic Sea): https://store.steampowered.com/app/9500/Gish/

@anukarimusic is so cool!! I'm so sorry for mispronouncing it in the video AAAH

You kind of sound like Jim Parsons with a deeper voice, lol. (For anyone who doesn't know he voice acted Oh from Home and Sheldon in The Big Bang Theory.)

— @EntropyByte

All music is my own, many "Works In Progress" for this monthly series:

- At 0:00 and 7:53 - WIP made specifically for this video! Download available to patrons.

How to make the episode 7 without reaction diffusion?

— @darkfrei2

- At 1:06 - WIP made for https://youtu.be/aGFYa4TrcA8 Download available to patrons.

- At 2:13 - "Mirror Road": https://youtu.be/CJK30mzQ0-w

I love this video. it tells you how it works, not how to do it. you can just watch the video and do it yourself instead of copying lines of code.

— @urassari

- At 4:40 - WIP made for https://youtu.be/SmYDGnwg4dA Download available to patrons.

- Outro and at 5:39 - WIP made for this series! Starting with https://youtu.be/Z9xFWjdg2IY Download available to patrons.

why not just a = (a_old - 0.08) * 0.98

— @casixvii

- At 7:04 - "A Feeling of Tread": https://youtu.be/s-FCmczv9tA

- At 8:58 - WIP made for unrelated series: https://youtu.be/fnR7djDnkyo

video like this remind me how fucking stupid and useless i am. thanks.

— @lewie8136

- At 10:19 - Instrumental version of "Where Did the Time Go": https://www.newgrounds.com/audio/listen/1213016

Chapters:

I know absolutely nothing about coding but am currently learning. My initial reaction to seeing how difficult it is to not have convex shapes clip through other rigid bodies is baffled as to how simple it seems (because of my ignorance lol)

I’m my mind I’m like why can’t there be a kind of collision detection for the end of the segment? It seems like dot products are excellent but for that specific problem it might not be?

The only thing hitting my brain is wouldn’t it be possible to have or add a collision point at each corner somehow? And if the other shapes detect that convex point (with dot products) have it do what it’s supposed to? (Again I’m being reductive but trying to understand lol)

I still know absolutely nothing about coding but I love learning about this stuff. If someone could explain to me how it’s difficult af I’d love to hear about it!

— @jo3_the_artbot791

- 00:00 Intro

- 00:31 Level 1: Bouncing ball

why does he sound like kinger from tadc

— @stupidredguy87

- 02:12 Level 2: Angled walls

- 04:35 Level 3: Corners

You sound familiar...

do you know who doodley3d is?

— @I_Like_兀

- 05:37 Level 4: Colliding circles

- 07:01 Level 5: Ropes

Just adding more to this cross product, the value of one arrow don't need to be one , u can take two arrows take the angle between them and do ,a b cos(∅), u can imagine it as a shadow of 'a' on 'b'( assuming the sun is above b) and multiplying the length of the shadow with the length of b. U can do the same with a , both of them gives same value

— @igneousgaming7090

- 08:07 Level 6: Soft bodies

- 08:35 Level 7: Differential growth

As a person preparing for engineering competetive this guy did more dot product than me 😭

— @igneousgaming7090

- 08:57 Level 8: Rigid bodies

- 10:18 Level 9: Skate or Don't

I LOVE MINEBLOCKS SO WHEN WILL MINEBLOCKS 2 COME OUT?

— @immanuelisrael6791

- 11:24 Finale

#gamedev #gamedevelopment #programming

Amazing content! I am a long time programmer, but my math skills are poor. This is so inspiring. I hope I'll try some of it, then I continue my CRUD dev at work, and have more fun at home. :-)

— @x6f38

More User Perspectives

@

4:40 AMONG US

@Maciej-v6j
@

this sounds cool but i dont have the attention span or desire to figure this stuff out

@brolynkemp
@

if(notTouchingGround)() then
{
object:fall()
}


if(TouchingGround)() then

{

object:dontFall()

}

@Revin_Music123
@

make a 3d 1 i am doing that





i have no life

@asherviele
@

sponge screen saver

@Aæuge
@

does anyone know what program he used to make this?

@Zizami-Dip2
@

what language is this in? i think i recognised the editor as VSCode (despite never really using it) but all these C-family languages look so dang alike! is it C# or something? or am i being stupid and its literally just JS

@aladair123
@

08:44 how did you get the text apearing with a differential growth ? I coded a differential wroght but this effect is incredible.

@sokatunier8607
@

griffpatch for other type of coding

@GlobalSendingServices
@

Thank you! Thanks to your video i made my own version of your physics engine in python 😊

@mikolp.plo_o
@

This video is just a dot propaganda...

@marekkelo
@

11:33 oh cool... wait, SUB ROSA?????

@Dr.Coomer-e2q
@

What coding language are you using?

@kgkediting8205
@

for the rigid body simulation, why not first make the sides made out of multiple pieces and that's how you find the place where it collides on a side, then get the center of mass with some math (from what i remember in school it should be easy). then you just apply the corresponding rotation and some more math to find the speed at which it bounces

@silkfighter
@

elite ball knowledge

@AB-Prince
@

8:47 my mind litterally said “neat” this exact second

@100percentARealName
@

thank you bro

@alexcoe77
@

I was wondering what language you use? I think it is C# but Im not sure. I know python but I am thinking of switching to C# because I like making things like this.

@Bearnittt
@

Now do building a physics engine IN scratch

@DITOWITO1
@

Amazing Video! Could you recommend me learning ressources that you used?

@Amir44312
@

4:39 OHMYGOD AN AMOGUS I HAVEN'T SEEN ONE SINCE 2022

@ThumbsUpperYT
@

I laughed a little when I saw the side by sides of you. Didn't age a day, just grew a beard.

@AweTysm_dot_exe
@

What is this programming language?

@izao-b9q
@

could you do a proper tutorial series on this please? by proper I mean going into detail on how these different things work, I feel like a lot of us would love and appreciate it. thanks!

@fireblast_1000
@

So good video learned really much from it

@Idiotischer
@

Incredible video! This will help me so much for my project! Subbed

@threebrickboyslego
@

what is the software your using? I think I want to get into this stuff, ITS SO COOL!!!

@MarcieEllis-u7u
@

Music where

@Klarpimier
@

Weird compliment but your music picks for the first 2 minutes I’ve seen here have been absolutely peak. Insane bass. Fantastic job sir.

@jakewood1942
@

Zanzlanz? I thought you only did bass music? Since when were you a programmer?

@LexarXaryonx