Shellmite · celworld
seed

Shellmite

shellmite v1Made by APIc4
Open in Playground

v1 cost

$0.152

API, priced from the call usage.

Time
62s
The run, with the maths
All 1 version$0.152

Budget

c4 · 50 lines
Shapes26 / 70
Triangles4,960 / 6,000
Draw calls3 / 4
States
idle · scuttle
Used in
No scene yet
Made
1asset shellmite "Shellmite" complexity=4
2// an original hermit-crab critter: a round soft body peeking out of a big pastel spiral shell,
3// googly eyes on stalks, two chunky snapping claws, three pairs of short splayed legs.
4// Readable from far: the tall banded shell plus two fat claws. Three colourways: candy, minty, rare shiny.
5let S = .92..1.1
6let CL = .95..1.15
7let SH = .95..1.12
8// colourway gene: 0 candy, 1 minty (common), 2 shiny (rare ~11%)
9let cw = int(0..2.25)
10let shellA = sel(cw, bubblegum, mint, lemon)
11let shellB = sel(cw, lilac, aqua, white)
12let bodyC = sel(cw, coral, peach, lilac)
13let clawC = sel(cw, tomato, tangerine, grape)
14let trim = cream:3|white
15
16// body: the root bone, a soft round crab body
17ball body at=(0, .2*S, .04*S) r=(.17, .14, .16)*S color=bodyC under=trim segs=20 rings=12 joint
18
19// the spiral shell on its back, leaning back, banded whorls with a twist
20lathe shell on=body at=(0, .07*S, -.1*S) tilt=-35 h=.44*S*SH r=.2*S prof=[0:.8 .2:1 .45:.85 .7:.5 .9:.2 1:.04] lean=(.05, -.02)*S bands=[.2:shellB .26:shellA .45:shellB .51:shellA .68:shellB .74:shellA .88:shellB] color=shellA segs=20 rings=14
21torus lip on=shell at=(0, .01*S, 0) R=.16*S r=.04*S color=trim segs=20 sides=8
22
23// eyes on stalks: big, white, readable
24rod stalk on=body at=(.06*S, .1*S, .09*S) mirror to=(.03, .12, .02)*S r=(.026, .022)*S sides=8 color=bodyC joint
25ball eye on=stalk at=end r=.075*S color=white segs=12 rings=8
26ball pupil on=eye surf=(8, 6) decal lift=-.02*S r=(.042, .05, .025)*S color=inkDark ink=none segs=8 rings=5
27ball glint on=pupil at=(.012*S, .018*S, .02*S) r=.013*S color=white ink=none segs=6 rings=4
28face grin on=body eyes=none mouth=smile mouthY=-12 mouthW=.35
29
30// chunky claws: a short arm, a fat palm, a fixed upper pincer and a snapping lower finger
31rod arm on=body at=(.1*S, 0, .08*S) mirror to=(.09, .01, .06)*S r=.035*S sides=8 color=clawC
32ball claw on=body at=(.2*S, .02*S, .16*S) mirror r=(.085, .075, .1)*S*CL color=clawC segs=14 rings=10 joint
33cone pinch on=claw at=(0, .02*S, .05*S) rot=(80, 0, 0) h=.11*S*CL r=.05*S*CL r2=.012*S depth=.7 color=clawC segs=10
34cone finger on=claw at=(0, -.03*S, .04*S) rot=(108, 0, 0) h=.09*S*CL r=.036*S*CL r2=.01*S depth=.7 color=trim segs=10 joint
35
36// three pairs of short splayed legs with pale socks
37limb leg x3 on=body row=(0, 0, .08*S) at=(.13*S, -.06*S, -.03*S) mirror roll=40 len=.14*S r=(.03, .022)*S bands=[.6:trim] color=clawC segs=8 joint
38
39// idle: breathe, glance about, snap snap with the claws
40anim idle: body breathe
41anim idle: stalk rz sin amp=8 hz=.5 twin=.5
42anim idle: claw rx sin amp=6 hz=.4 twin=.5
43anim idle: finger rx keys=[0:0 .12:-24 .24:0 .36:-24 .48:0 1:0] hz=.9 twin=.5
44// scuttle: a quick side-step, legs rippling, claws held up, body shuffling sideways
45anim scuttle: leg rz sin amp=20 hz=3 twin=.5 stagger=.33
46anim scuttle: body px sin amp=.04 hz=1.5
47anim scuttle: body py bounce amp=.015 hz=3
48anim scuttle: claw rx keys=[0:-15 .5:-25 1:-15] hz=1.5 twin=.5
49anim scuttle: finger rx keys=[0:0 .5:-20 1:0] hz=3 twin=.5
50anim scuttle: stalk rz sin amp=12 hz=1.5 twin=.5
51