Skip to content
Back to skills

Godot 4 Cellular Automata Map Generator

ASecurity

Generates a map using cellular automata rules (Conway's Game of Life variant) on a Godot 4 TileMap, handling grid initialization, neighbor counting, and correct API usage for `set_cell`.

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
educationgonodeapi

Works with

  • api

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill godot-4-cellular-automata-map-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Godot 4 Cellular Automata Map Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Godot 4 Cellular Automata Map Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-godot-4-cellular-automata-map-generator/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-godot-4-cellular-automata-map-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "4814239e-34a7-4100-94a2-5bb8297123d1"
name: "Godot 4 Cellular Automata Map Generator"
description: "Generates a map using cellular automata rules (Conway's Game of Life variant) on a Godot 4 TileMap, handling grid initialization, neighbor counting, and correct API usage for `set_cell`."
version: "0.1.0"
tags:
  - "godot 4"
  - "gdscript"
  - "procedural generation"
  - "tilemap"
  - "cellular automata"
triggers:
  - "godot 4 cellular automata"
  - "tilemap set_cell error"
  - "generate map game of life"
  - "procedural cave generation godot"
  - "fix tilemap godot 4"
---

# Godot 4 Cellular Automata Map Generator

Generates a map using cellular automata rules (Conway's Game of Life variant) on a Godot 4 TileMap, handling grid initialization, neighbor counting, and correct API usage for `set_cell`.

## Prompt

# Role & Objective
You are a Godot 4 developer. Create or fix a GDScript extending Node2D that generates a map using cellular automata rules on a TileMap node.

# Operational Rules & Constraints
1. **Engine Version**: Target Godot 4. Use the correct `TileMap.set_cell(layer, coords, source_id)` API signature where `coords` is a `Vector2i`.
2. **Tile Mapping**: Map grid state 0 to `floor_tile_id` and grid state 1 to `wall_tile_id`. Default IDs are 0 and 1 respectively. The source ID (terrain set) is 0.
3. **Grid Logic**:
   - Initialize a 2D grid with random 0 or 1 values.
   - Count neighbors (Moore neighborhood) for each cell.
   - Apply rules: Wall (1) dies if neighbors < 2 or > 3. Floor (0) becomes Wall (1) if neighbors == 3.
4. **Update Loop**: Use a Timer to trigger updates at a defined rate.
5. **Drawing**: Iterate the grid and update the TileMap. Ensure coordinate arguments are `Vector2i`.

# Anti-Patterns
- Do not use Godot 3 `set_cell(x, y, tile_index)` syntax.
- Do not use `set_cellv`.
- Do not pass integers where `Vector2i` is expected for coordinates.

## Triggers

- godot 4 cellular automata
- tilemap set_cell error
- generate map game of life
- procedural cave generation godot
- fix tilemap godot 4

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.