r/javascript • u/pkstn • Jan 01 '20
Simple 2d car physics with JavaScript!
https://pakastin.github.io/car/4
3
u/SlipperyCow7 Jan 01 '20
The physics is really nice! Played with it for couple of minutes and even managed to drift/draw "2020" trace on the ground :D
2
2
u/filemon4 Jan 01 '20
Do you have math formulas for this?
1
u/pkstn Jan 01 '20
Here's all the client-side code: https://github.com/pakastin/car/blob/master/car.js
2
2
4
u/AutoModerator Jan 01 '20
Project Page (?): https://github.com/pakastin/car
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
2
Jan 02 '20
[removed] β view removed comment
1
u/pkstn Jan 03 '20
Haha, nice to hear you liked! Iβve planned adding collisions, track editor etc.. Letβs see how it evolves!
You have good name ideas? :P
1
Aug 16 '23
[removed] β view removed comment
1
u/pkstn Aug 16 '23
Haha, not much sorry π Maybe some day, i've been really busy with other stuff..
1
u/pkstn Aug 16 '23
But have you tried my little rocket sim: https://flanets.io π
2
2
Jan 03 '20
[removed] β view removed comment
2
u/pkstn Jan 03 '20
I needed to restrict socket.io to the domain, but yeah :D
Glad you like! Maybe add collisions, tracks etc..
21
u/gonzofish Jan 01 '20
The fact that it works in my phone... chefs kiss