Asikaim

GameDev

Kurirust

Overview

My never ending passion project that combines all the skills I’ve accumulated during my life.

An isometric action RPG with stealth mechanics built using Godot and Rust with Entity Component System (ECS) architecture.

Description

This project uses ECS architecture with two main components:

  • GDScript: Lightweight UI, input handling, and Godot engine integration
  • Rust ECS: All game logic, data processing, and state management

The reason behind this split is that the ECS architecture offers several benefits. Firstly, it enhances performance through parallel system execution and a cache-friendly data layout, allowing for more efficient processing. Secondly, it promotes modularity by ensuring a clean separation between data, represented by components, and logic, represented by systems. This separation improves scalability, making it easy to add new features without disrupting rest of the code. Lastly, ECS is easier to maintain since it has a clear data flow and well-defined system dependencies, which simplifies the overall management of the codebase.

Example of the data flow:

  1. GDScript captures input → Rust ECS processes
  2. Rust systems update component data
  3. ECS state syncs with Godot nodes for display

Entities, Components and Systems

The core components include fundamental character data such as position, velocity, and identifiers. In the gameplay category, components are further divided into actions, attributes, itemization, narrative, and vitals, which cover everything from character states and inventory management to health and status effects. Additionally, components related to AI, rendering, physics, and the environment provide data for behavior, visual representation, collision detection, and environmental conditions like weather and time.

On the logic side, systems are responsible for processing the data held within components. The core systems handle movement, animation, physics, and input processing, while gameplay systems manage combat, inventory, quests, dialogue, stealth, and health. AI systems focus on decision-making, pathfinding, and perception, whereas rendering systems take care of graphical updates, camera control, and lighting effects. Environmental systems manage dynamic elements such as weather changes and the day/night cycle. The architecture also emphasizes resources, which maintain the global state of the game, including settings, asset management, and registries for quests and dialogues.

Connection

Integration between the ECS and the Godot engine is implemented through various scripts, such as Godot bridge for the foreign function interface, entity manager for mapping Godot nodes to ECS entities, and ECS bridge for providing a high-level GDScript interface to ECS systems. Key design principles with this project have been hierarchical organization, unified state management, data separation, query-based processing, event-driven communication, and parallel execution.

Keyboard Config
All Projects
Collaborative Threat Intelligence Sharing Network