> it's a big and deepy mathematical thing isn't it
It is! It scares me badly.
Ah, traveling salesman problem, that also scares me, I would like to play the game though.
> If I understand your movement happens on keydowns? What do you think about holding down buttons?
Yes, it is. I didn't handle the "holding down" action specifically, instead I let SDL2 to handle it. It seems that SDL2 will generate KeyboardEvent repeatedly, in the game the player just goes ahead again and again.
There seems like to be a data field to detect this:
https://wiki.libsdl.org/SDL2/SDL_KeyboardEvent
It's nice to know that you are also on SDF.org!