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!
==== 你就貼這段,這包會把你目前卡住的都打通: ==== <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>
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)