Another useful classification you can make is discrete angle vs continous angle. Like shooting in Dead Cells (2 directions) vs Super Metroid (8 directions) vs Terraria (any angle) is significantly different.
That was insightful to watch, I liked the (current) final implementation especially the part where stuff like collision is handled on the discreet plane level, I feel it make things much easier to code and for performance wise. Would love to hear about benchmark comparison
Thanks!. It's much easier implementation wise, but I don't have any data about performance, unfortunately. The entities movement wasn't bottleneck at any point, so I didn't bother improving it's performance. This change was only driven by how painful it was to work with previous solution. From my experience, I would say second solution is more performant, but without proper tests it's hard to say.
I have seen another nice solution for interpolation - exponentially interpolation. Iirc the formula is newSpritePos = fieldPos + (oldSpritePos - fieldPos) * exp(-speed*deltaTime) Basically, you just multiply distance between sprite position ad field position by factor < 1 and adjust that factor because of variable frame rate. Nice thing about it is that you only need to store sprite position and field position and it's execatlywat you want to access.
Another useful classification you can make is discrete angle vs continous angle. Like shooting in Dead Cells (2 directions) vs Super Metroid (8 directions) vs Terraria (any angle) is significantly different.
That was insightful to watch, I liked the (current) final implementation especially the part where stuff like collision is handled on the discreet plane level, I feel it make things much easier to code and for performance wise.
Would love to hear about benchmark comparison
Thanks!. It's much easier implementation wise, but I don't have any data about performance, unfortunately. The entities movement wasn't bottleneck at any point, so I didn't bother improving it's performance. This change was only driven by how painful it was to work with previous solution. From my experience, I would say second solution is more performant, but without proper tests it's hard to say.
Problem with discrete movement on a square grid is is that it creates an eternal question: how many neigbours cell has?
I have seen another nice solution for interpolation - exponentially interpolation. Iirc the formula is newSpritePos = fieldPos + (oldSpritePos - fieldPos) * exp(-speed*deltaTime) Basically, you just multiply distance between sprite position ad field position by factor < 1 and adjust that factor because of variable frame rate. Nice thing about it is that you only need to store sprite position and field position and it's execatlywat you want to access.
Hmm, haven't seen that, but looking at formula it should work nicely, no conversions needed. Maybe I will find chance to test it. Thanks!
Really interesting video. I love the 420 2137 reference ❤ LIKE 👍
0100 0101
@@undermountain_dev 01001010 01000100 00001010