# arwildo/petapa architecture

> Architecture diagram of the GitHub repository arwildo/petapa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arwildo/petapa
- Repository: https://github.com/arwildo/petapa

## Overview

Petapa is a Godot 4.4 game project, presented as part of a game-making tutorial series. The tree shows a world scene, player and slime scripts/scenes, and player-state scripts, suggesting the main runtime areas are world, player behavior, and enemy behavior. The README does not describe gameplay flow, and no source excerpts were provided, so relationships between these components cannot be verified; the graph therefore omits edges rather than guessing.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["Game World"]
  node_world_scene["World Scene<br/>[dunia.tscn]"]
  node_game_art["Game Art"]
end

subgraph group_player["Player Behavior"]
  node_player_controller["Player Controller<br/>[player.gd]"]
  node_state_base["State Base<br/>[State.gd]"]
  node_idle_state["Idle State<br/>[IdleState.gd]"]
  node_movement_state["Movement State<br/>[JalanState.gd]"]
  node_attack_state["Attack State<br/>[SerangState.gd]"]
end

subgraph group_characters["Character Behavior"]
  node_sprite_animation["Sprite Animation"]
  node_slime_behavior["Slime Behavior<br/>[slime.gd]"]
  node_slime_scene["Slime Scene<br/>[slime.tscn]"]
end

click node_world_scene "https://github.com/arwildo/petapa/blob/main/dunia.tscn"
click node_player_controller "https://github.com/arwildo/petapa/blob/main/player.gd"
click node_state_base "https://github.com/arwildo/petapa/blob/main/states/State.gd"
click node_idle_state "https://github.com/arwildo/petapa/blob/main/states/IdleState.gd"
click node_movement_state "https://github.com/arwildo/petapa/blob/main/states/JalanState.gd"
click node_attack_state "https://github.com/arwildo/petapa/blob/main/states/SerangState.gd"
click node_sprite_animation "https://github.com/arwildo/petapa/blob/main/animated_sprite_2d.gd"
click node_slime_behavior "https://github.com/arwildo/petapa/blob/main/slime.gd"
click node_slime_scene "https://github.com/arwildo/petapa/blob/main/slime.tscn"
click node_game_art "https://github.com/arwildo/petapa/tree/main/arts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_world_scene,node_game_art toneBlue
class node_player_controller,node_state_base,node_idle_state,node_movement_state,node_attack_state toneAmber
class node_sprite_animation,node_slime_behavior,node_slime_scene toneMint
```

## Components

### Game World

- [World Scene](https://github.com/arwildo/petapa/blob/main/dunia.tscn): `dunia.tscn`
- [Game Art](https://github.com/arwildo/petapa/tree/main/arts): `arts`

### Player Behavior

- [Player Controller](https://github.com/arwildo/petapa/blob/main/player.gd): `player.gd`
- [State Base](https://github.com/arwildo/petapa/blob/main/states/State.gd): `states/State.gd`
- [Idle State](https://github.com/arwildo/petapa/blob/main/states/IdleState.gd): `states/IdleState.gd`
- [Movement State](https://github.com/arwildo/petapa/blob/main/states/JalanState.gd): `states/JalanState.gd`
- [Attack State](https://github.com/arwildo/petapa/blob/main/states/SerangState.gd): `states/SerangState.gd`

### Character Behavior

- [Sprite Animation](https://github.com/arwildo/petapa/blob/main/animated_sprite_2d.gd): `animated_sprite_2d.gd`
- [Slime Behavior](https://github.com/arwildo/petapa/blob/main/slime.gd): `slime.gd`
- [Slime Scene](https://github.com/arwildo/petapa/blob/main/slime.tscn): `slime.tscn`
