Optimizations and debug options

This commit is contained in:
2025-11-25 01:06:35 -07:00
parent 57d08f2f04
commit c84ba37353
13 changed files with 377 additions and 212 deletions

View File

@@ -12,18 +12,18 @@ const (
// Physics
const (
Gravity = 1200.0
JumpStrength = -450.0
MaxFallSpeed = 800.0
GroundFriction = 0.85
AirFriction = 0.95
Gravity = 1400.0
JumpStrength = -480.0
MaxFallSpeed = 900.0
GroundFriction = 0.82
AirFriction = 0.96
)
// Gameplay
const (
SprintSpeedMultiplier = 1.8
SprintRecoveryThreshold = 0.2
ExhaustedThreshold = 0.2
SprintSpeedMultiplier = 2.0
SprintRecoveryThreshold = 0.25
ExhaustedThreshold = 0.15
StaminaLowThreshold = 0.2
)

View File

@@ -1,78 +0,0 @@
package config
import (
"image/color"
)
type MapConfig struct {
ID string
Number int
GroundColor color.NRGBA
BackgroundColor color.NRGBA
}
func DefaultMap1() MapConfig {
return MapConfig{
ID: "map1",
Number: 1,
GroundColor: color.NRGBA{R: 34, G: 139, B: 34, A: 255},
BackgroundColor: color.NRGBA{R: 135, G: 206, B: 235, A: 255},
}
}
func DefaultMap2() MapConfig {
return MapConfig{
ID: "map2",
Number: 2,
GroundColor: color.NRGBA{R: 139, G: 69, B: 19, A: 255},
BackgroundColor: color.NRGBA{R: 155, G: 196, B: 215, A: 255},
}
}
type PortalConfig struct {
ID string
DestinationMap string
DestinationPortal string
Color color.NRGBA
GlowColor color.NRGBA
}
func LeftPortalMap1() PortalConfig {
return PortalConfig{
ID: "map1_left",
DestinationMap: "map2",
DestinationPortal: "map2_right",
Color: color.NRGBA{R: 255, G: 100, B: 100, A: 180},
GlowColor: color.NRGBA{R: 255, G: 150, B: 150, A: 100},
}
}
func RightPortalMap1() PortalConfig {
return PortalConfig{
ID: "map1_right",
DestinationMap: "map2",
DestinationPortal: "map2_left",
Color: color.NRGBA{R: 100, G: 255, B: 100, A: 180},
GlowColor: color.NRGBA{R: 150, G: 255, B: 150, A: 100},
}
}
func LeftPortalMap2() PortalConfig {
return PortalConfig{
ID: "map2_left",
DestinationMap: "map1",
DestinationPortal: "map1_right",
Color: color.NRGBA{R: 100, G: 255, B: 100, A: 180},
GlowColor: color.NRGBA{R: 150, G: 255, B: 150, A: 100},
}
}
func RightPortalMap2() PortalConfig {
return PortalConfig{
ID: "map2_right",
DestinationMap: "map1",
DestinationPortal: "map1_left",
Color: color.NRGBA{R: 255, G: 100, B: 100, A: 180},
GlowColor: color.NRGBA{R: 255, G: 150, B: 150, A: 100},
}
}