Found a simple solution for stopping physical things at correct points & is easier than I thought. You can just calculate stopping distance from acceleration and current velocity and once the remaining distance + velocity intersects the point, you start stopping #gamedev #maths
And this is the formula. It does require a constant acceleration, so for anything more complex, with drag, variable braking force etc, the analytical solution is harder to find and in that case its easier to use (although harder to tweak) a PID controller instead Image
By drag, I meant exponential drag, if you have constant drag you can just add it to the accel of course. (but maybe there's an analytical solution for that too? 🤔)

& you can also use the formula to find the distance it takes to accelerate from 0 to desired speed, same thing

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with 😷 Ivan 🌲🏎️💨🌲

😷 Ivan 🌲🏎️💨🌲 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Nothke

Nov 7, 2021
Just learning about how computers work from a gorgeously drawn old Soviet encyclopedia for children
Look how many cars and trucks we have in our glorious country comrade, all for you to freely choose! (these drawings are soooo good!)
...or a train or a plane! Just pick!
Read 14 tweets
Nov 7, 2021
Kinda disappointed that anti-anti-art redirects to Stuckism
Stuckism was definitely the last "movement" we learned about in school. But seems like there's been a bunch new ones in the mean time that I've never even heard of. I guess to be an anti-anti it needs to be direct response to anti-art.
Read 4 tweets
Sep 30, 2020
Discovered this FPS gem from 2007 made by a solo gamedev from Uruguay, impressive: medium.com/@dominictaraso… #gamedev
Good news it works on win10. But for some reason on my native resolution it crops part of the screen. On 4:3 seems it doesn't crop. Oh & I had to start the game a few times to test it, which was super annoying cuz it has the first sin of video games, an UNSKIPPABLE INTRO!!
Everything in this game uses like deltatime lerping:
> current = lerp(current, target, dt);
from menu highlights to mouselook, lol. It's painful.
Read 13 tweets
Sep 23, 2020
So, I'm finally working on a "material" system in my engine. Until now there was no need for it since there was just one scene shader, with the only object-unique uniform being the texture. The framebuffer and debug lines were special cases that bind their own shaders (1/?)
So, each "object" (I called it Model) was just Mesh, texture, and the model matrix. This was actually the whole scene rendering logic, I did some checks to see if models in sequence have the same texture or mesh to reduce unnecessary binds: (2/?) Image
But now with adding materials, I actually have to refactor almost everything, and turn the Model into a bigger beast, that has a Transform, Mesh and Material. With the only addition being ability to switch shaders (3/?)
Read 9 tweets
Sep 19, 2020
RIP potato. I think it has come to the end of its life since it doesn't respond to water anymore. Image
Time to see what you were hiding. ImageImageImage
Oooh a big one! ImageImage
Read 6 tweets
Sep 6, 2020
#F1 races were too long so now they come with intermissions
If the best race of 2020 happens to be in Monza.. No one could ever guess.
This is the most beautiful race standings ever 🤩 Image
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(