Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You mean you didn't want to try to calculate the friction coefficient and use that to cause the deceleration? Pssht what kind of dev are you?
/Sarcasm -
@TheOct0 I would have solved this in the same manner. No need to make it super complicated unless you're aiming for real life physics.
-
Root797796yI love physics, so I'd have gone with the equation.
But a static drag coefficient is really easy and works well enough, too. (dxy *= friction every tick) I've used that pretty often as well -
TheOct039246y@Root I'm a simple man. I see that I have to integrate complicated physics into my game, I cry.
-
@Root that'd be version 4.0 or so. After I fixed all the other bugs I might loop back around and code some quality physics. (And add even more bugs)
Related Rants
-
linuxxx25This was at a hackathon which my study organises yearly. It's a 24 hours challenge and you've got to work in t...
-
athlon10There are no bugs, only happy little accidents
-
Revenger18Second semester Java - OOP Course We had to write a game, an arkanoid clone Neat shit And a fun course, ma...
Once I was coding a pool game, and didn't know why the white ball kept on going on forever. It was 4AM, so I was already a little tired as you can imagine.
The glitch came from the fact that I had designed a whole polynomial function to imitate the deceleration of the ball... I replaced it with two lines: one creating speed and deceleration value, and another one subtracting the deceleration value until speed was zero. And then I went to sleep.
rant
game physics
stupid me
wk117