godot-genre-party

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Genre: Party / Minigame Collection

类型:派对/小游戏合集

Expert blueprint for party games balancing accessibility, variety, and social fun.
派对游戏专家蓝图,兼顾易上手性、多样性与社交乐趣。

NEVER Do

绝对不要做的事

  • NEVER long tutorials — Players want instant fun. 3-second looping GIF + 1-sentence instruction is ideal.
  • NEVER excessive downtime — Loading between 10s minigames kills momentum. Keep assets light, use threaded loading, or persistent board scene.
  • NEVER inconsistent controls — Minigame A uses A to jump, B uses B. Standardize: A=Accept/Action, B=Back/Cancel across all minigames.
  • NEVER forget dynamic input mapping — Remap InputMap at runtime (InputMap.action_add_event) for "p1_jump", "p2_jump" per controller.
  • NEVER ignore accessibility — Color-blind modes, audio cues for visual events, adjustable difficulty. Party games need inclusive design.

  • 绝对不要做冗长教程——玩家想要即时乐趣。3秒循环GIF + 1句话说明是理想方案。
  • 绝对不要有过多等待时间——10秒小游戏之间的加载会打断节奏。保持资源轻量化,使用线程加载,或采用持久化棋盘场景。
  • 绝对不要有不一致的控制方式——小游戏A用A键跳跃,小游戏B用B键跳跃。要标准化:所有小游戏中A=确认/行动,B=返回/取消。
  • 绝对不要忘记动态输入映射——在运行时重新映射InputMap(使用InputMap.action_add_event),为每个控制器设置“p1_jump”“p2_jump”等。
  • 绝对不要忽视无障碍设计——色盲模式、视觉事件的音频提示、可调节难度。派对游戏需要包容性设计。

Available Scripts

可用脚本

MANDATORY: Read the appropriate script before implementing the corresponding pattern.
必填:在实现对应模式前,请阅读相应脚本。

party_input_router.gd

party_input_router.gd

4-player device isolation for local multiplayer. Maps device_id to player_id, handles join requests, routes inputs to player-specific signals.

用于本地多人游戏的4玩家设备隔离。将device_id映射到player_id,处理加入请求,将输入路由到玩家专属信号。

Core Loop

核心循环

  1. Lobby: Players join and select characters/colors.
  2. Meta: Players move on a board or vote for the next game.
  3. Play: Short, intense minigame (30s - 2m).
  4. Score: Winners get points/coins.
  5. Repeat: Cycle continues until a turn limit or score limit.
  1. 大厅:玩家加入并选择角色/颜色。
  2. 元游戏阶段:玩家在棋盘上移动或投票选择下一个游戏。
  3. 游玩:简短、紧张的小游戏(30秒-2分钟)。
  4. 计分:获胜者获得点数/金币。
  5. 重复:循环进行,直到达到回合限制或分数限制。

Skill Chain

技能链

PhaseSkillsPurpose
1. Input
input-mapping
Handling 2-4 local controllers dynamically
2. Scene
godot-scene-management
Loading/Unloading minigames cleanly
3. Data
godot-resource-data-patterns
Defining minigames via Resource files
4. UI
godot-ui-containers
Scoreboards, instructions screens
5. Logic
godot-turn-system
Managing the "Board Game" phase
阶段技能用途
1. 输入
input-mapping
动态处理2-4名本地玩家的控制器
2. 场景
godot-scene-management
流畅加载/卸载小游戏
3. 数据
godot-resource-data-patterns
通过Resource文件定义小游戏
4. UI
godot-ui-containers
计分板、说明界面
5. 逻辑
godot-turn-system
管理“棋盘游戏”阶段

Architecture Overview

架构概述

1. Minigame Definition

1. 小游戏定义

Using Resources to define what a minigame is.
gdscript
undefined
使用Resources定义小游戏的属性。
gdscript
undefined

minigame_data.gd

minigame_data.gd

class_name MinigameData extends Resource
@export var title: String @export var scene_path: String @export var instructions: String @export var is_1v3: bool = false @export var thumbnail: Texture2D
undefined
class_name MinigameData extends Resource
@export var title: String @export var scene_path: String @export var instructions: String @export var is_1v3: bool = false @export var thumbnail: Texture2D
undefined

2. The Party Manager

2. 派对管理器

Singleton that persists between minigames.
gdscript
undefined
在小游戏之间持久化的单例。
gdscript
undefined

party_manager.gd

party_manager.gd

extends Node
var players: Array[PlayerData] = [] # Tracks score, input_device_id, color var current_round: int = 1 var max_rounds: int = 10
func start_minigame(minigame: MinigameData) -> void: # 1. Show instructions scene await show_instructions(minigame) # 2. Transition to actual game get_tree().change_scene_to_file(minigame.scene_path) # 3. Pass player data to the new scene # (The minigame scene must look up PartyManager in _ready)
undefined
extends Node
var players: Array[PlayerData] = [] # 追踪分数、input_device_id、颜色 var current_round: int = 1 var max_rounds: int = 10
func start_minigame(minigame: MinigameData) -> void: # 1. 显示说明场景 await show_instructions(minigame) # 2. 切换到实际游戏场景 get_tree().change_scene_to_file(minigame.scene_path) # 3. 将玩家数据传递到新场景 # (小游戏场景必须在_ready方法中查找PartyManager)
undefined

3. Minigame Base Class

3. 小游戏基类

Every minigame inherits from this to ensure compatibility.
gdscript
undefined
每个小游戏都要继承此类以确保兼容性。
gdscript
undefined

minigame_base.gd

minigame_base.gd

class_name Minigame extends Node
signal game_ended(results: Dictionary)
func _ready() -> void: setup_players(PartyManager.players) start_countdown()
func end_game() -> void: # Calculate winner game_ended.emit(results) PartyManager.handle_minigame_end(results)
undefined
class_name Minigame extends Node
signal game_ended(results: Dictionary)
func _ready() -> void: setup_players(PartyManager.players) start_countdown()
func end_game() -> void: # 计算获胜者 game_ended.emit(results) PartyManager.handle_minigame_end(results)
undefined

Key Mechanics Implementation

关键机制实现

Local Multiplayer Input

本地多人输入

Handling dynamic device assignment.
gdscript
undefined
处理动态设备分配。
gdscript
undefined

player_controller.gd

player_controller.gd

@export var player_id: int = 0 # 0, 1, 2, 3
func _physics_process(delta: float) -> void: var device = PartyManager.players[player_id].device_id # Use the specific device ID for input var direction = Input.get_vector("p%s_left" % player_id, ...) # Better approach: Remap InputMap actions at runtime explicitly
undefined
@export var player_id: int = 0 # 0, 1, 2, 3
func _physics_process(delta: float) -> void: var device = PartyManager.players[player_id].device_id # 使用特定设备ID获取输入 var direction = Input.get_vector("p%s_left" % player_id, ...) # 更优方案:在运行时显式重新映射InputMap动作
undefined

Asymmetric Gameplay (1v3)

非对称玩法(1v3)

Balancing the "One" vs the "Many".
  • The One: Powerful, high HP, unique abilities (e.g., Bowser suit).
  • The Many: Weak individually, must cooperate to survive/win.
平衡“单人方”与“多人方”。
  • 单人方:强大、高生命值、独特能力(例如库巴套装)。
  • 多人方:个体较弱,必须合作才能生存/获胜。

Godot-Specific Tips

Godot专属技巧

  • SubViewport: Powerful for 4-player split-screen. Each player gets a camera, all rendering the same world (or different worlds!).
  • InputEventJoypadButton: Use
    Input.get_connected_joypads()
    to auto-detect controllers on the Lobby screen.
  • Remapping: Godot's
    InputMap
    system can be modified at runtime using
    InputMap.action_add_event()
    . Creating "p1_jump", "p2_jump" dynamically is a common pattern.
  • SubViewport:对4玩家分屏非常有用。每位玩家对应一个相机,所有相机可渲染同一个世界(或不同世界!)。
  • InputEventJoypadButton:在大厅界面使用
    Input.get_connected_joypads()
    自动检测控制器。
  • 重映射:Godot的
    InputMap
    系统可在运行时通过
    InputMap.action_add_event()
    修改。动态创建“p1_jump”“p2_jump”是常见模式。

Common Pitfalls

常见陷阱

  1. Long Tutorials: Players just want to play. Fix: 3-second looping GIF + 1 sentence instruction overlay before the game starts.
  2. Downtime: Loading times between 10-second minigames. Fix: Keep minigame assets light. Use a "Board" scene that stays loaded in the background if possible, or use creating
    Thread
    loading.
  3. Confusing Controls: Minigame A uses "A" to jump, Minigame B uses "B". Fix: Standardize. "A" is always Accept/Action. "B" is always Back/Cancel.
  1. 冗长教程:玩家只想玩。解决方法:游戏开始前显示3秒循环GIF + 1句话说明覆盖层。
  2. 等待时间过长:10秒小游戏之间的加载时间。解决方法:保持小游戏资源轻量化。如果可能,使用在后台保持加载的“棋盘”场景,或者使用
    Thread
    进行加载。
  3. 控制方式混乱:小游戏A用“A”键跳跃,小游戏B用“B”键跳跃。解决方法:标准化。“A”键始终为确认/行动,“B”键始终为返回/取消。

Reference

参考资料

  • Master Skill: godot-master
  • 核心技能:godot-master