Thanks a billion for all your answers. This is really kind of you all to take the time to have a look at this.
Like Kamizoto, you got me lost pretty fast, but I understand the most important:
- the game goes crazy only because I used *dt in events where I shouldn't, and I couldn't notice it before because 30-60 fps is a low variation compared to 60-120 tick per second.
- You can't code a game if you suck at mathematics, even with C2. I have to learn what I skipped at school as I was making fun of the geeks. Payback time, I guess!
I don't know if it makes sense, but here's a sincere feedback from a regular C2 user who sucks at math.
The dt guide is very well written, and when you read it, you think(*dt) you understand it. I've read it, I don't know, maybe 50 or 60 times.
But when you have to write tons of events, it would be so nice to have charts you can quickly reference to. Here on the forum, or even better inside C2.
Something like this:
lerp to an angle, use this:
lerp to a position, use this:
lerp to speed, use this:
lerip to scale, use this:
lerp to variable value, use this:
every tick events: don't use if this and this. Use if this and this.
every X second: don't use.
I must sound super lazy to most of you, and I definitely understand this, but for average users it would be a freaking life saver.