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!
=== Assistant: 老闆這張我超滿意🤣🔥 === 老闆這張我超滿意🤣🔥 因為它證明三件事已經穩了:(1) 角色資產載入成功、(2) isometric-lite 的地板語法穩、(3) 角色錨點跟陰影也有。 剩下的都是「下一包 Patch」該做的精準修正,而且你抓到的 bug 點都很對👇 ==== ### ==== ✅ 你猜得很準:八成是 exit 觸發區域的座標系仍用 top-down 或 screen coords,轉 isometric 後位置/範圍全錯。 所以要逼它: * 觸發區域用 WORLD (room-local x,y) bounds * 邊界 margin 加大(先做大、驗證能進,再縮小) 另外「沒有方向導引」就順便: * 只有該方向真的有鄰房,才畫 EXIT 指示(不畫假門) ===== 這是經典:spriteFlip 的判斷跟 “aimX / mouseX” 在投影後搞混。 ===== 最穩的做法是: * 不管 isometric 投影,朝向判斷一律看 playerWorldX vs aimWorldX * 或看「輸入的 moveX」:moveX < 0 → faceLeft ===== 這是 chroma key threshold 太兇,把機甲的白/灰高光一起當背景切掉了😂 ===== 要修的關鍵是: * 用「近黑去背」而不是「近白去背」 * 或改成只對特定 key color(例如 #00FF00)去背 * 加一個 threshold slider/常數(先保守:小一點) 你這張看起來像:把亮部/白色也被判透明 → 所以剩下深色線條,看起來像玻璃。🧊 ==== 你就貼這段,這包會把你目前卡住的都打通: ==== <syntaxhighlight lang="text">PATCH 2 / Room Exits + Navigation + Facing + Chroma-Key Fix (Isometric) A) Room exits MUST work (after isometric change) * Define room world bounds (room-local coordinates), e.g.: roomHalfW = 220; roomHalfH = 160; // example, tune as needed * Exit trigger zones MUST be checked in WORLD coords (not screen coords): RightExit: player.x > roomHalfW - exitMargin LeftExit: player.x < -roomHalfW + exitMargin UpExit: player.y < -roomHalfH + exitMargin DownExit: player.y > roomHalfH - exitMargin * Set exitMargin LARGE for testing first (e.g. 30~50). Once verified, reduce later. * When triggered, transition to the linked neighbor room and respawn player near opposite entrance. Add F1 debug overlay: * show player world x,y * show room bounds and exitMargin * show which exit is being triggered (“TRIGGER: RIGHT”) * show current room coords (rx, ry) B) Navigation guidance (make exits obvious) * Only show exit indicators where a neighbor room exists. * Place animated hazard chevrons/arrow strips on the corresponding edge of the isometric diamond. * Add a simple minimap showing current room and available exits. C) Fix facing / left-right flipping * Facing must be decided in WORLD space: if (aimWorldX < player.x) faceLeft else faceRight (or if using movement: moveX < 0 => faceLeft, moveX > 0 => faceRight) * Do NOT use screenX/mouseX directly for facing in isometric mode. D) Fix “crystal mech” (chroma-key too aggressive) * Make chroma-key removal conservative: * Prefer removing near-black only (background), NOT near-white. * Use a small threshold (e.g. <= 25) for black key. * If the asset already has alpha, DO NOT apply chroma-key at all. * Add a toggle constant: USE_CHROMA_KEY = true/false for quick testing. Acceptance criteria: * Player can transition to at least one neighboring room reliably within 5 seconds by walking to an exit edge. * Exit indicators clearly show where to go. * Facing direction matches aim (aim left => face left). * Player sprite no longer looks transparent/glassy; white armor remains opaque. </syntaxhighlight> ==== 因為你現在最需要的是「循環」先跑起來。 ==== 一旦能進房間,門再微調都簡單;不能進,後面全卡住😈 如果你願意,我也可以幫你把「isometric 房間邊界」做成更像真房間的形狀(菱形輪廓+內縮牆面+角落遮擋),但那是 Patch 3(美術/氛圍)再做會比較順。 老闆先把 Patch 2 丟過去,我賭 9 成你下一張截圖就會是:有 EXIT 指示、能進下一房、Q/E 切槍爽感開始發生🔥
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)