Skip to content

fix: remove oversized fieldGate override and rely on > tile transition - #19

Merged
leocagli merged 1 commit into
Bitcoindefi:mainfrom
s6pa1rta3n-lab:fix/issue-4-teleporting-wall
Aug 25, 2026
Merged

leocagli merged 1 commit into
Bitcoindefi:mainfrom
s6pa1rta3n-lab:fix/issue-4-teleporting-wall

Conversation

@s6pa1rta3n-lab

@s6pa1rta3n-lab s6pa1rta3n-lab commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #4

Previously, the fieldGate bounding rectangle in lib/map.js covered a 61x15 area spanning across the entire gatehouse, including 864 solid wall tiles. An override in lib/game.js intercepted any movement attempt into this rectangle prior to collision detection, causing players bumping into the gatehouse walls to accidentally teleport to the meadow.

Solution

  • Removed the ad-hoc fieldGate bounding box from MAPS.city in lib/map.js.
  • Removed the pre-collision fieldGate check from move() in lib/game.js.
  • Transition to the meadow now naturally triggers via standard collision & tile interaction on the > glyph at (160, 194).
  • Updated test suite in test/index.js to verify proper transition on stepping onto > and that walking into gatehouse walls correctly blocks movement without teleporting.

@gitar-bot

gitar-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Removes the oversized fieldGate bounding box and override logic, allowing map transitions to trigger naturally through standard tile interaction. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@leocagli
leocagli merged commit 3d98eb6 into Bitcoindefi:main Aug 25, 2026
8 checks passed
s6pa1rta3n-lab pushed a commit to s6pa1rta3n-lab/runa that referenced this pull request Aug 28, 2026
Reconstruido sobre el main de hoy. La version anterior entro en conflicto cuando
se mergeo el PR Bitcoindefi#19, que saco el bloque del `fieldGate`: ahi nacia uno de los tres
`new Field(...)` que esta rama sembraba. Ahora quedan dos y se siembran los dos.

El campo se sembraba con el valor por defecto, asi que cada salida a la pradera era
exactamente la misma pradera. Es la issue Bitcoindefi#3, y seguia viva en main: los
`new Field(...)` no llevaban semilla.

Ahora la semilla sale del numero de ledger de Stellar partido en bloques de un dia.
Todos los que jueguen hoy caminan el mismo campo, con los mismos bichos en los
mismos lugares. Manana es otro. Verificado: dos clientes independientes sacan
seed 3310838056 para el dia 250, y esa semilla produce 28 bichos identicos.

Por que la cadena y no un servidor: la semilla tiene que ser igual para todos,
cambiar sola, y sobre todo que no la haya elegido nadie. Las dos primeras las da
cualquier servidor. La tercera exige que el jugador pueda comprobarlo por su
cuenta, y por eso sirve un contador publico que ni el dueno del juego puede mover.

No pide billetera, ni fondos, ni transacciones. Es un GET. Sin internet cae a una
semilla local derivada del jugador, que igual arregla la issue Bitcoindefi#3 para el que juega
solo. La consulta no bloquea ningun cuadro y nadie la espera.

@stellar/stellar-sdk no carga en Bare: pide TextDecoder y despues Event. Se usa
@stellar/stellar-base empaquetado con --conditions=browser, que es lo que hace que
@noble/curves deje de pedir node:crypto. Los tres globals que faltan los pone
lib/stellar.js. Todo explicado en vendor/README.md.

Ocho tests nuevos y ninguno toca la red: un test que pida la semilla de verdad se
pone rojo cuando el RPC publico tiene un mal dia, y eso no prueba el juego sino el
clima.

  main hoy   65 tests, 517 asserts
  con esto   73 tests, 532 asserts

lint limpio y git diff --check limpio.

Refs Bitcoindefi#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

caminar contra la pared del gran porton te teletransporta a la pradera

2 participants