← Level pieces 23D assetfogon/nivel-pasto-borde
Pasto con borde
Drag to turn it// «Pasto con borde» · gpt-6-sol (medium)
// A square ground tile that tiles seamlessly: a full 48x48 footprint (x 0..47, y 0..47), 8 blocks thick (z 0..7), a perfectly flat solid slab with straight vertical sides and no gaps. Like a grass tile but meant for the edge of a level: the top 2 layers green grass in 2-3 shades over the full footprint, and along the front edge (y 0..3) the grass ends in a raised 2-block lip of darker green bushes; the front face (y 0) shows exposed brown dirt with grey stones and a few hanging roots; the other sides are plain dirt.
// Solid, grid-aligned slab: dirt below, two full grass layers above.
for (let x = 0; x < 48; x++) {
for (let y = 0; y < 48; y++) {
for (let z = 0; z < 6; z++) {
const dirt = z < 2 ? "#92552e" : "#a96536";
set(x, y, z, rand() < 0.025 ? "#b6743e" : dirt);
}
set(x, y, 6, rand() < 0.045 ? "#4ba734" : "#48a031");
set(x, y, 7, rand() < 0.055 ? "#74d449" : "#64c840");
}
}
// Grey stones embedded flush in the exposed front face.
const stones = [
[5, 2, 4], [17, 1, 5], [31, 2, 5], [42, 1, 4]
];
for (const [sx, sz, width] of stones) {
for (let dx = 0; dx < width; dx++) {
for (let dz = 0; dz < 2; dz++) {
if ((dx === 0 || dx === width - 1) && dz === 1) continue;
set(sx + dx, 0, sz + dz, dz === 1 ? "#c1c6bd" : "#89918b");
}
}
set(sx + 1, 0, sz + 1, "#d8d9cb");
}
// A few short roots hanging down the dirt face from the grass.
for (const [x, length] of [[12, 2], [26, 3], [38, 2]]) {
for (let i = 0; i < length; i++) {
set(x + (i === length - 1 ? 1 : 0), 0, 5 - i, "#714526");
}
}
// Continuous two-block-high bush lip, entirely inside the tile footprint.
for (let x = 0; x < 48; x++) {
for (let y = 0; y < 4; y++) {
set(x, y, 8, rand() < 0.12 ? "#34882f" : "#287a2b");
set(x, y, 9, rand() < 0.18 ? "#5bac38" : "#449b32");
}
}import { draw } from "./assets/voxel";
import { nivelPastoBorde } from "./assets/nivel-pasto-borde";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, nivelPastoBorde, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add nivel-pasto-borde
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["nivel-pasto-borde"] })
# It lands in client/assets/nivel-pasto-borde.ts
# https://fogon.page/object/nivel-pasto-borde