Skip to content

[FEATURE] Convert Hard-Coded Player Stats to Godot Resource #286

@ikostan

Description

@ikostan

Description:
Convert player stats hard-coded in player.gd (e.g., hitbox_scale=0.25, sprite_size=174x132) to a Godot Resource.

Why is this useful?

  • Learning Godot: Resources for entity stats.
  • Extensibility: Swap player variants.
  • Balancing: Adjust health/size easily.

Proposed Implementation:

  1. Create PlayerStats.tres with fields: hitbox_scale (0.25), sprite_size (174,132), max_health (100.0).
  2. Load in Player.gd _ready(): var player_stats = load("res://resources/PlayerStats.tres").
  3. Use in setup (e.g., set_scale(player_stats.hitbox_scale)).
  4. Extend for future upgrades.

Additional Context:
Prepares for enemies/power-ups; consistent with other resources.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions