game

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package game orchestrates client behavior: map input, network reactions, skill commands, local effects, and calls into render, audio, network, world, and ui. Map entity state and movement should live in world; reusable UI composition should live in ui; rendering backend details should live in render.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginMode

type LoginMode struct {
	// contains filtered or unexported fields
}

func NewCharacterSelectMode

func NewCharacterSelectMode(ctx client.Context, console gameui.ChatConsole) *LoginMode

func NewLoginMode

func NewLoginMode() *LoginMode

func (*LoginMode) Draw

func (m *LoginMode) Draw(ctx client.Context, screen *render.Frame)

func (*LoginMode) DrawOverlay

func (m *LoginMode) DrawOverlay(ctx client.Context, screen *render.Frame)

func (*LoginMode) Enter

func (m *LoginMode) Enter(ctx client.Context)

func (*LoginMode) FrameSubmitted added in v0.7.0

func (m *LoginMode) FrameSubmitted()

func (*LoginMode) Name

func (m *LoginMode) Name() string

func (*LoginMode) Update

func (m *LoginMode) Update(ctx client.Context) (Mode, error)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx client.Context, mode Mode) *Manager

func (*Manager) Draw

func (m *Manager) Draw(screen *render.Frame)

func (*Manager) DrawOverlay

func (m *Manager) DrawOverlay(screen *render.Frame)

func (*Manager) DrawUIOverlay

func (m *Manager) DrawUIOverlay(screen *render.Frame)

func (*Manager) FrameSubmitted added in v0.7.0

func (m *Manager) FrameSubmitted()

func (*Manager) Update

func (m *Manager) Update() error

func (*Manager) UpdateContext

func (m *Manager) UpdateContext(ctx client.Context)

type Mode

type Mode interface {
	Name() string
	Enter(client.Context)
	Update(client.Context) (Mode, error)
	Draw(client.Context, *render.Frame)
}

type WorldMode

type WorldMode struct {
	// contains filtered or unexported fields
}

func NewWorldMode

func NewWorldMode() *WorldMode

func (*WorldMode) AddTeleportEffect

func (m *WorldMode) AddTeleportEffect(ctx client.Context)

func (*WorldMode) Draw

func (m *WorldMode) Draw(ctx client.Context, screen *render.Frame)

func (*WorldMode) DrawInventoryItemIcon

func (m *WorldMode) DrawInventoryItemIcon(screen *render.Frame, manager *res.Manager, item session.InventoryItem, x, y int)

func (*WorldMode) DrawOverlay

func (m *WorldMode) DrawOverlay(ctx client.Context, screen *render.Frame)

func (*WorldMode) DrawSkillIcon

func (m *WorldMode) DrawSkillIcon(screen *render.Frame, manager *res.Manager, skill session.Skill, x, y, size int)

func (*WorldMode) DrawUIOverlay

func (m *WorldMode) DrawUIOverlay(ctx client.Context, screen *render.Frame)

func (*WorldMode) Enter

func (m *WorldMode) Enter(ctx client.Context)

func (*WorldMode) EquipmentPreviewImage

func (m *WorldMode) EquipmentPreviewImage(ctx client.Context, width, height int) image.Image

func (*WorldMode) EquipmentPreviewImageForCharacter

func (m *WorldMode) EquipmentPreviewImageForCharacter(ctx client.Context, character session.Character, sex byte, width, height int) image.Image

func (*WorldMode) FrameSubmitted added in v0.7.0

func (m *WorldMode) FrameSubmitted()

func (*WorldMode) ItemInfoIllustrationImage

func (m *WorldMode) ItemInfoIllustrationImage(manager *res.Manager, item session.InventoryItem, width, height int) image.Image

func (*WorldMode) KeyboardShortcutsBlocked

func (m *WorldMode) KeyboardShortcutsBlocked(ctx client.Context) bool

func (*WorldMode) Name

func (m *WorldMode) Name() string

func (*WorldMode) SkillIconImage

func (m *WorldMode) SkillIconImage(manager *res.Manager, skill session.Skill, size int) image.Image

func (*WorldMode) Update

func (m *WorldMode) Update(ctx client.Context) (Mode, error)

func (*WorldMode) UseShortcutSkill

func (m *WorldMode) UseShortcutSkill(ctx client.Context, skill session.Skill) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL