Rune Crypt
Choisissez Chevalier, Arcaniste ou Éclaireur et traversez cinq niveaux. Vainquez le Gardien, récupérez le Cœur runique et échangez vos fragments sauvegardés contre un entraînement permanent.
Choisissez une classe, puis appuyez sur Entrée ou Begin a new run. Cliquer sur le jeu lui donne seulement le focus. Ouvrez le plein écran pour plus d'espace.
Ouvrir le jeu complet dans un nouvel ongletChargement du jeu…
Voir le code source
Aucun fichier correspondant.
rune_crypt.rune
#!RUNE
import "assets.rune"
import "models.rune"
import "maps.rune"
import "controls.rune"
import "logic.rune"
import "combat.rune"
import "exploration.rune"
import "ux.rune"
import "sound.rune"
import "weapon.rune"
import "shell.rune"
@App
name = Rune Crypt
type = pixel-3d
runtime = hybrid
scene = crypt
resolution = [320, 200]
tick_rate = 30
port = 3021
shell = crypt_cabinet
@Scene/crypt
logic = crypt
map = courtyard
camera = player
things = ["enemies", "pickups", "landmarks", "projectiles", "hazards", "warnings", "death_effects"]
weapon = weapon
controls = crypt
ui = ui
pause_ui = pause_ui
restart_action = return_to_title
click_to_start = false
mouse_look = true
persistence = {"key":"rune-crypt","state":"legacy"}
presentation = {
"defeat": "THE CRYPT ENDURES",
"instructions": [
"WASD MOVE / MOUSE LOOK / SHIFT DODGE",
"CLICK SWORD / Q RUNE / E INTERACT",
"C CYCLES CLASS, REWARD OR EXIT ROUTE",
"YELLOW WARNS. RED HURTS. KEEP MOVING.",
"R TRAIN AT CAMP / SHARDS SURVIVE DEATH"
],
"objective": "EXPLORE - BUILD - SURVIVE FIVE DEPTHS",
"subtitle": "FIVE DEPTHS. BUILD YOUR OWN LEGEND.",
"title": "RUNE CRYPT",
"victory": "HEART RECLAIMED"
}
@Page/crypt
logic = crypt
view:
canvas data-rune-pixel-3d=true
assets.rune
@Palette/crypt
colors = {
".": "transparent",
"a": "#d79158",
"b": "#43536d",
"c": "#7fbcc4",
"d": "#302c3c",
"g": "#6e8660",
"k": "#161620",
"l": "#786b75",
"m": "#3c5141",
"r": "#9d3b50",
"s": "#514958",
"w": "#d7ceb4",
"y": "#f2d58a"
}
@Texture/stone/wall
palette = crypt
size = [32, 32]
patterns = {
"chip": "k*2 l s*3 l*2 s*7 d k l s*9 d*3 d k",
"edge": "k*2 l*14 k l*14 k",
"face": "k*2 l s*12 d k l s*12 d k",
"joint": "k*32",
"offset": "s*6 d k l s*12 d k l s*6 d k",
"offset_chip": "s*2 d s*3 d k l s*5 l s*6 d k l s*6 d k",
"offset_edge": "l*7 k l*14 k l*8 k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":3}
{"pattern":"chip"}
{"pattern":"face","repeat":2}
{"pattern":"joint"}
{"pattern":"offset_edge"}
{"pattern":"offset","repeat":2}
{"pattern":"offset_chip","repeat":2}
{"pattern":"offset","repeat":2}
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":2}
{"pattern":"chip"}
{"pattern":"face","repeat":3}
{"pattern":"joint"}
{"pattern":"offset_edge"}
{"pattern":"offset","repeat":3}
{"pattern":"offset_chip"}
{"pattern":"offset","repeat":2}
@Texture/stone/pillar
palette = crypt
size = [64, 64]
patterns = {
"cap": "k*64",
"carving": "d*3 s*3 l*4 w*4 l*4 d*4 l*4 w*4 l*4 d*4 l*4 w*4 l*4 d*4 l*4 s*3 d*3",
"chip": "d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 d*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2",
"crack": "d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*2 k w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2",
"flute": "d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2 d*4 s*2 l*3 w*2 l*3 s*2",
"rim": "d*3 s*3 l*52 s*3 d*3"
}
pixels:
{"pattern":"cap","repeat":2}
{"pattern":"rim","repeat":2}
{"pattern":"carving","repeat":3}
{"pattern":"rim","repeat":2}
{"pattern":"flute","repeat":12}
{"pattern":"chip","repeat":2}
{"pattern":"flute","repeat":10}
{"pattern":"crack","repeat":3}
{"pattern":"flute","repeat":15}
{"pattern":"chip","repeat":2}
{"pattern":"flute","repeat":2}
{"pattern":"rim","repeat":2}
{"pattern":"carving","repeat":3}
{"pattern":"rim","repeat":2}
{"pattern":"cap","repeat":2}
@Texture/stone/moss_wall
palette = crypt
size = [32, 32]
patterns = {
"edge": "k*2 l*14 k m*6 l*8 k",
"face": "k*2 l s*12 d k m*2 s*10 d*2 k",
"joint": "k*32",
"moss": "k*2 l s*8 m*3 s d k m g*2 m*3 s*7 d k",
"offset": "s*6 d k l s*8 m*3 s d k l s*6 d k",
"root": "k*2 m*2 s*8 m*2 s d k m*3 s*10 d k",
"vine": "s*6 d k m g m s*3 m*3 s*4 d k l s*6 d k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":2}
{"pattern":"moss","repeat":2}
{"pattern":"root","repeat":2}
{"pattern":"joint"}
{"pattern":"offset","repeat":2}
{"pattern":"vine","repeat":3}
{"pattern":"offset","repeat":2}
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"root","repeat":3}
{"pattern":"face","repeat":3}
{"pattern":"joint"}
{"pattern":"offset","repeat":3}
{"pattern":"vine","repeat":2}
{"pattern":"offset","repeat":2}
@Texture/stone/cracked
palette = crypt
size = [32, 32]
patterns = {
"crack_a": "k*2 l s*4 k s*7 d k l s*12 d k",
"crack_b": "k*2 l s*5 k s*6 d k l s*12 d k",
"crack_c": "k*2 l s*6 k s*5 d k l s*12 d k",
"edge": "k*2 l*14 k l*14 k",
"face": "k*2 l s*12 d k l s*12 d k",
"joint": "k*32",
"offset": "s*6 d k l s*12 d k l s*6 d k",
"split": "s*6 d k l s*3 k s*8 d k l s*6 d k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face"}
{"pattern":"crack_a","repeat":2}
{"pattern":"crack_b","repeat":2}
{"pattern":"crack_c"}
{"pattern":"joint"}
{"pattern":"offset","repeat":2}
{"pattern":"split","repeat":3}
{"pattern":"offset","repeat":2}
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"crack_c","repeat":2}
{"pattern":"crack_b","repeat":2}
{"pattern":"crack_a","repeat":2}
{"pattern":"joint"}
{"pattern":"offset","repeat":3}
{"pattern":"split","repeat":2}
{"pattern":"offset","repeat":2}
@Texture/stone/ossuary
palette = crypt
size = [32, 32]
patterns = {
"bone": "s*6 d k l s*3 w*6 s*3 d k l s*6 d k",
"edge": "k*2 l*14 k l*14 k",
"eyes": "k*2 l s*3 k w k*2 w k s*3 d k l s*3 k w k*2 w k s*3 d k",
"face": "k*2 l s*12 d k l s*12 d k",
"jaw": "k*2 l s*3 k*2 w*2 k*2 s*3 d k l s*3 k*2 w*2 k*2 s*3 d k",
"joint": "k*32",
"niche": "k*2 l s*3 k*6 s*3 d k l s*3 k*6 s*3 d k",
"offset": "s*6 d k l s*12 d k l s*6 d k",
"skull": "k*2 l s*3 k w*4 k s*3 d k l s*3 k w*4 k s*3 d k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"niche"}
{"pattern":"skull"}
{"pattern":"eyes"}
{"pattern":"jaw"}
{"pattern":"niche"}
{"pattern":"face"}
{"pattern":"joint"}
{"pattern":"offset","repeat":2}
{"pattern":"bone","repeat":2}
{"pattern":"offset","repeat":3}
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face"}
{"pattern":"niche"}
{"pattern":"skull"}
{"pattern":"eyes"}
{"pattern":"jaw"}
{"pattern":"niche"}
{"pattern":"joint"}
{"pattern":"offset","repeat":3}
{"pattern":"bone","repeat":2}
{"pattern":"offset","repeat":2}
@Texture/stone/floor
palette = crypt
size = [32, 32]
patterns = {
"chip": "k l s*4 l s*12 d s*9 d*2 k",
"crack": "k l s*16 k s*10 d*2 k",
"edge": "k l*29 d k",
"face": "k l s*27 d*2 k",
"joint": "k*32",
"lower": "k d*30 k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":6}
{"pattern":"chip","repeat":2}
{"pattern":"face","repeat":7}
{"pattern":"crack","repeat":3}
{"pattern":"face","repeat":8}
{"pattern":"lower","repeat":3}
{"pattern":"joint"}
@Texture/stone/moss
palette = crypt
size = [32, 32]
patterns = {
"edge": "k l*29 d k",
"face": "k l s*27 d*2 k",
"joint": "k*32",
"lower": "k d*24 m*4 g*2 k",
"moss": "k l s*6 m*3 g*2 m*3 s*13 d*2 k",
"root": "k l s*5 m*2 s*2 m*4 s*11 m*3 d*2 k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":4}
{"pattern":"root","repeat":2}
{"pattern":"moss","repeat":3}
{"pattern":"root","repeat":2}
{"pattern":"face","repeat":12}
{"pattern":"root","repeat":3}
{"pattern":"lower","repeat":3}
{"pattern":"joint"}
@Texture/stone/ceiling
palette = crypt
size = [32, 32]
patterns = {
"center": "k l d*4 s*3 l d*5 s*2 d*5 l s*3 d*3 s*2 k",
"face": "k l d*27 s*2 k",
"inset": "k l d*4 s*3 l d*12 l s*3 d*3 s*2 k",
"joint": "k*32",
"rib": "k l d*4 s*3 l*2 s*10 l*2 s*3 d*3 s*2 k",
"rim": "k l*30 k"
}
pixels:
{"pattern":"joint"}
{"pattern":"rim"}
{"pattern":"face","repeat":4}
{"pattern":"rib","repeat":3}
{"pattern":"inset","repeat":5}
{"pattern":"center","repeat":4}
{"pattern":"inset","repeat":5}
{"pattern":"rib","repeat":3}
{"pattern":"face","repeat":4}
{"pattern":"rim"}
{"pattern":"joint"}
@Texture/rune/wall
palette = crypt
size = [32, 32]
patterns = {
"bar": "k s b*10 c*8 b*10 s k",
"bottom": "k s b*12 c*6 b*10 s k",
"chip": "k s b*4 d*2 b*22 s k",
"edge": "k s l*28 s k",
"face": "k s b*28 s k",
"joint": "k*32",
"stem": "k s b*10 c*2 b*16 s k",
"top": "k s b*10 c*6 b*12 s k",
"turn": "k s b*16 c*2 b*10 s k"
}
pixels:
{"pattern":"joint","repeat":2}
{"pattern":"edge"}
{"pattern":"face","repeat":3}
{"pattern":"top","repeat":2}
{"pattern":"stem","repeat":5}
{"pattern":"bar","repeat":2}
{"pattern":"turn","repeat":5}
{"pattern":"bottom","repeat":2}
{"pattern":"face","repeat":4}
{"pattern":"chip","repeat":2}
{"pattern":"face"}
{"pattern":"edge"}
{"pattern":"joint","repeat":2}
@Texture/rune/seal
palette = crypt
size = [32, 32]
patterns = {
"bar": "k s b*6 c*16 b*6 s k",
"center": "k s b*6 c*2 b*5 y*2 b*5 c*2 b*6 s k",
"face": "k s b*28 s k",
"joint": "k*32",
"tip": "k s b*12 y*4 b*12 s k",
"upper": "k s b*10 c*2 b*4 c*2 b*10 s k",
"wide": "k s b*8 c*2 b*8 c*2 b*8 s k"
}
pixels:
{"pattern":"joint","repeat":2}
{"pattern":"face","repeat":3}
{"pattern":"tip","repeat":2}
{"pattern":"upper","repeat":3}
{"pattern":"wide","repeat":3}
{"pattern":"center","repeat":2}
{"pattern":"bar","repeat":2}
{"pattern":"center","repeat":2}
{"pattern":"wide","repeat":3}
{"pattern":"upper","repeat":3}
{"pattern":"tip","repeat":2}
{"pattern":"face","repeat":3}
{"pattern":"joint","repeat":2}
@Texture/rune/floor
palette = crypt
size = [32, 32]
patterns = {
"bar": "k l b*7 c*12 b*8 d*2 k",
"edge": "k l*29 d k",
"face": "k l b*27 d*2 k",
"joint": "k*32",
"lower": "k d*30 k",
"stem": "k l b*11 c*2 b*14 d*2 k",
"tip": "k l b*11 c*4 b*12 d*2 k",
"turn": "k l b*17 c*2 b*8 d*2 k"
}
pixels:
{"pattern":"joint"}
{"pattern":"edge"}
{"pattern":"face","repeat":4}
{"pattern":"tip","repeat":2}
{"pattern":"stem","repeat":6}
{"pattern":"bar","repeat":2}
{"pattern":"turn","repeat":6}
{"pattern":"tip","repeat":2}
{"pattern":"face","repeat":5}
{"pattern":"lower","repeat":2}
{"pattern":"joint"}
@Texture/rune/ceiling
palette = crypt
size = [32, 32]
patterns = {
"face": "k b d*28 b k",
"heart": "k b d*8 c*2 d*3 y*2 d*3 c*2 d*8 b k",
"joint": "k*32",
"rim": "k b*30 k",
"side": "k b d*8 c*2 d*8 c*2 d*8 b k",
"top": "k b d*8 c*12 d*8 b k"
}
pixels:
{"pattern":"joint"}
{"pattern":"rim"}
{"pattern":"face","repeat":6}
{"pattern":"top","repeat":2}
{"pattern":"side","repeat":4}
{"pattern":"heart","repeat":4}
{"pattern":"side","repeat":4}
{"pattern":"top","repeat":2}
{"pattern":"face","repeat":6}
{"pattern":"rim"}
{"pattern":"joint"}
@Sprite/enemy/skeleton
palette = crypt
size = [8, 8]
pixels:
"..wwww.."
"..wkkw.."
"...ww..."
".wwwwww."
"w.wkkw.w"
"..wwww.."
"..w..w.."
".ww..ww."
@Sprite/enemy/wraith
palette = crypt
size = [8, 8]
pixels:
"...cc..."
"..cbbc.."
"..cyyc.."
".cbbbbc."
"ccbbbbcc"
".cbbbbc."
"..cbbc.."
".c.cc.c."
@Sprite/enemy/skeleton_warn
palette = crypt
size = [8, 8]
pixels:
"..yyyy.."
"..ykky.."
"...yy..w"
".yyyyy.w"
"y.ykkyww"
"..yyyy.."
"..y..y.."
".yy..yy."
@Sprite/enemy/wraith_warn
palette = crypt
size = [8, 8]
pixels:
"...yy..."
"..ybby.."
"..ywwy.."
".ybbbby."
"yybbbbyy"
".ybbbby."
"..ybby.."
".y.yy.y."
@Sprite/enemy/warden_warn
palette = crypt
size = [8, 8]
pixels:
".y.yy.y."
"..ywwy.."
"..ykky.."
".yyyyyy."
"ycyyyycy"
".yyyyyy."
"..y..y.."
".yy..yy."
@Sprite/enemy/hit
palette = crypt
size = [8, 8]
pixels:
"..rrrr.."
"..rwwr.."
"...rr..."
".rrrrrr."
"r.rwwr.r"
"..rrrr.."
"..r..r.."
".rr..rr."
@Sprite/enemy/bolt
palette = crypt
size = [8, 8]
pixels:
"...rr..."
"..raar.."
".rayyar."
"raywwyar"
"raywwyar"
".rayyar."
"..raar.."
"...rr..."
@Sprite/world/warning
palette = crypt
size = [8, 8]
pixels:
"........"
"...yy..."
"..y..y.."
".y.yy.y."
".y.yy.y."
"..y..y.."
"...yy..."
"........"
@Sprite/world/trap
palette = crypt
size = [8, 8]
pixels:
"........"
"........"
"........"
".ssssss."
".skkksk."
".ssssss."
"kkkkkkkk"
"........"
@Sprite/world/trap_warn
palette = crypt
size = [8, 8]
pixels:
"........"
"...yy..."
"...yy..."
".yyyyyy."
".ykkkyk."
".yyyyyy."
"kkkkkkkk"
"........"
@Sprite/world/trap_active
palette = crypt
size = [8, 8]
pixels:
"..w..w.."
"..w..w.."
".rwr.wr."
".rwwwwr."
".rrrrrr."
".rrrrrr."
"kkkkkkkk"
"........"
@Sprite/world/chest
palette = crypt
size = [8, 8]
pixels:
"........"
"..aaaa.."
".ayyyya."
".akkkka."
".aayyaa."
".ayyyya."
".aaaaaa."
"kkkkkkkk"
@Sprite/world/chest_open
palette = crypt
size = [8, 8]
pixels:
"..aaaa.."
".ayyyya."
".aaaaaa."
".kkkkkk."
".akkkka."
".aaaaaa."
".aaaaaa."
"kkkkkkkk"
@Sprite/world/crack
palette = crypt
size = [8, 8]
pixels:
".ssssss."
".ssykss."
".ssksss."
".sskyss."
".syksss."
".ssskss."
".ssssss."
"kkkkkkkk"
@Sprite/world/tablet
palette = crypt
size = [8, 8]
pixels:
"..ssss.."
".slllls."
".lkkkkl."
".lklkkl."
".lkkkkl."
".lklkkl."
".slllls."
"kkkkkkkk"
@Sprite/world/shrine_spent
palette = crypt
size = [8, 8]
pixels:
"...dd..."
"..dssd.."
"...ss..."
"...ll..."
"..slls.."
".slllls."
".ssssss."
"kkkkkkkk"
@Sprite/enemy/warden
palette = crypt
size = [8, 8]
pixels:
".a.aa.a."
"..ayya.."
"..akka.."
".aaaaaa."
"asaaaasa"
".aaaaaa."
"..a..a.."
".aa..aa."
@Sprite/loot/shard
palette = crypt
size = [8, 8]
pixels:
"........"
"...c...."
"..ccc..."
".ccwcc.."
"..ccc..."
"...c...."
"...b...."
"........"
@Sprite/loot/potion
palette = crypt
size = [8, 8]
pixels:
"........"
"...aa..."
"...ww..."
"..wrrw.."
"..wrrw.."
"..rrrr.."
"...rr..."
"........"
@Sprite/world/shrine
palette = crypt
size = [8, 8]
pixels:
"...yy..."
"..yccy.."
"...cc..."
"...ll..."
"..slls.."
".slllls."
".ssssss."
"kkkkkkkk"
@Sprite/world/stairs
palette = crypt
size = [8, 8]
pixels:
"........"
"........"
"....ww.."
"...wss.."
"..wsss.."
".wssss.."
"wsssss.."
"kkkkkkkk"
@Sprite/world/heart
palette = crypt
size = [8, 8]
pixels:
".cc..cc."
"cwwccwwc"
"cwwwwwwc"
".cwwwwc."
"..cwwc.."
"...cc..."
"..slls.."
".ssssss."
@Sprite/weapon/sword
palette = crypt
size = [24, 24]
pixels:
"....................w..."
"...................ww..."
"..................wwl..."
".................wwwl..."
"................wwcls..."
"...............wwclsk..."
"..............wwclsk...."
".............wwclsk....."
"............wwclsk......"
"...........wwclsk......."
"..........wwclsk........"
".........wwclsk........."
"........wwclsk.........."
".......wwclsk..........."
"......wwclsk............"
".....ywclsk............."
"...kyyyylk.............."
"..kyyyaysk.............."
"...kkayak..............."
".....aaask.............."
".....aassk.............."
"......assdk............."
".......ddddk............"
"........ddddk..........."
@Sprite/weapon/swing
palette = crypt
size = [24, 24]
pixels:
"........................"
"........................"
"........................"
"........................"
"......................w."
"....................www."
"..................wwwls."
"................wwwclsk."
"..............wwwclsk..."
"............wwwclsk....."
"..........wwwclsk......."
"........wwwclsk........."
"......wwwclsk..........."
"....wwwclsk............."
"..ywwwclsk.............."
".kyyyylsk..............."
"..kyyaysk..............."
"...kayak................"
"....aaask..............."
"....aassk..............."
".....assdk.............."
"......ddddk............."
".......ddddk............"
"........ddddk..........."
@Sprite/weapon/cast
palette = crypt
size = [24, 24]
pixels:
"........................"
"............c..........."
".........c.....c........"
"...........ccc.........."
".........ccwwwcc........"
"........ccwywywcc......."
".......ccwwyyywwcc......"
".......cwywwwwwywc......"
".......ccwwyyywwcc......"
"........ccwywywcc......."
".........ccwwwcc........"
"...........ccc.........."
"........c.......c......."
"..........c.c..........."
".........a...a.........."
"........aa..aa.........."
"........aa.aaa.........."
"........aaaaas.........."
".........aaass.........."
".........aassk.........."
"..........assdk........."
"...........ddddk........"
"............ddddk......."
".............ddddk......"
combat.rune
@Logic/crypt
action enemy_death(foe):
death_model = "enemy/" + (foe.kind ? foe.kind : "skeleton")
death_z = foe.z ? foe.z : 0
death_scale = foe.scale ? foe.scale : 1
death_angle = foe.angle ? foe.angle : 0
death_effects.push(
{
"x": foe.x,
"y": foe.y,
"z": death_z,
"start_z": death_z,
"angle": death_angle,
"scale": death_scale,
"model": death_model,
"dissolve": 0,
"age": 0,
"visible": true
}
)
action update_deaths:
for remains in death_effects:
remains.age += 1
remains.z = remains.start_z - min(0.16, remains.age * 0.008)
remains.dissolve = clamp((remains.age - 4) / 26, 0, 1)
if remains.age >= 30:
remains.visible = false
death_effects = death_effects.filter(d => d.visible == true)
action take_damage(amount):
stop when health <= 0
stop when invulnerable > 0
health = max(0, health - max(1, amount - armor))
invulnerable = 12
flash = 6
sound.play "hurt"
action spawn_bolt(enemy, offset):
angle = enemy.aim + offset
projectiles.push(
{
"x": enemy.x,
"y": enemy.y,
"z": 0.5,
"angle": angle,
"vx": cos(angle) * 0.12,
"vy": sin(angle) * 0.12,
"model": "enemy/bolt",
"visible": true,
"life": 100,
"damage": 8 + level
}
)
action update_combat:
remaining = 0
nearest = 999
hint = ""
warnings = []
for bolt in projectiles:
if bolt.visible == true:
bolt.life -= 1
next = {"x": bolt.x + bolt.vx, "y": bolt.y + bolt.vy}
moved = slide(bolt.x, bolt.y, bolt.vx, bolt.vy, 0.08)
if sees(bolt, next) == false
|| abs(moved.x - next.x) > 0.01
|| abs(moved.y - next.y) > 0.01:
bolt.visible = false
if bolt.visible == true:
bolt.x = next.x
bolt.y = next.y
if distance(bolt, player) < 0.3:
bolt.visible = false
call take_damage bolt.damage
if bolt.life <= 0:
bolt.visible = false
projectiles = projectiles.filter(b => b.visible == true)
for enemy in enemies:
if enemy.visible == true && enemy.hp > 0:
remaining += 1
dist = distance(player, enemy)
if dist < nearest:
nearest = dist
directions = ["E", "SE", "S", "SW", "W", "NW", "N", "NE"]
heading = floor(((angle_to(player, enemy) + 382.5) % 360) / 45)
hint = " / HUNT " + directions[heading]
if !enemy.kind:
enemy.kind = "skeleton"
if !enemy.windup:
enemy.windup = 0
if !enemy.stagger:
enemy.stagger = 0
if !enemy.phase:
enemy.phase = 1
enemy.cooldown = max(0, enemy.cooldown - 1)
enemy.stagger = max(0, enemy.stagger - 1)
enemy.model = "enemy/" + enemy.kind
enemy.angle = angle_to(enemy, player)
enemy.z = 0
if enemy.kind == "wraith":
enemy.z = 0.06 + sin(clock * 6) * 0.04
if enemy.kind == "warden" && enemy.hp <= enemy.max_hp / 2 && enemy.phase == 1:
enemy.phase = 2
notice = "WARDEN ENRAGED - DODGE THE THREE BOLTS!"
notice_ticks = 90
enemy.cooldown = 0
sound.play "warning"
busy = enemy.windup > 0
if busy:
enemy.windup -= 1
enemy.model = "enemy/" + enemy.kind + "_warn"
if enemy.kind == "skeleton":
warnings.push(
{
"x": enemy.target.x,
"y": enemy.target.y,
"model": "world/warning",
"visible": true
}
)
if enemy.windup == 0:
if enemy.kind == "skeleton":
if distance(player, enemy.target) < 0.65
&& dist < 1.7
&& sees(enemy, player):
call take_damage (6 + level * 2)
enemy.cooldown = 36
if enemy.kind != "skeleton":
call spawn_bolt enemy, 0
if enemy.kind == "warden" && enemy.phase == 2:
call spawn_bolt enemy, -18
call spawn_bolt enemy, 18
enemy.cooldown = 65
if enemy.kind == "warden" && enemy.phase == 2:
enemy.cooldown = 36
if enemy.stagger > 0 && busy == false:
warnings.push(
{
"x": enemy.x,
"y": enemy.y,
"z": 0.65,
"angle": enemy.angle,
"model": "enemy/hit",
"visible": true
}
)
if busy == false && enemy.stagger == 0 && dist < 9 && sees(enemy, player):
angle = angle_to(enemy, player)
stride = 0.026 + level * 0.002
move = 0
if enemy.kind == "skeleton" && dist > 1.1:
move = stride
if enemy.kind != "skeleton" && dist > 5:
move = stride * 0.75
if enemy.kind == "wraith" && dist < 3:
move = -stride
if move != 0:
moved = slide(enemy.x, enemy.y, cos(angle) * move, sin(angle) * move, 0.24)
enemy.x = moved.x
enemy.y = moved.y
can_attack = enemy.kind != "skeleton" || dist < 1.5
if enemy.cooldown == 0 && can_attack:
enemy.windup = 24
if enemy.kind == "skeleton":
enemy.windup = 18
if enemy.kind == "warden":
enemy.windup = 30
enemy.aim = angle
enemy.target = {"x": player.x, "y": player.y}
enemy.model = "enemy/" + enemy.kind + "_warn"
sound.play "warning"
controls.rune
@Controls/crypt
keys:
KeyW -> forward
KeyS -> back
KeyA -> strafe_left
KeyD -> strafe_right
ArrowLeft -> turn_left
ArrowRight -> turn_right
Space -> fire
KeyQ -> spell
KeyE -> use
ShiftLeft -> dodge
ShiftRight -> dodge
commands:
Enter -> host.advance
KeyR -> train
KeyC -> cycle_choice
Digit1 -> select_one
Digit2 -> select_two
Digit3 -> select_three
KeyP -> host.pause
KeyT -> return_to_title
KeyM -> host.mute
KeyF -> host.fullscreen
F11 -> host.fullscreen
mouse:
Left -> fire
MoveX -> look_x
gamepad:
Axis0 -> {"input":"move_x","deadzone":0.18}
Axis1 -> {"input":"move_y","invert":true,"deadzone":0.18}
Axis2 -> {"input":"look_x","mode":"rate","scale":900,"deadzone":0.18}
Button7 -> fire
Button6 -> spell
Button0 -> use
Button1 -> dodge
Button2 -> {"command":"cycle_choice"}
Button3 -> {"command":"train"}
Button9 -> {"command":"host.pause"}
Button8 -> {"command":"host.advance"}
touch = {
"buttons": [
{"drag_x":"look_x","id":"fire","input":"fire","label":"SWORD","offset":[12,12],"size":60},
{"id":"use","input":"use","label":"USE","offset":[80,18],"size":48},
{"id":"spell","input":"spell","label":"RUNE","offset":[138,18],"size":48},
{"id":"dodge","input":"dodge","label":"DODGE","offset":[12,84],"size":48},
{
"anchor": "top-right",
"command": "cycle_choice",
"id": "build",
"label": "BUILD",
"offset": [12,36],
"size": 48
},
{
"anchor": "top-right",
"command": "host.pause",
"id": "pause",
"label": "PAUSE",
"offset": [72,36],
"size": 48
}
],
"joystick": {"size":96,"x":"move_x","y":"move_y"},
"look": {"sensitivity":1,"x":"look_x"}
}
exploration.rune
@Logic/crypt
action class_label:
class_name = "KNIGHT"
if hero_class == 1:
class_name = "ARCANIST"
if hero_class == 2:
class_name = "SCOUT"
action equip_class:
call class_label
if hero_class == 0:
armor = 2
if hero_class == 1:
max_health -= 20
damage -= 1
spell_power = 6
mana_max = 8
mana_rate = 60
if hero_class == 2:
max_health -= 10
move_speed = 0.09
attack_rate = 12
dodge_rate = 40
action cycle_choice:
if status != "playing":
hero_class = (hero_class + 1) % 3
legacy.class = hero_class
call class_label
message = "CLASS " + class_name + " / ENTER: NEW RUN"
if hero_class == 0:
message = "KNIGHT: 100 HP / ARMOR 2 / C: CLASS"
if hero_class == 1:
message = "ARCANIST: 80 HP / STRONG RUNES / C: CLASS"
if hero_class == 2:
message = "SCOUT: 90 HP / FAST DODGE / C: CLASS"
call refresh_ui
stop
if distance(player, exit_pos) < 0.8 && level < 5 && remaining == 0:
route_choice = (route_choice + 1) % 2
notice_ticks = 0
call refresh_ui
stop
reward_choice = (reward_choice + 1) % 3
notice = "BUILD " + (reward_choice == 0 ? "BLADE" : reward_choice == 1 ? "RUNE" : "GUARD") + " / E: CLAIM AT SHRINE OR CHEST"
notice_ticks = 45
call refresh_ui
action setup_exploration:
level_title = "ASHEN COURTYARD"
lore = "THE FIRST KNIGHTS LEFT THEIR BLADES HERE."
if level == 2:
level_title = "HALL OF WHISPERS"
lore = "WRAITHS AIM BEFORE CASTING. STRAFE THE GLOW."
if level == 3:
level_title = "THE SUNKEN OSSUARY"
lore = "THE GOLD CRACK HIDES THE PILGRIMS' CACHE."
if level == 4:
level_title = "THE CURSED APPROACH"
lore = "THE WARDEN SPLITS HIS WRATH AT HALF LIFE."
if level == 5:
level_title = "THE HEART VAULT"
lore = "THE HEART REMEMBERS EVERY FALLEN PILGRIM."
hazards = []
if level > 1:
hazards = [
{"x": 6.5, "y": 3.5, "model": "world/trap", "visible": true, "offset": 0},
{"x": 11.5, "y": 7.5, "model": "world/trap", "visible": true, "offset": 60}
]
notice = level_title + " / E: READ TABLETS"
notice_ticks = 60
action update_hazards:
for trap in hazards:
phase = (clock + trap.offset) % 120
trap.model = "world/trap"
if phase >= 70 && phase < 100:
trap.model = "world/trap_warn"
if phase >= 100:
trap.model = "world/trap_active"
if distance(player, trap) < 0.5:
call take_damage 12
action interact_exploration(pressed):
if distance(player, lore_pos) < 0.9:
message = "E: READ THE PILGRIM TABLET"
if pressed:
lore_read = true
notice = lore
notice_ticks = 150
if distance(player, secret_pos) < 0.9 && secret_found == false:
message = "E: SEARCH THE GOLD-FLECKED CRACK"
if pressed:
secret_found = true
legacy.shards += 3
health = min(max_health, health + 15)
landmarks[3].model = "world/chest_open"
notice = "SECRET CACHE! +3 SHARDS +15 HP"
notice_ticks = 90
sound.play "secret"
if distance(player, shrine_pos) < 1 && shrine_used == false:
reward = "BLADE +2 DAMAGE"
if reward_choice == 1:
reward = "RUNE +2 POWER +1 MAX MANA"
if reward_choice == 2:
reward = "GUARD +25 MAX HP"
message = "E: " + reward + " / C: CHOOSE"
if pressed:
shrine_used = true
landmarks[0].model = "world/shrine_spent"
if reward_choice == 0:
damage += 2
if reward_choice == 1:
spell_power += 2
mana_max += 1
ammo = mana_max
if reward_choice == 2:
max_health += 25
health = min(max_health, health + 25)
notice = "SHRINE: " + reward
notice_ticks = 90
sound.play "blessing"
if distance(player, chest_pos) < 0.9 && chest_opened == false:
reward = "FANG: FAST SWORD"
if reward_choice == 1:
reward = "LANTERN: FAST MANA"
if reward_choice == 2:
reward = "AEGIS: +2 ARMOR"
message = "E: EQUIP " + reward + " / C: CHOOSE"
if pressed:
chest_opened = true
landmarks[2].model = "world/chest_open"
if relic == "FANG":
attack_rate += 3
if relic == "LANTERN":
mana_rate += 30
if relic == "AEGIS":
armor -= 2
relic = "FANG"
if reward_choice == 0:
attack_rate -= 3
if reward_choice == 1:
relic = "LANTERN"
mana_rate -= 30
if reward_choice == 2:
relic = "AEGIS"
armor += 2
notice = "EQUIPPED " + relic + " - ONE RELIC SLOT"
notice_ticks = 90
sound.play "blessing"
logic.rune
@Logic/crypt
state:
status = "title"
legacy = {"shards": 0, "rank": 0, "runs": 0, "wins": 0, "class": 0}
hero_class = 0
class_name = "KNIGHT"
armor = 0
spell_power = 3
mana_max = 6
mana_rate = 90
move_speed = 0.075
attack_rate = 15
dodge_rate = 60
dodge_cooldown = 0
dodge_ticks = 0
dodge_x = 0
dodge_y = 0
invulnerable = 0
dodge_held = false
relic = "NONE"
route_choice = 0
route = 0
reward_choice = 0
chest_opened = false
secret_found = false
lore_read = false
chest_pos = {"x": 11.5, "y": 1.5}
secret_pos = {"x": 1.5, "y": 11.5}
lore_pos = {"x": 1.5, "y": 5.5}
level_title = "THE ASHEN COURTYARD"
lore = ""
projectiles = []
hazards = []
warnings = []
death_effects = []
remaining = 0
hint = ""
level = 1
level_map = "courtyard"
health = 100
max_health = 100
ammo = 6
score = 0
kills = 0
damage = 3
xp = 0
rpg_level = 1
clock = 0
run_seed = 731
cooldown = 0
flash = 0
use_held = false
spell_held = false
shrine_used = false
notice = ""
notice_ticks = 0
message = ""
player = {"x": 1.5, "y": 1.5, "angle": 0}
weapon = {"sprite": "weapon/sword", "bob": 0}
enemies = []
pickups = []
landmarks = []
shrine_pos = {"x": 6.5, "y": 1.5}
exit_pos = {"x": 11.5, "y": 11.5}
derive:
hud_text from health:
_ then "D" + level + " HP " + health + "/" + max_health + " MP " + ammo + " L" + rpg_level + " XP" + xp + "/3 SH" + legacy.shards + (dodge_cooldown == 0 ? " DODGE OK" : " DODGE " + ceil(dodge_cooldown / 30))
action initialize:
hero_class = clamp(legacy.class, 0, 2)
call class_label
call setup_depth
status = "title"
message = "C: CLASS " + class_name + " / R: TRAIN 5 SHARDS"
player = {"x": 8.5, "y": 10.5, "angle": 20}
weapon = {"sprite": "", "bob": 0}
call play_score "crypt_title"
call refresh_ui
action return_to_title:
level = 1
camp_feedback = ""
call initialize
action train:
stop when status == "playing"
if legacy.rank >= 10:
message = "TRAINING COMPLETE - RANK 10"
camp_feedback = message
call refresh_ui
stop
if legacy.shards < 5:
message = "TRAINING NEEDS 5 SHARDS / HAVE " + legacy.shards
camp_feedback = message
call refresh_ui
stop
legacy.shards -= 5
legacy.rank += 1
message = "LEGACY RANK " + legacy.rank + " - NEXT RUN +HP +DAMAGE"
camp_feedback = message
sound.play "blessing"
call refresh_ui
action advance:
call start
action start:
camp_feedback = ""
legacy.runs += 1
run_seed = random(1, 1000000000)
level = 1
max_health = 100 + legacy.rank * 10
health = max_health
damage = 3 + legacy.rank
armor = 0
spell_power = 3
mana_max = 6
mana_rate = 90
move_speed = 0.075
attack_rate = 15
dodge_rate = 60
relic = "NONE"
route = 0
route_choice = 0
reward_choice = 0
call equip_class
health = max_health
ammo = mana_max
score = 0
kills = 0
xp = 0
rpg_level = 1
clock = 0
status = "playing"
use_held = false
spell_held = false
dodge_held = false
learned_move = false
learned_sword = false
learned_rune = false
learned_dodge = false
call setup_depth
call play_score "crypt_dungeon"
action setup_depth:
level_map = "courtyard"
if level == 2:
level_map = "crypt_a"
if route == 1 || random(0, 1, run_seed + level * 101) == 1:
level_map = "crypt_b"
if level == 3:
level_map = "ossuary"
if level == 4:
level_map = "approach"
if level == 5:
level_map = "vault"
player = map_spawn(level_map)
cooldown = 0
flash = 0
dodge_cooldown = 0
dodge_ticks = 0
invulnerable = 0
projectiles = []
warnings = []
death_effects = []
shrine_used = false
chest_opened = false
secret_found = false
lore_read = false
route_choice = 0
notice = ""
notice_ticks = 0
weapon = {"sprite": "weapon/sword", "bob": 0, "x": 34, "y": -12}
weapon_ticks = 0
weapon_magic = false
landmarks = [
{"x": 6.5, "y": 1.5, "model": "world/shrine", "angle": 180, "visible": true},
{"x": 11.5, "y": 11.5, "model": "world/stairs", "angle": 0, "scale": 0.7, "visible": true},
{"x": 11.5, "y": 1.5, "model": "world/chest", "angle": 180, "visible": true},
{"x": 1.5, "y": 11.5, "model": "world/crack", "angle": 270, "visible": true},
{"x": 1.5, "y": 5.5, "model": "world/tablet", "angle": 270, "visible": true}
]
if level == 5:
landmarks[1] = {"x": 11.5, "y": 11.5, "model": "world/heart", "angle": 225, "visible": true}
enemies = []
slots = [
{"x": 9.5, "y": 3.5},
{"x": 3.5, "y": 7.5},
{"x": 9.5, "y": 9.5},
{"x": 6.5, "y": 11.5},
{"x": 6.5, "y": 5.5},
{"x": 3.5, "y": 3.5},
{"x": 6.5, "y": 9.5}
]
index = 0
for pos in slots:
if index < level + 2:
kind = "skeleton"
if index % 2 == 1:
kind = "wraith"
enemy_hp = 5 + level * 2
if route == 1:
enemy_hp += 3
if level == 5 && index == 6:
kind = "warden"
enemy_hp = 42
enemy_model = "enemy/" + kind
facing = angle_to(pos, player)
enemies.push(
{
"x": pos.x,
"y": pos.y,
"model": enemy_model,
"angle": facing,
"kind": kind,
"hp": enemy_hp,
"max_hp": enemy_hp,
"visible": true,
"cooldown": 30 + index * 12,
"windup": 0,
"stagger": 0,
"phase": 1,
"scale": 0.8
}
)
index += 1
pickups = [
{"x": 3.5, "y": 1.5, "model": "loot/shard", "kind": "shard", "visible": true},
{"x": 1.5, "y": 9.5, "model": "loot/potion", "kind": "health", "visible": true}
]
supply = random(0, 1, run_seed + level * 401)
if supply == 1:
pickups.push({"x": 11.5, "y": 5.5, "model": "loot/potion", "kind": "health", "visible": true})
if supply == 0:
pickups.push({"x": 11.5, "y": 5.5, "model": "loot/shard", "kind": "shard", "visible": true})
call setup_exploration
remaining = enemies.length
call refresh_ui
action attack(magic):
stop when status != "playing"
if cooldown > 0:
notice = "WEAPON RECOVERING - KEEP MOVING"
notice_ticks = 20
call refresh_ui
stop
reach = 1.35
power = damage
arc = 40
if magic == true:
if ammo <= 0:
notice = "NO MANA - USE YOUR SWORD WHILE MANA REGENERATES"
notice_ticks = 60
call refresh_ui
stop
learned_rune = true
ammo -= 1
reach = 9
power = damage + spell_power
arc = 12
sound.play "rune"
if magic == false:
learned_sword = true
sound.play "sword"
cooldown = attack_rate
weapon_ticks = 10
weapon_magic = magic
call animate_weapon
target = -1
nearest = reach
index = 0
for enemy in enemies:
if enemy.visible == true && enemy.hp > 0:
dist = distance(player, enemy)
aim = abs((angle_to(player, enemy) - player.angle + 540) % 360 - 180)
if dist < nearest && aim < arc && sees(player, enemy):
target = index
nearest = dist
index += 1
if target >= 0:
enemies[target].hp -= power
if magic == false:
enemies[target].stagger = 8
enemies[target].windup = 0
enemies[target].cooldown = max(20, enemies[target].cooldown)
notice = "HIT " + power + " / FOE HP " + max(0, enemies[target].hp)
notice_ticks = 24
if enemies[target].hp <= 0:
call enemy_death enemies[target]
enemies[target].visible = false
kills += 1
xp += 1
score += 100 * level
legacy.shards += 1
if route == 1:
legacy.shards += 1
sound.play "shard"
if xp >= 3:
xp = 0
rpg_level += 1
damage += 2
max_health += 10
health = min(max_health, health + 25)
notice = "LEVEL UP! +DAMAGE +HP"
notice_ticks = 90
sound.play "blessing"
if target < 0:
notice = magic == true
? "RUNE MISSED - AIM THE CROSSHAIR AT A FOE"
: "SWORD MISSED - GET CLOSER TO THE FOE"
notice_ticks = 30
call refresh_ui
action tick(input):
stop when status != "playing"
use_pressed = input.use == true && use_held == false
spell_pressed = input.spell == true && spell_held == false
dodge_pressed = input.dodge == true && dodge_held == false
use_held = input.use == true
spell_held = input.spell == true
dodge_held = input.dodge == true
clock += 1
call update_deaths
cooldown = max(0, cooldown - 1)
flash = max(0, flash - 1)
notice_ticks = max(0, notice_ticks - 1)
dodge_cooldown = max(0, dodge_cooldown - 1)
invulnerable = max(0, invulnerable - 1)
weapon_ticks = max(0, weapon_ticks - 1)
call animate_weapon
if clock % mana_rate == 0:
ammo = min(mana_max, ammo + 1)
turn = 0
if input.turn_left == true:
turn -= 4
if input.turn_right == true:
turn += 4
if input.look_x:
turn += input.look_x * 0.15
player.angle = ((player.angle + turn) % 360 + 360) % 360
fwd = 0
strafe = 0
if input.forward == true:
fwd += move_speed
if input.back == true:
fwd -= move_speed
if input.strafe_left == true:
strafe -= move_speed
if input.strafe_right == true:
strafe += move_speed
if input.move_y:
fwd += clamp(input.move_y, -1, 1) * move_speed
if input.move_x:
strafe += clamp(input.move_x, -1, 1) * move_speed
fwd = clamp(fwd, -move_speed, move_speed)
strafe = clamp(strafe, -move_speed, move_speed)
length = sqrt(fwd * fwd + strafe * strafe)
if length > move_speed:
fwd = fwd / length * move_speed
strafe = strafe / length * move_speed
dx = cos(player.angle) * fwd - sin(player.angle) * strafe
dy = sin(player.angle) * fwd + cos(player.angle) * strafe
if dodge_pressed && dodge_cooldown == 0:
learned_dodge = true
dodge_cooldown = dodge_rate
dodge_ticks = 8
invulnerable = 8
dodge_x = -cos(player.angle) * 0.18
dodge_y = -sin(player.angle) * 0.18
if length > 0:
dodge_x = dx / sqrt(dx * dx + dy * dy) * 0.18
dodge_y = dy / sqrt(dx * dx + dy * dy) * 0.18
sound.play "dodge"
if dodge_ticks > 0:
dx = dodge_x
dy = dodge_y
dodge_ticks -= 1
moved = slide(player.x, player.y, dx, dy, 0.25)
player.x = moved.x
player.y = moved.y
if fwd != 0 || strafe != 0:
learned_move = true
weapon.bob += 0.25
if fwd == 0 && strafe == 0:
weapon.bob = 0
if spell_pressed:
call attack true
if input.fire == true:
call attack false
for item in pickups:
if item.kind == "shard":
item.angle = clock * 3
item.z = 0.08 + sin(clock * 6) * 0.04
if item.visible == true && distance(player, item) < 0.55:
if item.kind == "shard":
legacy.shards += 2
item.visible = false
sound.play "shard"
if item.kind == "health" && health < max_health:
health = min(max_health, health + 35)
item.visible = false
sound.play "blessing"
call update_combat
call update_hazards
if health <= 0:
status = "gameover"
call play_score "crypt_title"
message = "SHARDS KEPT " + legacy.shards + " / R: TRAIN AT CAMP"
call refresh_ui
stop
message = level_title + " / " + class_name + " / " + relic + " / FOES " + remaining + hint
call interact_exploration use_pressed
if distance(player, exit_pos) < 0.8:
message = "STAIRS SEALED - DEFEAT ALL FOES"
if remaining == 0:
message = "E: SANCTUARY +25 HP / C: CHANGE ROUTE"
if route_choice == 1:
message = "E: CURSED +FOE HP +SHARDS / C: ROUTE"
if level == 5:
message = "E: CLAIM THE RUNE HEART"
if use_pressed:
call use_exit
stop
if notice_ticks > 0:
message = notice
call refresh_ui
action use_exit:
stop when status != "playing"
stop when distance(player, exit_pos) >= 0.8 || remaining > 0
if level == 5:
status = "won"
call play_score "crypt_victory"
legacy.wins += 1
legacy.shards += 5
message = "HEART CLAIMED! +5 SHARDS / R: TRAIN"
sound.play "blessing"
call refresh_ui
stop
level += 1
route = route_choice
if route == 0:
health = min(max_health, health + 25)
ammo = mana_max
call setup_depth
if level == 5:
call play_score "crypt_warden"
maps.rune
# All layouts are authored and connected. Depth two has two crypt variants.
@Map/courtyard
spawn = {"x":1.5,"y":1.5,"angle":0}
floor = stone/moss
sky = {"seed":731,"zenith":"#202c55","horizon":"#bd8b83","cloud":"#c0bdcf","speed":0.35}
legend = {
"#": {"wall":"stone/moss_wall"},
".": {},
"P": {"wall":"stone/pillar"},
"X": {"wall":"stone/cracked"}
}
grid:
"#############"
"#...........#"
"#..P.....P..#"
"#...........#"
"#....#X#....#"
"#....X.X....#"
"#...........#"
"#....X.X....#"
"#....#X#....#"
"#...........#"
"#..P.....P..#"
"#...........#"
"#############"
@Map/crypt_a
ceiling_height = 1.5
spawn = {"x":1.5,"y":1.5,"angle":0}
floor = stone/floor
ceiling = stone/ceiling
legend = {"#":{"wall":"stone/wall"},"P":{"wall":"stone/pillar"},"X":{"wall":"stone/cracked"},".":{}}
grid:
"#############"
"#...........#"
"#.#X#...#X#.#"
"#.#.......#.#"
"#.#.P...P.#.#"
"#...........#"
"#....#X#....#"
"#...........#"
"#.#.P...P.#.#"
"#.#.......#.#"
"#.#X#...#X#.#"
"#...........#"
"#############"
@Map/crypt_b
ceiling_height = 1.5
spawn = {"x":1.5,"y":1.5,"angle":90}
floor = stone/moss
ceiling = stone/ceiling
legend = {
"#": {"wall":"stone/cracked"},
".": {},
"M": {"wall":"stone/moss_wall"},
"P": {"wall":"stone/pillar"}
}
grid:
"#############"
"#...........#"
"#.###...###.#"
"#...........#"
"#...M...M...#"
"#...M...M...#"
"#.P.#...#.P.#"
"#...M...M...#"
"#...#...#...#"
"#...........#"
"#.###...###.#"
"#...........#"
"#############"
@Map/vault
ceiling_height = 3
spawn = {"x":1.5,"y":1.5,"angle":0}
floor = rune/floor
ceiling = rune/ceiling
legend = {"#":{"wall":"rune/wall"},"P":{"wall":"stone/pillar"},"S":{"wall":"rune/seal"},".":{}}
grid:
"##S###S###S##"
"#...........#"
"#..P.....P..#"
"#...........#"
"#.P.......P.#"
"#...........#"
"#....P.P....#"
"#...........#"
"#.P.......P.#"
"#...........#"
"#..P.....P..#"
"#...........#"
"##S###S###S##"
@Map/ossuary
ceiling_height = 2
spawn = {"x":1.5,"y":1.5,"angle":90}
floor = stone/moss
ceiling = rune/ceiling
legend = {
"#": {"wall":"stone/ossuary"},
".": {},
"P": {"wall":"stone/pillar"},
"X": {"wall":"stone/cracked"}
}
grid:
"#############"
"#...........#"
"#.PP...PP...#"
"#...........#"
"#.#X.....X#.#"
"#...........#"
"#.P..P.P..P.#"
"#...........#"
"#.#X.....X#.#"
"#...........#"
"#...PP...PP.#"
"#...........#"
"#############"
@Map/approach
ceiling_height = 2.5
spawn = {"x":1.5,"y":1.5,"angle":0}
floor = rune/floor
ceiling = stone/ceiling
legend = {
"#": {"wall":"rune/wall"},
".": {},
"P": {"wall":"stone/pillar"},
"S": {"wall":"rune/seal"},
"X": {"wall":"stone/cracked"}
}
grid:
"#############"
"#...........#"
"#.#S#.X.#S#.#"
"#...........#"
"#.#.#...#.#.#"
"#...........#"
"#.#.S.X.S.#.#"
"#...........#"
"#.#.#...#.#.#"
"#...........#"
"#.#S#.X.#S#.#"
"#...........#"
"#############"
models.rune
# Coordinates are [x, y, z]; z points up. Four solid steps rise along local +y.
# One unit is a quarter tile; the footprint is centered on the instance.
@Model/world/stairs
palette = crypt
unit = 0.25
blocks:
{"from":[-2,-2,0],"size":[4,1,1],"color":"s"}
{"from":[-2,-1,0],"size":[4,1,2],"color":"l"}
{"from":[-2,0,0],"size":[4,1,3],"color":"s"}
{"from":[-2,1,0],"size":[4,1,4],"color":"l"}
# Creatures face local +x. Feet rest on z=0; combat rotates them toward the player.
@Model/enemy/skeleton
palette = crypt
unit = 0.0625
blocks:
{"from":[-2,-3,0],"size":[5,2,1],"color":"s"}
{"from":[-2,1,0],"size":[5,2,1],"color":"s"}
{"from":[-1,-3,1],"size":[2,2,5],"color":"w"}
{"from":[-1,1,1],"size":[2,2,5],"color":"w"}
{"from":[-1,-3,6],"size":[2,6,2],"color":"l"}
{"from":[-1,-1,8],"size":[2,2,4],"color":"w"}
{"from":[-1,-3,8],"size":[2,6,1],"color":"w"}
{"from":[-1,-3,10],"size":[2,6,1],"color":"w"}
{"from":[-2,-4,12],"size":[4,8,1],"color":"w"}
{"from":[-1,-5,8],"size":[2,2,5],"color":"w"}
{"from":[-1,3,8],"size":[2,2,5],"color":"w"}
{"from":[-2,-3,13],"size":[5,6,4],"color":"w"}
{"from":[3,-2,15],"size":[1,1,1],"color":"r"}
{"from":[3,1,15],"size":[1,1,1],"color":"r"}
{"from":[3,-2,13],"size":[1,4,1],"color":"k"}
{"from":[0,-6,9],"size":[3,4,1],"color":"a"}
{"from":[1,-5,10],"size":[1,1,6],"color":"c"}
@Model/enemy/skeleton_warn
palette = crypt
unit = 0.0625
blocks:
{"from":[-2,-3,0],"size":[5,2,1],"color":"s"}
{"from":[-2,1,0],"size":[5,2,1],"color":"s"}
{"from":[-1,-3,1],"size":[2,2,5],"color":"y"}
{"from":[-1,1,1],"size":[2,2,5],"color":"y"}
{"from":[-1,-3,6],"size":[2,6,2],"color":"a"}
{"from":[-1,-1,8],"size":[2,2,4],"color":"y"}
{"from":[-1,-3,8],"size":[2,6,1],"color":"y"}
{"from":[-1,-3,10],"size":[2,6,1],"color":"y"}
{"from":[-2,-4,12],"size":[4,8,1],"color":"y"}
{"from":[-1,-5,8],"size":[2,2,5],"color":"y"}
{"from":[-1,3,8],"size":[2,2,5],"color":"y"}
{"from":[-2,-3,13],"size":[5,6,4],"color":"y"}
{"from":[3,-2,15],"size":[1,1,1],"color":"r"}
{"from":[3,1,15],"size":[1,1,1],"color":"r"}
{"from":[3,-2,13],"size":[1,4,1],"color":"k"}
{"from":[0,-6,12],"size":[3,4,1],"color":"a"}
{"from":[1,-5,13],"size":[1,1,6],"color":"y"}
@Model/enemy/wraith
palette = crypt
unit = 0.0625
blocks:
{"from":[-3,-4,2],"size":[5,8,2],"color":"b"}
{"from":[-3,-3,4],"size":[5,6,6],"color":"b"}
{"from":[-2,-4,10],"size":[5,8,3],"color":"b"}
{"from":[-2,-3,13],"size":[5,6,4],"color":"b"}
{"from":[3,-2,13],"size":[1,4,3],"color":"k"}
{"from":[4,-2,15],"size":[1,1,1],"color":"c"}
{"from":[4,1,15],"size":[1,1,1],"color":"c"}
{"from":[-1,-6,8],"size":[3,2,5],"color":"b"}
{"from":[-1,4,8],"size":[3,2,5],"color":"b"}
{"from":[2,-6,8],"size":[3,2,2],"color":"c"}
{"from":[2,4,8],"size":[3,2,2],"color":"c"}
{"from":[-2,-3,0],"size":[2,1,3],"color":"c"}
{"from":[-2,2,1],"size":[2,1,2],"color":"c"}
@Model/enemy/wraith_warn
palette = crypt
unit = 0.0625
blocks:
{"from":[-3,-4,2],"size":[5,8,2],"color":"a"}
{"from":[-3,-3,4],"size":[5,6,6],"color":"a"}
{"from":[-2,-4,10],"size":[5,8,3],"color":"y"}
{"from":[-2,-3,13],"size":[5,6,4],"color":"y"}
{"from":[3,-2,13],"size":[1,4,3],"color":"k"}
{"from":[4,-2,15],"size":[1,1,1],"color":"y"}
{"from":[4,1,15],"size":[1,1,1],"color":"y"}
{"from":[-1,-6,10],"size":[3,2,5],"color":"y"}
{"from":[-1,4,10],"size":[3,2,5],"color":"y"}
{"from":[2,-6,12],"size":[3,2,2],"color":"y"}
{"from":[2,4,12],"size":[3,2,2],"color":"y"}
{"from":[-2,-3,0],"size":[2,1,3],"color":"y"}
{"from":[-2,2,1],"size":[2,1,2],"color":"y"}
@Model/enemy/warden
palette = crypt
unit = 0.0625
blocks:
{"from":[-3,-4,0],"size":[7,3,2],"color":"s"}
{"from":[-3,1,0],"size":[7,3,2],"color":"s"}
{"from":[-2,-4,2],"size":[4,3,5],"color":"l"}
{"from":[-2,1,2],"size":[4,3,5],"color":"l"}
{"from":[-3,-4,7],"size":[6,8,7],"color":"s"}
{"from":[3,-3,8],"size":[1,6,5],"color":"r"}
{"from":[-3,-7,12],"size":[6,3,3],"color":"l"}
{"from":[-3,4,12],"size":[6,3,3],"color":"l"}
{"from":[-2,-7,7],"size":[4,2,5],"color":"s"}
{"from":[-2,5,7],"size":[4,2,5],"color":"s"}
{"from":[-3,-3,14],"size":[6,6,5],"color":"l"}
{"from":[3,-2,16],"size":[1,4,1],"color":"r"}
{"from":[-2,-4,18],"size":[2,2,3],"color":"y"}
{"from":[-2,2,18],"size":[2,2,3],"color":"y"}
{"from":[-4,-3,5],"size":[1,6,11],"color":"r"}
{"from":[1,-9,9],"size":[2,6,1],"color":"a"}
{"from":[1,-7,10],"size":[2,2,10],"color":"c"}
@Model/enemy/warden_warn
palette = crypt
unit = 0.0625
blocks:
{"from":[-3,-4,0],"size":[7,3,2],"color":"s"}
{"from":[-3,1,0],"size":[7,3,2],"color":"s"}
{"from":[-2,-4,2],"size":[4,3,5],"color":"a"}
{"from":[-2,1,2],"size":[4,3,5],"color":"a"}
{"from":[-3,-4,7],"size":[6,8,7],"color":"y"}
{"from":[3,-3,8],"size":[1,6,5],"color":"r"}
{"from":[-3,-7,12],"size":[6,3,3],"color":"y"}
{"from":[-3,4,12],"size":[6,3,3],"color":"y"}
{"from":[-2,-7,7],"size":[4,2,5],"color":"a"}
{"from":[-2,5,7],"size":[4,2,5],"color":"a"}
{"from":[-3,-3,14],"size":[6,6,5],"color":"y"}
{"from":[3,-2,16],"size":[1,4,1],"color":"r"}
{"from":[-2,-4,18],"size":[2,2,3],"color":"y"}
{"from":[-2,2,18],"size":[2,2,3],"color":"y"}
{"from":[-4,-3,5],"size":[1,6,11],"color":"r"}
{"from":[1,-9,12],"size":[2,6,1],"color":"a"}
{"from":[1,-7,13],"size":[2,2,10],"color":"y"}
@Model/enemy/hit
palette = crypt
unit = 0.0625
blocks:
{"from":[-1,-4,0],"size":[2,8,2],"color":"r"}
{"from":[-1,-1,-3],"size":[2,2,8],"color":"a"}
@Model/enemy/bolt
palette = crypt
unit = 0.0625
blocks:
{"from":[-2,-1,-1],"size":[4,2,2],"color":"c"}
{"from":[-1,-2,-1],"size":[2,4,2],"color":"b"}
{"from":[-1,-1,-2],"size":[2,2,4],"color":"w"}
@Model/loot/shard
palette = crypt
unit = 0.0625
blocks:
{"from":[-1,-1,0],"size":[2,2,2],"color":"a"}
{"from":[-2,-2,2],"size":[4,4,3],"color":"y"}
{"from":[-1,-1,5],"size":[2,2,2],"color":"w"}
@Model/loot/potion
palette = crypt
unit = 0.0625
blocks:
{"from":[-2,-2,0],"size":[4,4,1],"color":"s"}
{"from":[-3,-3,1],"size":[6,6,4],"color":"r"}
{"from":[-3,-3,5],"size":[6,6,1],"color":"c"}
{"from":[-1,-1,6],"size":[2,2,2],"color":"c"}
{"from":[-1,-1,8],"size":[2,2,1],"color":"a"}
{"from":[3,-1,2],"size":[1,2,2],"color":"w"}
@Model/world/shrine
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,2],"color":"s"}
{"from":[-3,-3,2],"size":[6,6,7],"color":"l"}
{"from":[-5,-5,9],"size":[10,10,2],"color":"w"}
{"from":[-2,-2,11],"size":[4,4,3],"color":"c"}
{"from":[-1,-1,14],"size":[2,2,2],"color":"y"}
@Model/world/shrine_spent
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,2],"color":"s"}
{"from":[-3,-3,2],"size":[6,6,7],"color":"l"}
{"from":[-5,-5,9],"size":[10,10,2],"color":"w"}
{"from":[-2,-2,11],"size":[4,4,2],"color":"d"}
@Model/world/chest
palette = crypt
unit = 0.0625
blocks:
{"from":[-4,-5,0],"size":[8,10,5],"color":"a"}
{"from":[-4,-5,5],"size":[8,10,2],"color":"m"}
{"from":[-5,-5,0],"size":[1,10,7],"color":"s"}
{"from":[4,-5,0],"size":[1,10,7],"color":"s"}
{"from":[-4,-4,7],"size":[8,2,1],"color":"y"}
{"from":[-4,2,7],"size":[8,2,1],"color":"y"}
{"from":[4,-1,3],"size":[2,2,2],"color":"y"}
@Model/world/chest_open
palette = crypt
unit = 0.0625
blocks:
{"from":[-4,-5,0],"size":[8,10,1],"color":"a"}
{"from":[-4,-5,1],"size":[8,1,4],"color":"a"}
{"from":[-4,4,1],"size":[8,1,4],"color":"a"}
{"from":[3,-5,1],"size":[1,10,4],"color":"a"}
{"from":[-5,-5,0],"size":[1,10,10],"color":"m"}
{"from":[-5,-5,8],"size":[1,10,2],"color":"y"}
{"from":[-3,-4,1],"size":[6,8,1],"color":"k"}
{"from":[4,-1,3],"size":[2,2,2],"color":"y"}
@Model/world/crack
palette = crypt
unit = 0.0625
blocks:
{"from":[-2,-4,0],"size":[4,8,11],"color":"s"}
{"from":[2,-2,1],"size":[1,1,4],"color":"y"}
{"from":[2,-1,4],"size":[1,1,3],"color":"y"}
{"from":[2,0,7],"size":[1,1,3],"color":"y"}
{"from":[2,2,2],"size":[1,1,2],"color":"a"}
@Model/world/tablet
palette = crypt
unit = 0.0625
blocks:
{"from":[-3,-5,0],"size":[6,10,2],"color":"s"}
{"from":[-1,-4,2],"size":[2,8,10],"color":"l"}
{"from":[1,-3,8],"size":[1,6,1],"color":"c"}
{"from":[1,-3,6],"size":[1,4,1],"color":"w"}
{"from":[1,-3,4],"size":[1,5,1],"color":"w"}
@Model/world/heart
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,2],"color":"s"}
{"from":[-3,-3,2],"size":[6,6,4],"color":"l"}
{"from":[-2,-2,7],"size":[4,4,3],"color":"r"}
{"from":[-2,-3,10],"size":[4,6,2],"color":"r"}
{"from":[-1,-2,12],"size":[2,1,2],"color":"a"}
{"from":[-1,1,12],"size":[2,1,2],"color":"a"}
{"from":[2,-1,9],"size":[1,2,2],"color":"y"}
@Model/world/warning
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,1,1],"color":"y"}
{"from":[-5,4,0],"size":[10,1,1],"color":"y"}
{"from":[-5,-4,0],"size":[1,8,1],"color":"y"}
{"from":[4,-4,0],"size":[1,8,1],"color":"y"}
@Model/world/trap
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,1],"color":"s"}
{"from":[-3,-3,1],"size":[2,2,1],"color":"k"}
{"from":[1,-3,1],"size":[2,2,1],"color":"k"}
{"from":[-3,1,1],"size":[2,2,1],"color":"k"}
{"from":[1,1,1],"size":[2,2,1],"color":"k"}
@Model/world/trap_warn
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,1],"color":"y"}
{"from":[-3,-3,1],"size":[2,2,2],"color":"a"}
{"from":[1,-3,1],"size":[2,2,2],"color":"a"}
{"from":[-3,1,1],"size":[2,2,2],"color":"a"}
{"from":[1,1,1],"size":[2,2,2],"color":"a"}
@Model/world/trap_active
palette = crypt
unit = 0.0625
blocks:
{"from":[-5,-5,0],"size":[10,10,1],"color":"r"}
{"from":[-3,-3,1],"size":[2,2,6],"color":"r"}
{"from":[1,-3,1],"size":[2,2,6],"color":"r"}
{"from":[-3,1,1],"size":[2,2,6],"color":"r"}
{"from":[1,1,1],"size":[2,2,6],"color":"r"}
shell.rune
@Page/crypt_cabinet
title = Rune Crypt - The crypt remembers.
logic = crypt_cabinet
style = crypt_cabinet
view:
main .cabinet:
header:
h1 "RUNE CRYPT"
p "A FIVE-DEPTH DUNGEON ADVENTURE"
p .intro "Choose a class. Clear each depth. Claim the Rune Heart. Shards survive every run."
p .music-note "Original chiptune soundtrack. Select a class to hear the title theme; Sound / M mutes music and effects."
div .toolbar:
button .primary data-pixel-start=true data-pixel-confirm="End this run and start over? Your shards are kept, but run upgrades reset." "Begin a new run"
button data-pixel-pause=true "Pause / P"
button data-pixel-fullscreen=true "Fullscreen"
button data-pixel-mute=true "Sound / M"
div .game-info data-pixel-hidden=resources_hidden:
p data-pixel-text=ui.objective "Your objective"
p data-pixel-text=ui_resources "Your resources"
div .game-surface:
canvas data-rune-pixel-3d=true tabindex=0 aria-label="Rune Crypt. C chooses class at camp, Enter begins. WASD move, mouse or arrows look, Space sword, Q rune, Shift dodge, E interact, C cycle reward or exit route, R train at camp."
button .fullscreen-exit .fullscreen-exit-hud data-pixel-hidden=camp_locked data-pixel-fullscreen=true "Exit fullscreen"
div .pause-menu data-pixel-paused=true hidden=true role=group aria-label="Pause menu":
h2 "PAUSED"
p data-pixel-text=ui.objective "Depth status"
p data-pixel-text=ui_resources "Health, mana and dodge"
p data-pixel-text=ui_run_status "Level and defeated foes"
p data-pixel-text=ui_summary "Run status"
div .pause-actions:
button data-pixel-pause=true "Resume / P"
button data-pixel-restart=true "Return to title / T"
button .fullscreen-exit data-pixel-fullscreen=true "Exit fullscreen"
p "Returning to title ends this run. Saved shards and training are kept."
p data-pixel-status=true role=status aria-live=polite "Enter the crypt."
p .summary data-pixel-text=ui_summary "Your adventurer"
div .choices role=group aria-label="Class, upgrade or route selection" data-pixel-hidden=choice_locked:
button data-pixel-action=select_choice data-pixel-args="[0]" data-pixel-text=ui_choice_one data-pixel-disabled=choice_locked data-pixel-selected=selected_one "Knight - recommended"
button data-pixel-action=select_choice data-pixel-args="[1]" data-pixel-text=ui_choice_two data-pixel-disabled=choice_locked data-pixel-selected=selected_two "Arcanist"
button data-pixel-action=select_choice data-pixel-args="[2]" data-pixel-text=ui_choice_three data-pixel-disabled=third_choice_locked data-pixel-selected=selected_three "Scout"
div .toolbar:
button data-pixel-action=confirm_choice data-pixel-disabled=confirm_locked "Confirm choice / E"
button data-pixel-action=train data-pixel-disabled=train_locked "Train: 5 shards / R"
div .quick-start:
section:
h2 "1. MOVE AND FIGHT"
p "WASD or left stick moves. Mouse or arrows aim. Click / Space swings up close. Q casts a ranged rune."
section:
h2 "2. WATCH AND DODGE"
p "Yellow enemies warn before attacking. Shift / DODGE evades in your movement direction. Red traps hurt."
section:
h2 "3. INTERACT AND DESCEND"
p "E / USE interacts nearby. Choose visible rewards with 1 / 2 / 3, C, or the buttons above. Then confirm with E."
details:
summary "Classes, upgrades and what survives a run"
p "Knight is the safest first class: armor reduces damage. Arcanist trades health for magic. Scout moves and dodges faster."
p "Shrines give a free run upgrade. Chests replace your single relic. Sanctuary heals before the next depth; Cursed offers tougher foes and more shards."
p "Training costs 5 saved shards and adds permanent health and sword damage. Health, levels, blessings and relics reset on a new run. Class, training and shards are saved."
p "Search gold-flecked cracks for bonus caches. Read tablets for clues. All foes must be defeated before the stairs unlock."
@Logic/crypt_cabinet
state:
label = "Rune Crypt"
@Style/crypt_cabinet
rules:
:root:
color-scheme = dark
*:
box-sizing = border-box
body:
margin = 0
background = #10121c
color = #d7ceb4
font-family = ui-monospace, SFMono-Regular, Consolas, monospace
.cabinet:
max-width = 1080px
margin = auto
padding = 16px
header:
display = flex
align-items = center
justify-content = space-between
flex-wrap = wrap
gap = 12px
h1, h2:
color = #f2d58a
h1:
letter-spacing = 3px
font-size = 28px
h2:
font-size = 14px
p:
font-size = 14px
line-height = 1.7
color = #a0b6c7
.game-surface:
display = flex
justify-content = center
background = #060709
border = 2px solid #786b75
position = relative
margin-top = 12px
.fullscreen-exit:
display = none
.game-surface:fullscreen .fullscreen-exit, .game-surface.rune-pixel3d-expanded .fullscreen-exit:
display = inline-block
.fullscreen-exit-hud:
position = absolute
top = max(8px, env(safe-area-inset-top))
left = max(8px, env(safe-area-inset-left))
z-index = 9
min-height = 44px
.fullscreen-exit-hud[hidden]:
display = none !important
.game-info:
background = #172133
padding = 4px 12px
margin-top = 12px
.game-info p:
color = #f2d58a
.choices[hidden], .game-info[hidden]:
display = none
.pause-menu[hidden]:
display = none
.pause-menu:
position = absolute
z-index = 7
inset = 0
background = #10121c
padding = 16px
border = 2px solid #f2d58a
text-align = center
display = flex
flex-direction = column
justify-content = safe center
overflow = auto
gap = 8px
.pause-menu p:
margin = 4px 0
.pause-menu h2:
margin = 0
font-size = 24px
.pause-actions:
display = flex
flex-wrap = wrap
justify-content = center
gap = 8px
.game-surface:has(.pause-menu:not([hidden])):
min-height = 520px
.game-surface:fullscreen:has(.pause-menu:not([hidden])):
min-height = 0
canvas:
display = block
width = 100%
max-width = none
height = auto
aspect-ratio = 8 / 5
image-rendering = pixelated
touch-action = none
cursor = crosshair
canvas:focus-visible, button:focus-visible:
outline = 3px solid #f2d58a
outline-offset = 2px
.game-surface:fullscreen:
border = 0
align-items = center
.game-surface:fullscreen canvas:
width = min(100vw, 160vh)
max-width = none
max-height = 100vh
.toolbar:
display = flex
flex-wrap = wrap
gap = 8px
margin-top = 12px
.choices, .quick-start:
display = grid
grid-template-columns = repeat(auto-fit, minmax(min(100%, 240px), 1fr))
gap = 10px
margin-top = 12px
.choices button:
text-align = left
padding = 14px
min-height = 64px
line-height = 1.5
button[aria-pressed=true]:
background = #30445c
border = 2px solid #f2d58a
button:disabled:
opacity = 0.55
cursor = not-allowed
button.primary:
background = #345e49
color = #ffffff
.intro:
font-size = 14px
.summary:
padding = 10px
background = #172133
color = #d7ceb4
button:
font = inherit
font-size = 14px
cursor = pointer
min-height = 44px
padding = 10px 14px
color = #f2d58a
background = #302c3c
border = 1px solid #786b75
border-radius = 4px
button:hover:
background = #514958
section:
border-top = 1px solid #514958
margin-top = 20px
details:
margin-top = 18px
padding = 14px
border = 1px solid #514958
summary:
cursor = pointer
font-size = 14px
min-height = 32px
sound.rune
@Logic/crypt
state:
music_track = ""
action play_score(track):
music.stop
music_track = track
music.play track
# Original minor-key title melody, with a gentle pulse beneath the class menu.
@Music/crypt_title
type = 8bit
tempo = 84
time_signature = 4/4
bars = 4
loop = true
volume = 0.07
lead:
A4:4 E5:8 D5:8 C5:4 B4:4 |
G4:4 B4:8 D5:8 E5:4 D5:4 |
F4:4 A4:8 C5:8 E5:4 C5:4 |
E4:4 G#4:4 B4:4 A4:4
bass:
A2:2 E3:2 |
G2:2 D3:2 |
F2:2 C3:2 |
E2:2 A2:2
drums:
kick:4 -:4 hihat:4 -:4 |
kick:4 -:4 hihat:4 -:4 |
kick:4 -:4 hihat:4 -:4 |
kick:4 hihat:4 -:4 -:4
@Music/crypt_dungeon
type = 8bit
tempo = 104
time_signature = 4/4
bars = 4
loop = true
volume = 0.065
lead:
A3:8 E4:8 -:8 C4:8 B3:4 E4:4 |
G3:8 D4:8 -:8 B3:8 A3:4 D4:4 |
F3:8 C4:8 -:8 A3:8 G3:4 C4:4 |
E3:8 B3:8 G#3:8 B3:8 A3:4 -:4
bass:
A2:4 -:4 E2:4 A2:4 |
G2:4 -:4 D2:4 G2:4 |
F2:4 -:4 C2:4 F2:4 |
E2:4 B1:4 E2:4 -:4
drums:
kick:4 hihat:4 snare:4 hihat:4 |
kick:4 hihat:4 snare:4 -:4 |
kick:4 hihat:4 snare:4 hihat:4 |
kick:4 hihat:8 hihat:8 snare:4 -:4
@Music/crypt_warden
type = 8bit
tempo = 132
time_signature = 4/4
bars = 4
loop = true
volume = 0.075
lead:
A4:8 E4:8 A4:8 Bb4:8 E5:4 C5:4 |
G4:8 D4:8 G4:8 Ab4:8 D5:4 B4:4 |
F4:8 C4:8 F4:8 G4:8 C5:4 A4:4 |
E4:8 B4:8 G#4:8 E5:8 B4:4 A4:4
bass:
A2:8 A2:8 E2:4 A2:8 A2:8 E2:4 |
G2:8 G2:8 D2:4 G2:8 G2:8 D2:4 |
F2:8 F2:8 C2:4 F2:8 F2:8 C2:4 |
E2:8 E2:8 B1:4 E2:8 G#2:8 A2:4
drums:
[kick,hihat]:4 [snare,hihat]:4 kick:8 hihat:8 [snare,hihat]:4 |
[kick,hihat]:4 [snare,hihat]:4 kick:8 kick:8 snare:4 |
[kick,hihat]:4 [snare,hihat]:4 kick:8 hihat:8 [snare,hihat]:4 |
kick:4 snare:4 kick:8 snare:8 snare:8 hihat:8
@Music/crypt_victory
type = 8bit
tempo = 100
time_signature = 4/4
bars = 4
loop = false
volume = 0.08
lead:
C5:4 E5:4 G5:4 E5:4 |
F5:4 A5:4 G5:2 |
E5:8 G5:8 C6:4 B5:4 G5:4 |
C6:2 -:2
bass:
C3:2 G3:2 |
F3:2 C3:2 |
G2:2 G3:2 |
C3:2 -:2
drums:
kick:4 hihat:4 snare:4 -:4 |
kick:4 hihat:4 snare:4 -:4 |
kick:4 snare:4 hihat:4 snare:4 |
kick:2 -:2
@Sound/sword
wave = noise
filter = lowpass 1600 -> 120
duration = 120ms
volume = 0.2
@Sound/rune
wave = triangle
sequence = E5:50ms, B5:50ms, E6:80ms
volume = 0.2
@Sound/shard
wave = sine
sequence = A5:50ms, E6:70ms
volume = 0.15
@Sound/warning
wave = square
sequence = D4:60ms, A4:100ms
volume = 0.1
@Sound/dodge
wave = noise
filter = lowpass 900 -> 100
duration = 100ms
volume = 0.1
@Sound/secret
wave = triangle
sequence = C5:70ms, G5:70ms, C6:160ms
volume = 0.15
@Sound/blessing
wave = triangle
sequence = C5:80ms, E5:80ms, G5:140ms
volume = 0.15
@Sound/hurt
wave = sawtooth
sequence = A2:60ms, E2:60ms
volume = 0.15
ux.rune
@Logic/crypt
state:
ui = {"meters": [], "objective": "", "detail": "", "prompt": "", "notice": "", "panel": null}
pause_ui = {
"meters": [],
"objective": "",
"detail": "",
"prompt": "",
"notice": "",
"panel": null
}
camp_locked = false
choice_locked = true
confirm_locked = true
train_locked = true
ui_summary = ""
ui_resources = ""
ui_run_status = ""
resources_hidden = true
ui_choice_one = ""
ui_choice_two = ""
ui_choice_three = ""
third_choice_locked = true
selected_one = false
selected_two = false
selected_three = false
learned_move = false
learned_sword = false
learned_rune = false
learned_dodge = false
context = ""
camp_feedback = ""
action select_class(index):
stop when status == "playing"
stop when index < 0 || index > 2
hero_class = index
legacy.class = index
camp_feedback = ""
call class_label
call refresh_ui
action confirm_choice:
stop when status != "playing"
stop when choice_locked
use_held = true
call interact_exploration true
call use_exit
call refresh_ui
action select_one:
call select_choice 0
action select_two:
call select_choice 1
action select_three:
call select_choice 2
action select_choice(index):
stop when index < 0 || index > 2 || index != floor(index)
if status != "playing":
call select_class index
stop
if distance(player, exit_pos) < 0.8 && level < 5 && remaining == 0:
if index < 2:
route_choice = index
if distance(player, exit_pos) >= 0.8 || level >= 5 || remaining > 0:
if (distance(player, shrine_pos) < 1 && shrine_used == false)
|| (distance(player, chest_pos) < 0.9 && chest_opened == false):
reward_choice = index
call refresh_ui
action refresh_ui:
camp_locked = status == "playing"
resources_hidden = status != "playing"
train_locked = camp_locked || legacy.shards < 5 || legacy.rank >= 10
choice_locked = true
confirm_locked = true
third_choice_locked = true
selected_one = false
selected_two = false
selected_three = false
context = ""
ui = {
"meters": [
{"label": "HEALTH", "value": health, "max": max_health, "color": 8312492},
{"label": "MANA", "value": ammo, "max": mana_max, "color": 8371396},
{
"label": "DODGE",
"value": dodge_rate - dodge_cooldown,
"max": dodge_rate,
"color": 15914378
}
],
"objective": "DEPTH " + level + "/5 - DEFEAT " + remaining + " FOES",
"detail": class_name + " / " + relic + " / LV " + rpg_level + " XP " + xp + "/3 / SHARDS " + legacy.shards,
"prompt": "CLICK / SPACE: SWORD Q: RUNE SHIFT: DODGE",
"notice": notice_ticks > 0 ? notice: "",
"panel": null
}
ui_summary = class_name + " | Relic: " + relic + " | Training rank: " + legacy.rank + " | Shards: " + legacy.shards
ui_resources = "Health " + health + "/" + max_health + " | Mana " + ammo + "/" + mana_max + (dodge_cooldown == 0 ? " | Dodge ready" : " | Dodge " + ceil(dodge_cooldown / 30) + "s")
ui_run_status = level_title + " | RPG level " + rpg_level + " | " + kills + " foes defeated"
if status != "playing":
context = "camp"
choice_locked = false
ui.meters = []
ui.heading = "RUNE CRYPT"
ui.objective = "REACH DEPTH FIVE. DEFEAT THE WARDEN. CLAIM THE HEART."
ui.prompt = "1 / 2 / 3: CLASS ENTER / NEW RUN: BEGIN"
ui.panel = {
"title": "CHOOSE YOUR CLASS",
"body": "Move with WASD. Aim with mouse or arrows. Your shards survive death; your run upgrades reset.",
"choices": [
"KNIGHT - ARMOR / BEST FIRST RUN",
"ARCANIST - STRONG MAGIC / LESS HEALTH",
"SCOUT - FAST MOVEMENT / FAST DODGE"
],
"selected": hero_class,
"footer": "1 / 2 / 3: CLASS ENTER / NEW RUN: BEGIN"
}
if status == "gameover":
ui.panel.title = "YOU FELL. YOUR SHARDS ARE SAFE."
ui.panel.body = "Reached depth " + level + "/5. Defeated " + kills + " foes. Spend 5 shards on training, or try another class."
if status == "won":
ui.panel.title = "RUNE HEART RECLAIMED!"
ui.panel.body = "Five depths survived. " + kills + " foes defeated. +5 bonus shards saved. Choose your next class."
if status == "title":
ui.prompt = "1 / 2 / 3: CLASS ENTER / NEW RUN: BEGIN"
if status != "title" && message:
ui.prompt = message
if camp_feedback:
ui.prompt = camp_feedback
if status == "playing":
if remaining == 0:
ui.objective = "DEPTH " + level + "/5 CLEAR - FIND THE STAIRS"
ui.prompt = "OPTIONAL: SEARCH CACHES / CLAIM A SHRINE"
if level == 5:
ui.objective = "VAULT CLEAR - CLAIM THE RUNE HEART"
if remaining > 0:
ui.objective += hint
if learned_move == false && remaining > 0:
ui.prompt = "FIRST: WASD / LEFT STICK TO MOVE"
if learned_move && learned_sword == false && remaining > 0:
ui.prompt = "GET CLOSE. CLICK / SPACE / SWORD TO ATTACK."
if learned_move && learned_sword && learned_rune == false && remaining > 0:
ui.prompt = "Q / RUNE: RANGED ATTACK. MANA REGENERATES."
if learned_move && learned_sword && learned_rune && learned_dodge == false && remaining > 0:
ui.prompt = "SHIFT / DODGE: EVADE. YELLOW WARNS OF ATTACKS."
if health <= max_health * 0.25:
ui.detail = "LOW HEALTH - SEEK POTIONS / GUARD / SANCTUARY"
if distance(player, lore_pos) < 0.9:
ui.prompt = "E / USE: READ TABLET - A CLUE, NOT A REQUIREMENT"
if distance(player, secret_pos) < 0.9 && secret_found == false:
ui.prompt = "E / USE: SEARCH CRACK - BONUS SHARDS AND HEALING"
if distance(player, shrine_pos) < 1 && shrine_used == false:
context = "shrine"
choice_locked = false
ui.panel = {
"title": "SHRINE - ONE FREE UPGRADE",
"body": "Choose your upgrade, then press E / USE. This bonus lasts for the run.",
"choices": [
"BLADE - SWORD DAMAGE +2",
"RUNE - MAGIC +2 / MAX MANA +1",
"GUARD - MAX HEALTH +25 / HEAL 25"
],
"selected": reward_choice,
"footer": "1 / 2 / 3 OR C: SELECT E / USE: CLAIM"
}
ui.prompt = "ENEMIES STILL MOVE. KEEP WATCH WHILE CHOOSING."
if distance(player, chest_pos) < 0.9 && chest_opened == false:
context = "chest"
choice_locked = false
ui.panel = {
"title": "CHEST - CHOOSE ONE RELIC",
"body": "Current: " + relic + ". New equipment replaces it; effects do not stack.",
"choices": [
"FANG - FASTER SWORD SWINGS",
"LANTERN - FASTER MANA REGENERATION",
"AEGIS - ARMOR +2 / LESS DAMAGE"
],
"selected": reward_choice,
"footer": "1 / 2 / 3 OR C: SELECT E / USE: EQUIP"
}
ui.prompt = "ENEMIES STILL MOVE. KEEP WATCH WHILE CHOOSING."
if distance(player, exit_pos) < 0.8:
if remaining > 0:
ui.prompt = "STAIRS LOCKED - DEFEAT THE REMAINING FOES"
if remaining == 0:
if level == 5:
ui.prompt = "E / USE: CLAIM THE HEART AND COMPLETE THE RUN"
if level < 5:
context = "stairs"
choice_locked = false
ui.panel = {
"title": "DEPTH CLEARED - CHOOSE YOUR NEXT ROUTE",
"body": "Both routes refill mana. Sanctuary is the safer choice.",
"choices": [
"SANCTUARY - HEAL 25 BEFORE DESCENDING",
"CURSED - FOES +3 HP / DOUBLE KILL SHARDS"
],
"selected": route_choice,
"footer": "1 / 2 OR C: SELECT E / USE: DESCEND"
}
ui.prompt = "YOUR UPGRADES AND RELIC CARRY TO THE NEXT DEPTH"
ui_choice_one = "No choice nearby"
ui_choice_two = "No choice nearby"
ui_choice_three = "No choice nearby"
if ui.panel:
ui_choice_one = ui.panel.choices[0]
ui_choice_two = ui.panel.choices[1]
ui_choice_three = ui.panel.choices.length > 2 ? ui.panel.choices[2] : "Only two routes"
selected_one = ui.panel.selected == 0
selected_two = ui.panel.selected == 1
selected_three = ui.panel.selected == 2
third_choice_locked = ui.panel.choices.length < 3
confirm_locked = status != "playing"
pause_ui = {
"heading": "PAUSED",
"meters": ui.meters,
"objective": ui.objective,
"detail": ui.detail,
"prompt": "P: RESUME T: RETURN TO TITLE",
"notice": "",
"panel": {
"title": "YOUR RUN IS SAFE WHILE PAUSED",
"body": class_name + " / " + level_title + "|Level " + rpg_level + " / " + kills + " foes defeated / " + relic + "|Return to title keeps shards and training, but ends this run.",
"choices": [],
"selected": 0,
"footer": "P: RESUME T: TITLE / CHOOSE CLASS"
}
}
weapon.rune
@Logic/crypt
state:
weapon_ticks = 0
weapon_magic = false
action animate_weapon:
weapon.sprite = "weapon/sword"
weapon.x = 34
weapon.y = -12
if weapon_ticks > 0 && weapon_magic == false:
weapon.x = -12 + (4 - min(4, weapon_ticks)) * 11
weapon.y = -8
if weapon_ticks > 4:
weapon.sprite = "weapon/swing"
weapon.x = 30 - (10 - weapon_ticks) * 14
weapon.y = -20
if weapon_ticks > 8:
weapon.sprite = "weapon/sword"
weapon.x = 46
weapon.y = -16
if weapon_ticks > 0 && weapon_magic:
weapon.sprite = "weapon/cast"
weapon.x = 16
weapon.y = -12 - weapon_ticks
Explorez, combattez, survivez
WASD déplace ; souris ou flèches visent ; clic / Espace attaque ; Q lance un sort ; Maj esquive ; E interagit. Utilisez 1 / 2 / 3 ou les cartes pour choisir classe et récompenses.
Vainquez tous les ennemis pour débloquer les escaliers. Les sanctuaires améliorent votre personnage, les coffres remplacent votre relique et les chemins Sanctuary ou Cursed modifient le niveau suivant. Le jaune annonce les attaques.
Commandes tactiles et manette incluses. Pause / P affiche votre état ; Return to title / T termine la partie en conservant fragments, entraînement et classe. Sound / M coupe musique et effets.
Sources et jeu local
Vectrune 0.3.4 exporte Rune Crypt avec modèles solides, ciels animés, salles hautes, textures compressées, interface portable et ennemis qui se dissolvent. Consultez et téléchargez les fichiers Rune.
git clone https://github.com/davethomas11/vectrune.git
cd vectrunevectrune examples/games/rune_crypt/rune_crypt.rune -o html > rune-crypt.htmlvectrune test examples/games/rune_crypt --type logicvectrune fmt examples/games/rune_crypt --line-width 100Le jeu natif nécessite une compilation avec la fonctionnalité optionnelle pixel-desktop.
cargo run --features pixel-desktop -- examples/games/rune_crypt/rune_crypt.rune --target desktop