Tidlet · celworld
seed

Tidlet

tidlet v2Changed by APIc4
Open in Playground

v2 cost

$0.244

API, priced from the call usage.

Time
44s
The run, with the maths
All 2 versions$0.578

Budget

c4 · 57 lines
Shapes21 / 70
Triangles5,776 / 6,000
Draw calls4 / 4
States
idle · splash
Used in
No scene yet
Made
1asset tidlet "Tidlet" complexity=4
2// a tide blob: a fat jelly drop sitting in its own little puddle rim, its tip rising into a
3// curling wave crest with a foam ball, round bubble cheeks, stubby fin hands, big eyes,
4// and a little gold crown ringing the base of the crest.
5// colourways: all bright orange; ocean (common), lagoon (common), rare shiny trims
6let S = .9..1.1
7let CR = .9..1.15
8let shiny = chance(.1)
9let alt = chance(.5)
10let cw = shiny*2 + (1-shiny)*alt
11let bodyC = sel(cw, tangerine:2|flowerOrange, fruitOrange:2|tangerine, tangerine)
12let crestC = sel(cw, white:2|foam, cream:2|white, lemon)
13let bellyC = sel(cw, cream, peach, sunflower)
14let accC = sel(cw, cobalt, bottle, plum)
15let cheekC = sel(cw, foam, white, white)
16let crownC = sunflower:2|marigold|brass
17
18// body: the jelly drop, the root bone
19lathe body h=.5*S r=.26*S prof=[0:.82 .08:1 .35:1.06 .62:.86 .84:.48 1:.14] color=bodyC segs=24 rings=12 joint
20torus rim on=body at=(0, .045*S, 0) R=.215*S r=.045*S color=bodyC*.9 segs=28 sides=8
21ball belly on=body surf=(0, -32) lift=-.045*S r=(.13, .08, .05)*S color=bellyC segs=14 rings=8
22
23// the wave-curl crest: rises from the tip, rolls forward and tucks under, foam at the curl
24// (sized by scale=, so the radius is divided back by CR to keep its thickness)
25tube crest on=body at=(0, .46*S, 0) scale=S*CR pts=[0,0,0 0,.1,-.03 0,.19,-.01 0,.24,.06 0,.21,.13 0,.14,.14 0,.11,.09] r=(.065, .03)/CR smooth sides=8 color=bodyC joint
26ball foam on=crest at=(0, .1, .1) r=.04/CR color=crestC segs=12 rings=8
27
28// the little crown: a gold band sunk round the top of the drop (its top 2 cm above the tip), five stubby points
29cyl crown on=body at=(0, .43*S, 0) h=.09*S r=.1*S r2=.11*S round=.012*S color=crownC segs=14
30cone point x5 on=crown ring at=(.095*S, .08*S, 0) h=.05*S r=.024*S color=crownC segs=6
31ball gem on=crown surf=(0, 20) lift=-.008*S r=.02*S color=cherry segs=8 rings=5
32
33// bubble cheeks with a tiny shine
34ball cheek on=body surf=(52, -8) lift=-.025*S mirror r=.06*S color=cheekC segs=12 rings=8
35ball shine on=cheek at=(.015*S, .025*S, .045*S) r=.018*S color=white segs=6 rings=4
36
37// fin hands and nub feet
38ball fin on=body surf=(90, -10) lift=-.03*S mirror r=(.05, .08, .035)*S color=bodyC*.92 segs=12 rings=8 joint
39ball foot on=body at=(.11*S, .04*S, .13*S) mirror r=(.07, .04, .07)*S color=accC segs=12 rings=8
40
41// the face: big readable eyes
42face look on=body eyes=round mouth=smile size=.3 spacing=26 eyeY=14 mouthY=-11 mouthW=.3 iris=accC detail=.7
43
44// splash: droplets bursting at the base and spray off the crest
45fx splash: splash on=body at=(0, .03*S, 0) n=12 speed=1.6 spread=60 hz=1.4
46fx splash: jet on=crest at=end speed=1.2 spread=30 hz=1.5 n=10 size=.035
47
48// idle: a squashy bob and a lazy crest roll
49anim idle: body py bounce amp=.025 hz=1
50anim idle: body s sin amp=.04 hz=1
51anim idle: crest rz sin amp=6 hz=.5
52anim idle: fin rz sin amp=10 hz=.8 twin=.5
53// splash: big happy hops, fins up, crest whips
54anim splash: body py bounce amp=.16 hz=1.4
55anim splash: body s sin amp=.06 hz=2.8
56anim splash: fin rz keys=[0:0 .4:60 .7:60 1:0] hz=1.4
57anim splash: crest rx keys=[0:0 .3:-18 .6:14 1:0] hz=1.4
58