Skip to content

Add name package.#255

Merged
waynemwashuma merged 5 commits into
wimaengine:devfrom
waynemwashuma:name
Sep 17, 2025
Merged

Add name package.#255
waynemwashuma merged 5 commits into
wimaengine:devfrom
waynemwashuma:name

Conversation

@waynemwashuma
Copy link
Copy Markdown
Collaborator

@waynemwashuma waynemwashuma commented Sep 15, 2025

Objective

Introduces a new Name component and plugin system that allows entities to have human-readable identifiers. This provides better debugging capabilities and entity management through descriptive naming.

Solution

The solution adds a simple but powerful naming system to the engine:

  1. Name : A new component class that stores a string value for entity identification
  2. NamePlugin: A plugin that registers the Name component with the ECS system

Showcase

To use the Name component:

import { Name } from 'wima'

// Create an entity with a name
commands
  .spawn()
  .insert(new Name("Player Character"))
  .build()

The name can be accessed and used for debugging or entity lookup operations.

Migration Guide

No breaking changes were introduced. This is an additive feature that doesn't affect existing functionality. The Name component is optional and can be used as needed.

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@waynemwashuma waynemwashuma self-assigned this Sep 15, 2025
@waynemwashuma waynemwashuma added the type:enhancement New feature or request label Sep 15, 2025
@waynemwashuma waynemwashuma marked this pull request as ready for review September 17, 2025 02:27
@waynemwashuma waynemwashuma merged commit 639fb9b into wimaengine:dev Sep 17, 2025
5 checks passed
@waynemwashuma waynemwashuma deleted the name branch September 17, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant