Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/694f5245-1110-800b-b182-7c2accd50046
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== 這包會一次把抖動根治,並落地你要的 4 個觸發點: ==== <syntaxhighlight lang="text">Patch N / Event-driven dialogues (no jitter), RPG-style briefings Do NOT change combat math, enemies, rooms, weapons, or rewards logic. Only refactor comms into event-triggered dialogue panels and stop per-frame message updates. 1) Replace scrolling message box with Dialogue System: * dialogue = { active:false, lines:[], index:0, onFinish:null, lockInput:true/false } * Show a modal dialogue panel when dialogue.active = true * Advance with Space/Enter; Esc skips (optional) 2) Add a UI state machine for narrative moments: * uiState can include: SAFE_BRIEFING, COMBAT, CLEAR_BANNER, REWARD_SELECT, REWARD_CONFIRM, PRE_BOSS_DIALOG, BOSS_FIGHT, POST_BOSS_DIALOG, BOSS_REWARD 3) Trigger points: A) On entering SAFE room: * uiState = SAFE_BRIEFING * dialogue.lockInput = true * After dialogue finishes -> uiState = SAFE_FREE (normal movement allowed) B) On room clear (normal combat room): * Keep your 1s "STAGE CLEAR" * Then uiState = REWARD_SELECT * Display a small message box under the reward cards (non-modal, no jitter): one short line only. C) On entering BOSS room: * uiState = PRE_BOSS_DIALOG * dialogue.lockInput = true * After dialogue finishes -> start boss fight (uiState = BOSS_FIGHT) D) On boss defeated: * uiState = POST_BOSS_DIALOG * dialogue.lockInput = true * After dialogue finishes -> uiState = BOSS_REWARD (show reward cards) 4) Anti-jitter rule: * Never update/append dialogue text inside the main render loop. * Only update dialogue state on event triggers or when player presses Space/Enter. Acceptance: * Dialogue boxes do not jitter or flicker. * Player is not forced to read during active combat. * Safe room briefing and boss pre/post dialogues pause gameplay until acknowledged. </syntaxhighlight>
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)