Skip to content

Icon Manager

Andrew Hernandez edited this page Jul 10, 2026 · 4 revisions

System Summary

Descriptive summary of what the system is and what it does.

The Icon manager handles icons for any object placed in the editor state. Icons are created when an object is placed, stored in a heap, and convey certain information.


Connected Systems

List of connecting/parent/subsystems.

Connecting Systems:

Parent Systems:


Bugs

List of known bugs. Be descriptive but keep it brief!

  • Textures are not resized when being loaded, meaning larger ones will cover the screen. Recommended texture size is 32x32.

Feature List / Breakdown of Features

List of features and descriptions within system.

Icon Creation:

  • Icon textures are preloaded into the script.
  • When an applicable object is placed, an appropriate icon is created using the textures and added to the heap.
  • When an object is deleted, an icon at the same cell is also deleted and removed from the heap.
  • When a level is imported, icons for applicable objects are created by scanning the entire tile map.

List of Icon uses:

  • Foreground/background props
  • Copying entities

Important Variables

Name the most important variables, their type, and what their purpose is

  • iconTexture : Texture2D = Example of an icon texture that's preloaded.
  • ICON_OFFSET : Vector2 = A constant vector that offsets the icons to the top right of a cell.
  • iconHeap : Dictionary[Vector2, Sprite2D] = The list of icons that currently exist in the editor state. Stores them by position, meaning one icon per position can exist.

Important Functions

Name of the most important functions, their parameters, and what they do.

  • func create_icon(objectPosition : Vector2, iconType: String) -> void: Creates an icon of the given type at the given position, adding it to the heap.
  • func delete_icon(objectPosition : Vector2) -> void: Deletes an icon at the given position, removing it from the heap.
  • func setup_icons() -> void: Looks through the tile map and creates icons for any applicable objects.

Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  1. Ensure textures are forced to be 32x32.
  2. This system could potentially be replaced by turning props into scenes and having the icons be child nodes.

Risks:

  • None

Miscellaneous Notes

A place for miscellaneous notes pertaining to this system.

  • Currently, this manager only adds foreground/background icons to props, but it can easily be expanded to other entities where it may be useful.

Clone this wiki locally