Player/Enemy speed is stored as int coordinates. Diagonal speed vs. cardinal speed is calculated using the Pythagorean Theorem.
There are rounding errors of course. Here is a table of acceptable speed/dspeed for enemies. The hero uses 10,7 (it would more accurately be 10,7.07 which is close enough). Note that when moving diagonal (map coordinates; this looks cardinal on the screen) the dspeed is applied in both directions.
- 3,2 (rotting zombie, goblin)
- 4,3 (skeleton, zombie)
- 6,4 (goblin charger, skeletal warrior)
- 7,5 (antlion, zombie boss)
- 9,6 (skeleton boss)
- 10,7 (hero)
- 13,9 (hero with Boots of Speed)
- 16,11 (hero with Boots of Travel)
Item bonus speed (boots) are multiples of 3. An item with 3 speed actually adds (3,2) to speed.
Projectiles/missiles use floating point coordinates to accommodate arbitrary angles instead of the cardinal+ordinal eight.