Chat

Lightweight channel-based chat system for in-game messaging. Provides named channels, a fixed-capacity ring buffer for message history, and a singleton API for sending and querying messages.

Architecture

spinner

Data Flow

spinner

Key Concepts

Concept
Description

Chat

Singleton service managing named channels. Static API for all chat operations.

ChatChannel

Named channel with a ChatBuffer and a MessageSent event for UI binding.

ChatBuffer

Fixed-capacity (256) ring buffer. Overwrites oldest messages when full. Enumerates newest-first.

ChatMessage

Readonly struct with timestamp, sender, message text, and category. Pre-formats ToString() output.

Default Channels

Channel
Purpose

"General"

Default channel for player chat messages

"System"

Channel for system/game notifications

Quick Start

Classes

Class
Description

Singleton service with static API for channel management and messaging

Fixed-capacity ring buffer for ChatMessage storage

See Also

Last updated