Floating chat messages and remote server

This commit is contained in:
2025-01-13 14:22:24 +01:00
parent d301d597e8
commit c01b8d1c59
3 changed files with 74 additions and 4 deletions

View File

@ -28,6 +28,7 @@ type Player struct {
LastUpdateTime time.Time
InterpolationProgress float32
UserData interface{} // Used to store reference to game
FloatingMessage *FloatingMessage
}
type ModelAsset struct {
@ -41,6 +42,12 @@ type ChatMessage struct {
Time time.Time
}
type FloatingMessage struct {
Content string
ExpireTime time.Time
ScreenPos rl.Vector2 // Store the screen position for 2D rendering
}
const (
MapWidth = 50
MapHeight = 50
@ -51,5 +58,6 @@ const (
ServerTickRate = 600 * time.Millisecond
ClientTickRate = 50 * time.Millisecond
MaxTickDesync = 5
ServerAddr = "localhost:6969"
// ServerAddr = "localhost:6969"
ServerAddr = "boner.be:6969"
)