[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 30 KB, 316x202, 1423711598448.jpg [View same] [iqdb] [saucenao] [google]
7104754 No.7104754 [Reply] [Original]

agdg here.
I really wanna learn the basics of physics in games, but I don't know where to look for.

I just want to know to diferentiate between diferent games physics.

I want to know why Super Mario Bross feel diferent than Super Mario Bross 3.
Or why Kof feels diferent than SF and garou.

Can /sci/ pls baby teach me the basics of physics and how they applied to games?

I just wanna know how to duplicate a game feel in unity.

>> No.7105383

>>7104754
bump

>> No.7105386

>>7104754
go take a calculus course.

>> No.7105407

>>7104754
You need to learn basic classical mechanics, something like Walther Lewin's 8.01 will suffice.
Then learn some vector calculus and get very comfortable with the dot and cross product, and with just generally thinking in terms of carthesian space.
Once you've come this far just learn all of unitys's Vector2 Vector3 operations and all it's idiosyncrazies by heart so you can get into a flow while writing your code.
Now sit down and write and debug your functions, and fight with your sanity, for about ~ a year or two.

Congratulations, you can now write your own physichs game code.

>> No.7105420

>>7104754
>>7105407
Oh, and go for solving the 3D case directly. It's not a lot more difficult than the 2D and once you've got it you have the 2D case for free.

A lot of people seem to limit themselves to learning the 2D case specifically since they think it must be significantly easier
as a result they get stuck there in 2D land because they don't wanna step outside of their comfort zone.

>> No.7105422

>>7105420
b-b-but polar coordinates are scary in 3D

>> No.7105427

>>7105407
>35 hours lecture
but I just wanted to emulate mario bross nes physics in unity.
;_;

>> No.7105429

>>7104754
>I really wanna learn the basics of physics in games
Well then you need to learn some actual physics first.
And calculus.

>> No.7105467

It's usually just a different gravitational pull, no?

>> No.7105479

In super mario bros, hitting left or right actually applies acceleration in that direction. This means it takes a few seconds for velocity to reach its maximum. Whereas in something like mega man, hitting left or right instantly sets velocity to its maximum. People usually say super mario bros has momentum because it feels like you have to speed yourself up and slow yourself down

>> No.7105504

>>7105467
no. you have to suss out mass properties and friction as well.

>> No.7105523

>>7105467
Also, momentum and friction.

>> No.7105530

>>7105504
>>7105523
Oh right okay. Damn this thread just got really interesting!

>> No.7105548

>>7105427
Then just grab some platformer code someone else has already written and study it specifically and learn as little as possible.
But if you wanna actually understand how to invent and implement code like that for yourself, so you can customize and extend it however you please
and create a game that feels the way you want it to feel. Well then you need to study the subject somewhat seriously so you understand what you should be doing and why.

>> No.7105570

>Laws of movement
>Momentum
>Most common forces (gravity, friction, electromagnetic force, spring, buoyant force)
>Learn how to solve the most basic differential equations maybe
>Verlet integration for more precise movement
You don’t really need much more. When coding a real time physics you only need the most fundamental properties.

Though reproducing a game feeling has a lot to do with how fast the character moves and collisions.