Swamp troll boss · celworld
seed

Swamp troll boss

swamp_troll v1Made by APIc6
Open in Playground

v1 cost

$0.606

API, priced from the call usage.

The run, with the maths
All 1 version$0.606

Budget

c6 · 85 lines
Shapes44 / 140
Triangles7,680 / 10,000
Draw calls2 / 5
States
walk · roar · smash
Used in
No scene yet
Made
1asset swamp_troll "Swamp troll boss" complexity=6
2// a hulking, hunched chibi swamp troll, about 3 m with its moss tuft: a huge round belly,
3// a big head with an underbite and tusks, short stompy legs, long arms and a mossy log club.
4// it breathes and growls at rest, stomps when walking, roars (head back, jaw wide, arms up)
5// and smashes the club down over its head.
6let S = .94..1.06
7let B = .95..1.1
8let HS = .96..1.1
9let skin = moss:3|hedge:2|leafC|teal
10let tummy = rockSand:2|peach|honey:.5
11let mossC = leafB:2|lime|leafA
12let pop = cherry:2|tangerine|flowerPurple
13let wood = barkA|barkB|walnut
14let cloth = redwood:2|walnut|terracotta
15
16// the big masses: a round body, a back hump, a pale belly and a ragged skirt
17ball body at=(0, 1.4*S, 0) scale=S r=(.8*B, .72, .7) color=skin segs=24 rings=14 joint
18ball hump on=body at=(0, .3, -.42) r=(.6, .5, .45) color=skin segs=18 rings=10
19ball belly on=body surf=(0, 15) upright lift=-.1 r=(.55*B, .42, .26) color=tummy segs=20 rings=12
20cone skirt on=body at=(0, -.64, 0) h=.47 r=.82*B r2=.64*B depth=.88 stripes=[cloth cloth*.8] panels=12 scallop=.04 segs=12
21
22// short, sturdy legs with big feet and cream toenails
23limb leg on=body at=(.4*B, -.6, 0) mirror len=.6 r=(.24, .21) color=skin segs=10 joint
24ball foot on=leg at=(0, -.67, .1) r=(.27, .13, .36) color=skin segs=12 rings=7
25cone toe x3 on=foot row=(.15, 0, 0) at=(0, -.01, .3) rot=(90, 0, 0) h=.13 r=.065 color=tummy segs=6
26
27// the head: heavy brow, bulb nose, pointy ears, an underbite jaw with tusks
28ball head on=body at=(0, .9, .14) scale=HS r=(.55, .48, .5) color=skin segs=24 rings=14 joint
29ball brow on=head surf=(0, 36) upright lift=-.07 r=(.4, .09, .2) color=shade(skin, .85) segs=12 rings=6
30ball nose on=head surf=(0, -6) upright lift=-.05 r=(.14, .12, .15) color=light(skin, .06) segs=12 rings=7
31cone ear on=head surf=(98, 12) mirror h=.36 r=.13 r2=.02 depth=.45 color=skin segs=8
32ball throat on=head at=(0, -.26, .3) r=(.2, .07, .2) color=inkDark segs=10 rings=6
33limb jaw on=head at=(0, -.25, .05) rot=(-90, 0, 0) len=.33 r=.19 color=shade(skin, .93) segs=10 joint
34cone tusk on=jaw at=(.13, -.26, .14) mirror rot=(90, 0, 0) h=.2 r=.055 r2=.01 color=tummy segs=6
35face look on=head eyes=round mouth=none size=.2 spacing=26 eyeY=14 brows=inkDark iris=marigold detail=.6
36ball wart1 on=head surf=(-42, -14) upright lift=-.01 r=.055 color=light(skin, .12) segs=8 rings=5
37ball wart2 on=body surf=(40, 30) upright lift=-.01 r=.06 color=light(skin, .12) segs=8 rings=5
38
39// moss growing on the head, shoulders and hump
40puff mosshead on=head surf=(0, 74) upright lift=-.07 r=(.33, .15, .29) color=mossC segs=10 rings=6
41puff mossb on=head surf=(-55, 58) upright lift=-.04 r=.14 color=mossC segs=10 rings=6
42puff mossc on=head surf=(60, 50) upright lift=-.04 r=.11 color=mossC segs=10 rings=6
43puff shoulder on=body surf=(75, 52) mirror upright lift=-.1 r=(.3, .16, .26) color=mossC segs=10 rings=6
44puff mosshump on=hump surf=(-130, 55) upright lift=-.08 r=(.3, .14, .25) color=mossC segs=10 rings=6
45
46// mushrooms on the hump: the pop colour
47cyl stem on=hump surf=(200, 58) lift=-.04 h=.2 r=.045 color=tummy segs=8
48ball cap on=stem at=(0, .2, 0) r=(.15, .08, .15) color=pop under=tummy segs=12 rings=6
49cyl stem2 on=hump surf=(155, 40) lift=-.04 h=.13 r=.035 color=tummy segs=8
50ball cap2 on=stem2 at=(0, .13, 0) r=(.1, .06, .1) color=pop under=tummy segs=10 rings=6
51
52// arms: the left hangs free, the right holds the log club
53limb arm_l on=body at=(.72*B, .45, 0) rot=(0, 0, 10) len=.7 r=(.2, .17) color=skin segs=10 joint
54ball hand_l on=arm_l at=end r=.23 color=skin segs=12 rings=7
55limb arm_r on=body at=(-.72*B, .45, 0) rot=(-25, 0, -8) len=.7 r=(.2, .17) color=skin segs=10 joint
56ball fist on=arm_r at=end rot=(45, 0, 0) r=.25 color=skin segs=12 rings=7 joint
57cyl club on=fist at=(0, -.1, 0) h=1.5 r=.12 r2=.3 round=.07 color=cloth bands=[.2:wood .6:mossC .78:wood] cap=tummy segs=16
58cone spike on=club at=(.22, 1.0, 0) mirror rot=(0, 0, -90) h=.17 r=.06 color=tummy segs=6
59cone spikef on=club at=(0, 1.2, .25) rot=(90, 0, 0) h=.17 r=.06 color=tummy segs=6
60
61// idle: breathe, growl-sway, swinging arm
62anim body breathe amp=.025 hz=.3
63anim head nod amp=4 hz=.35
64anim jaw rx sin amp=4 hz=.5
65anim arm_l sway amp=3 hz=.3
66
67// walk: heavy stomping gait with a body bob and swinging arms
68anim walk: leg gait amp=26 hz=.9
69anim walk: body py bounce amp=.05 hz=1.8
70anim walk: body rz sin amp=3 hz=.9
71anim walk: arm_l rx sin amp=18 hz=.9
72anim walk: head rz sin amp=3 hz=.9
73
74// roar: head back, jaw wide, arms thrown up, chest swells
75anim roar: head rx keys=[0:0 .3:-25 .8:-25 1:0] hz=.4 once
76anim roar: jaw rx keys=[0:0 .3:45 .8:45 1:0] hz=.4 once
77anim roar: arm_l rx keys=[0:0 .3:-110 .8:-110 1:0] hz=.4 once
78anim roar: arm_r rx keys=[0:0 .3:-90 .8:-90 1:0] hz=.4 once
79anim roar: body s keys=[0:0 .3:.05 .8:.05 1:0] hz=.4 once
80
81// smash: wind the club up overhead, then slam it down
82anim smash: arm_r rx keys=[0:0 .4:-115 .55:-115 .7:25 .88:15 1:0] hz=.5 once
83anim smash: arm_l rx keys=[0:0 .4:-40 .55:-40 .7:15 1:0] hz=.5 once
84anim smash: body rx keys=[0:0 .4:-8 .55:-8 .7:14 .88:10 1:0] hz=.5 once
85anim smash: head rx keys=[0:0 .4:-10 .55:-10 .7:8 1:0] hz=.5 once
86