minigame 4 more rule

This commit is contained in:
2026-04-29 10:39:17 +00:00
parent a383c01288
commit aab6489640
4 changed files with 12 additions and 7 deletions
File diff suppressed because one or more lines are too long
+9 -4
View File
@@ -65,12 +65,17 @@
<div class="editor-card__row editor-card__row--wrap">
<label>กว้าง <input type="number" id="map-w" value="20" min="10" max="50"></label>
<label>สูง <input type="number" id="map-h" value="15" min="10" max="40"></label>
<label>ขนาดタイル <input type="number" id="tile-size" value="32" min="16" max="64"></label>
<label>ขนาดไทล์ <input type="number" id="tile-size" value="32" min="16" max="64"></label>
<label title="ลงจากมุมซ้ายบนของจุดเกิด — เน้นขยายแนวตั้งก่อน (เช่น 4 = สูง 4 ช่อง)">ตัวละคร สูง (แนวตั้ง) <input type="number" id="character-cells-h" value="1" min="1" max="4"></label>
<label title="ไปทางขวาจากมุมซ้ายบน — แนวนอน">× กว้าง (แนวนอน) <input type="number" id="character-cells-w" value="1" min="1" max="4"></label>
<label title="ชนกำแพง (objects) เท่านั้น — แนวนอน กลางใต้ร่าง · เล็กกว่าตัว = หัว/ลำตัวทับภาพกำแพงได้">ชนกำแพง กว้าง <input type="number" id="character-collision-w" value="1" min="1" max="4"></label>
<label title="สูงจากเท้าขึ้นมา น้อยกว่าสูงตัว = ส่วนบนไม่ชนกำแพง">× สูง <input type="number" id="character-collision-h" value="1" min="1" max="4"></label>
<label title="เฉพาะกำแพง (โหมดวาดกำแพง / objects = เดินไม่ได้) — แนวนอนกลางใต้ร่าง · เล็กกว่าตัว = หัว/ลำตัวทับสไปรต์กำแพงได้ · โซน interactive / hub / อื่น ๆ ใช้ขนาดตัวด้านบน" aria-describedby="editor-character-collision-hint">ชนกำแพง กว้าง <input type="number" id="character-collision-w" value="1" min="1" max="4"></label>
<label title="เฉพาะกำแพง — สูงจากเท้าขึ้นมา · น้อยกว่าสูงตัว = ส่วนบนไม่ชนกำแพง · โซนอื่นใช้สูงตัวด้านบน" aria-describedby="editor-character-collision-hint">× สูง <input type="number" id="character-collision-h" value="1" min="1" max="4"></label>
<button type="button" id="btn-new">สร้างกริดใหม่</button>
<p id="editor-character-collision-hint" class="editor-card__hint" style="margin:0.4rem 0 0;width:100%;max-width:44rem;line-height:1.45;">
<strong>ชนกำแพง กว้าง×สูง</strong> ใช้แค่ตรวจชน <strong>กำแพง</strong> (ช่องวาด «กำแพง») เท่านั้น
· <strong>interactive</strong> · <strong>โซนห้ามซ้อน</strong> · <strong>hub / ส่งคำตอบ quiz carry</strong> · โซนคำถาม/ตัวเลือก ฯลฯ ยังใช้พื้นที่ตัวละครตาม
<strong>สูง (แนวตั้ง) × กว้าง (แนวนอน)</strong> เหมือนเดิม — ในเกม (<code>play.js</code>) แยกฟังก์ชันชนกำแพงกับ footprint โซนแล้ว
</p>
</div>
</section>
@@ -273,7 +278,7 @@
</div>
</div>
<script src="js/version.js?v=0.0169"></script>
<script src="js/editor.js?v=20260429-char-collision-depth"></script>
<script src="js/editor.js?v=20260429-collision-hint-ui"></script>
<div class="version-tag">v —</div>
</body>
</html>
+1 -1
View File
@@ -1615,7 +1615,7 @@
ctx.font = '12px sans-serif';
ctx.textAlign = 'left';
const colLine = (fpHud.colW < fpHud.cw || fpHud.colH < fpHud.ch)
? ' · ชนกำแพง ' + fpHud.colW + '×' + fpHud.colH + ' (เท้า/กลาง — เส้นประส้ม)'
? ' · ชนกำแพง ' + fpHud.colW + '×' + fpHud.colH + ' (เท้า/กลาง — เส้นประส้ม · เฉพาะกำแพง; โซนอื่นใช้ ' + fpHud.ch + '×' + fpHud.cw + ')'
: '';
ctx.fillText('ขนาดตัวละคร: สูง ' + fpHud.ch + ' × กว้าง ' + fpHud.cw + ' ช่อง (แนวตั้ง×แนวนอน · มุมซ้ายบนจุดเกิด)' + colLine, 8, canvas.height - 8);
}
+1 -1
View File
@@ -7378,7 +7378,7 @@
return s;
}
/** Footprint ชนกำแพงเท่านั้น (ย่อใต้ + กลางซ้ายขวา) — hub / blockPlayer / quiz ยังใช้เต็มกรอบ */
/** Footprint ชนกำแพง (objects=1) เท่านั้น — hub / interactive / blockPlayer / quiz ใช้ quizTilesFootprintPlay = เต็ม characterCells */
function quizTilesWallCollisionFootprintPlay(px, py) {
const s = new Set();
if (!mapData) return s;