soul-symphony-ling
↓ 0 downloadsSoul Symphony — Ling Edition. A spiritual 3D adventure in the soul realm: collect the letters of the world-song, clear the monster lattice, and duel in the arcade arena. Wind Waker-style toon renderer with volumetric light pools, SSAO, bloom and oil-slick tilt-shift — all ling-lang vectors.
Keywords game, 3d, toon, music, soul-symphony
lingfu install soul-symphony-lingCode / Files (1947)
game/maze.ling
# ────────────────────────────────────────────────────────────────────────────
# โดนัท.ling — crypto-physics โดนัท (torus-knot fingerprints)
# แต่ละโดนัทคือ "ลายนิ้วมือ" ทอรัส-นอต ที่สร้างจากแฮชเข้ารหัส (จุดปม)
# ผู้เล่นกลิ้งออร์บไล่เก็บ — สัมผัสแล้วเก็บได้ + รีสปอว์น
# ────────────────────────────────────────────────────────────────────────────
ใช้ "color"
# ── สร้างจุดโดนัท: torus-knot จาก seed (crypto knot_points) ──────────────────
# คืนรายการแบน [x,y,z, x,y,z, ...] 256 จุด (768 ตัวเลข)
ฟังก์ชัน สร้างโดนัท(เมล็ด) {
return จุดปม(เมล็ด)
}
# ── วาดโดนัท: torus-knot ที่ (ox,oy,oz) สเกล + หมุนรอบแกน Y + สีหมุนเวียน ─────
# จุด = รายการแบนจาก สร้างโดนัท สเกล ~0.12 ฮิว = ค่าสี หมุน = มุมรอบ Y
ฟังก์ชัน วาดโดนัท(จุด, ox, oy, oz, scale, ฮิว, หมุน) {
color(ฮิว, 0.0)
bind ca = โคไซน์(หมุน)
bind sa = ไซน์(หมุน)
bind n = 256
bind ก้าว = 8
bind i = 0
ขณะที่ i < n {
bind j = i + ก้าว
ถ้า j >= n { bind j = 0 }
bind ax = list_get(จุด, i*3) * scale
bind ay = list_get(จุด, i*3+1) * scale
bind az = list_get(จุด, i*3+2) * scale
bind bx2 = list_get(จุด, j*3) * scale
bind by2 = list_get(จุด, j*3+1) * scale
bind bz2 = list_get(จุด, j*3+2) * scale
# หมุนรอบแกน Y
bind rax = ax*ca - az*sa; bind raz = ax*sa + az*ca
bind rbx = bx2*ca - bz2*sa; bind rbz = bx2*sa + bz2*ca
วาดเส้น3มิติ(ox+rax, oy+ay, oz+raz, ox+rbx, oy+by2, oz+rbz)
bind i = i + ก้าว
}
}
# ── ตำแหน่งสุ่มในสนาม (±ขอบ) ─────────────────────────────────────────────────
ฟังก์ชัน สุ่มตำแหน่ง(ขอบ) {
return (สุ่ม() - 0.5) * 2.0 * ขอบ
}