Same Speed With Delta?

I have the standard top down zombie bashing game. I use the standard {x += velocity * delta * dampener} system of moving. But the thing is, I need the speed to be exact. So how do I make it so that delta won’t make the speed different than what I want. Say delta is 2. Then instead of me heading .3 pixels an update, delta will make it .6. How do I keep it at .3 ppu?

Delta will keep it at .3 pixels - if delta goes up it’s updated less, so the movement is constant.

Yep, it’s ‘default’ in the sense that it’s the standard meaning and usage of ‘delta time’, whether it’s in an external library or engine, or ‘roll your own’ code.

‘Delta time’ means the difference in time between the previous and current update, usually expressed in seconds. As such, if your variables are expressed in units per second (such as pixels per second, or metres per second etc.), multiplying them by delta will ensure that your velocity/whatever remains constant despite updates of variable time (the general aim for games).

As such, if your velocity is 5 pixels per second, and delta is 2 (meaning 2 seconds have elapsed since the last update), then your zombie will move 5 * delta = 5 * 2 = 10 pixels in that update. If you didn’t multiply by delta, it would only appear to be moving at 2.5 pixels per second.

If you really want to keep your velocity at ‘.3ppu’ then don’t multiply the velocity by delta. Although be aware this will result in a choppy & non-smooth appearance, and at a guess might not be what you want to achieve???

Sorry if I’ve taught you to suck eggs with any of this.