☀️ Tank lessonshow our diep.io tanks do what they do
Lesson 00

How the editor draws a tank

Barrels, parts and auto turrets are stacked in layers, and the body splits what draws over it from what draws under it.

What you see

The plate is drawn under the body, the badge over itplate:under the bodybadge:over the bodybody:Size 50cannondrawn in order: under > body > over

Every custom tank is a body plus a stack of layers. The Layers panel on the left lists them; the Tank body row in the middle of the list splits what draws over the body from what draws under it. Drag a layer across that row and it changes sides. Within each side, the layer higher in the list is painted on top.

There are three kinds of layer, and that is all there is:

LayerWhat it isFields that place it
BarrelA rectangle or trapezoid that can fire. The only straight-edged shape you get.Angle, Offset, Length, Width at base, Width at tip, Gap
PartA regular polygon, a circle (Sides under 3) or a star.Sides, Size, Angle, Offset X, Offset Y, Rotation
Auto turretA disc that turns on its own, and carries barrels and parts with it.Offset X, Offset Y, Base size, Facing, Range, Arc

Units the editor uses

Gotchas