Cute browser game that teaches coding fundamentals
with JavaScript in the browser console.
Control shelly via the browser console. Shelly will react to the functions and variables you invoke or modify.
One of the major technical innovations making shelly.run possible, is the reactive console bindings.
Learn more about reactive browser console by seing it in action on this Svelte REPL or get bindConsole.js
from this Gist.
See bindConsole.js
used in the wild on this repo at app/src/components/Shelly.svelte
https://shelly.run
list()
to browse the interactive documentation*Mac: Cmd + Option + J
*Windows: Ctrl + Shift + J
walk()
and run()
distance parameters workshelly.paint()
for tracing (canvas API
)list()
and modifying variables directly to do anything.
Browse server files, change shelly sprites etc. JavaScript is the limitundo()
to shelly.shell.js, save all prompts in a stacksave()
to shelly.shell.js, save program in browser, and to filelist()
(Paste these in the browser console on shelly.run)
These would be considered difficulty of HACKER 😅 (hard)
It's just to show the reactive console 🐢
shelly.walk()
, shelly.run()
, shelly.hide()
and shelly.stay()
shelly.run()
shelly.transform.rot = -30
setInterval(()=>{
shelly.transform.pos.y += 1
shelly.transform.pos.x += 0.3
}, 100)
shelly.run()
R=20
fx=(t)=>(Math.cos(t)*R) + 50
fy=(t)=>(Math.sin(t)*R) + 50
t = 0
setInterval(()=>{
shelly.transform.pos.x = fx(t)
shelly.transform.pos.y = fy(t)
t += 0.1
t %= Math.PI*2
shelly.transform.rot = (360/Math.PI*0.5)*t
}, 100)
COL=['orange','blue','hotpink','cyan','green','red']
index=0
setInterval(() => {
shelly.color = COL[index]
index++
index %= COL.length
}, 40)
F0 = 'https://shelly.run/skins/hacker/F0.png'
F1 = 'https://shelly.run/skins/hacker/F1.png'
F2 = 'https://shelly.run/skins/hacker/F2.png'
F3 = 'https://shelly.run/skins/hacker/F3.png'
F4 = 'https://shelly.run/skins/hacker/F4.png'
F5 = 'https://shelly.run/skins/hacker/F5.png'
F6 = 'https://shelly.run/skins/hacker/F6.png'
states.run.animation = [F3,F2,F4,F2]
states.walk.animation = [F3,F1,F4,F1]
states.idle.animation = [F6,F5,F5,F5,F5,F5,F5,F5,F5,F6,F5,F5,F5,F5,F5]
states.hide.animation = [F0]
Distributed under MPL-2.0. See LICENSE.txt
.