Files
sml-projects/game-sml/fcore/constants.sml
Humza Shahid da8790f0b6 Add 'game-sml/' from commit '113c3e67abe635f714f972a1e2ab0e4b24ff10f4'
git-subtree-dir: game-sml
git-subtree-mainline: aa5357714d
git-subtree-split: 113c3e67ab
2026-04-24 00:38:14 +01:00

57 lines
1.3 KiB
Standard ML

structure Constants =
struct
val fontSpace = 26
val fontSize: Real32.real = 60.0
val worldWidth = 1920
val worldHeight = 1080
val worldWidthReal: Real32.real = 1920.0
val worldHeightReal: Real32.real = 1080.0
(* constants for player *)
val playerWidth = 84
val playerHeight = 96
val playerWidthReal: Real32.real = 84.0
val playerHeightReal: Real32.real = 96.0
val halfPlayerWidthReal: Real32.real = playerWidthReal / 2.0
val halfPlayerHeightReal: Real32.real = playerHeightReal / 2.0
val movePlayerBy = 5
(* player timing values *)
val jumpLimit = 150
val floatLimit = 3
val recoilLimit = 15
val attackedLimit = 55
val maxCharge = 60
val mainAttackLimit = 24
(* constants for projectiles *)
val projectilePi: Real32.real = Real32.Math.pi / 180.0
val projectileSize: Real32.real = 18.0
val projectileDistance: Real32.real = 26.0
val projectileSizeInt = 18
val projectileHeight = 24
val projectileWidth = 96
val projectileOffsetY = playerHeight div 3
(* constants for enemy *)
val enemySize = 48
val enemySizeReal: Real32.real = 48.0
val moveEnemyBy = 3
val batRestLimit = 55
val moveBatX = 1
val moveBatY = 2
val moveProjectileBy = 11
val keyDelay =
let
val time = LargeInt.fromInt 300
in
Time.fromMilliseconds time
end
end