2025-01-12 07:18:44 +00:00
|
|
|
structure Constants =
|
|
|
|
|
struct
|
2025-02-19 04:07:27 +00:00
|
|
|
val fontSpace = 26
|
|
|
|
|
val fontSize: Real32.real = 60.0
|
2025-02-19 03:48:38 +00:00
|
|
|
|
2025-01-12 07:18:44 +00:00
|
|
|
val worldWidth = 1920
|
|
|
|
|
val worldHeight = 1080
|
2025-01-12 11:46:32 +00:00
|
|
|
val worldWidthReal: Real32.real = 1920.0
|
|
|
|
|
val worldHeightReal: Real32.real = 1080.0
|
2025-01-12 07:18:44 +00:00
|
|
|
|
|
|
|
|
(* constants for player *)
|
2025-08-28 23:02:03 +01:00
|
|
|
val playerWidth = 84
|
|
|
|
|
val playerHeight = 96
|
2025-08-28 23:28:38 +01:00
|
|
|
val playerWidthReal: Real32.real = 84.0
|
|
|
|
|
val playerHeightReal: Real32.real = 96.0
|
2025-02-18 12:31:22 +00:00
|
|
|
|
2025-08-28 23:28:38 +01:00
|
|
|
val halfPlayerWidthReal: Real32.real = playerWidthReal / 2.0
|
|
|
|
|
val halfPlayerHeightReal: Real32.real = playerHeightReal / 2.0
|
2025-01-12 07:18:44 +00:00
|
|
|
val movePlayerBy = 5
|
|
|
|
|
|
|
|
|
|
(* player timing values *)
|
|
|
|
|
val jumpLimit = 150
|
|
|
|
|
val floatLimit = 3
|
|
|
|
|
val recoilLimit = 15
|
|
|
|
|
val attackedLimit = 55
|
|
|
|
|
val maxCharge = 60
|
2025-08-29 01:29:51 +01:00
|
|
|
val mainAttackLimit = 24
|
2025-01-12 07:18:44 +00:00
|
|
|
|
|
|
|
|
(* constants for projectiles *)
|
|
|
|
|
val projectilePi: Real32.real = Real32.Math.pi / 180.0
|
2025-02-24 11:31:43 +00:00
|
|
|
val projectileSize: Real32.real = 18.0
|
|
|
|
|
val projectileDistance: Real32.real = 26.0
|
|
|
|
|
val projectileSizeInt = 18
|
2025-01-12 12:53:41 +00:00
|
|
|
|
2025-08-29 10:14:28 +01:00
|
|
|
val projectileHeight = 24
|
|
|
|
|
val projectileWidth = 96
|
|
|
|
|
val projectileOffsetY = playerHeight div 3
|
|
|
|
|
|
2025-01-12 12:53:41 +00:00
|
|
|
(* constants for enemy *)
|
2025-02-24 11:31:43 +00:00
|
|
|
val enemySize = 48
|
|
|
|
|
val enemySizeReal: Real32.real = 48.0
|
2025-01-13 12:53:50 +00:00
|
|
|
val moveEnemyBy = 3
|
2025-02-12 00:25:55 +00:00
|
|
|
|
2025-02-11 23:54:13 +00:00
|
|
|
val batRestLimit = 55
|
2025-02-12 00:25:55 +00:00
|
|
|
val moveBatX = 1
|
|
|
|
|
val moveBatY = 2
|
2025-01-13 12:46:10 +00:00
|
|
|
|
2025-01-13 12:53:50 +00:00
|
|
|
val moveProjectileBy = 11
|
2025-02-21 11:36:20 +00:00
|
|
|
|
2025-08-29 12:33:45 +01:00
|
|
|
val keyDelay =
|
|
|
|
|
let
|
|
|
|
|
val time = LargeInt.fromInt 300
|
|
|
|
|
in
|
|
|
|
|
Time.fromMilliseconds time
|
|
|
|
|
end
|
2025-01-12 07:18:44 +00:00
|
|
|
end
|