Skip to content

Asset Manager

Zay Arriaga edited this page Jun 10, 2026 · 16 revisions

System Summary

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

The asset manager is a menu that allows the user to import and use their own assets.


Connected Systems

List of connecting/parent/subsystems.

Connecting Systems:

Subsystems:


Related Controls

List of related controls.

Key(s): (Asset Manager button press)

  • Opens the Asset Manager and pauses background functionality

Key(s): (Close button press)

  • Closes the Asset Manager and resumes background functionality

Key(s): (Asset list item press)

  • Selects an asset item and shows its preview

Key(s): (Load button press)

  • Opens the file dialog and allows the user to select a file to replace the currently selected asset

Key(s): (Reset button press)

  • Resets the selected asset to its default image

Bugs

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

  • None.

Feature List / Breakdown of Features

List of features and descriptions within system.

Asset tabs:

  • Tabs containing the different asset lists
  • Images, animations, audio

Asset list:

  • List of all assets of the tab type
  • Each list item is selectable

Load functionality:

  • Ability for the player to load a file and replace the selected asset

Reset functionality:

  • Ability for the user to reset the selected asset to its default asset

Asset image preview:

  • A preview of what the selected asset's current image is

Important Variables

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

filePath: String = A file path containing where assets will be stored and retrieved.

mainTileMap: TileMapLayer = A reference to the main tile map.

previewTileSet: TileMapLayer = A reference to the preview tile set and tile map.

tileTypes: Array[String] = An array of all the tile names/types. Set immediately.

entityTypes: Array[String] = An array of all the entity names/types. Set immediately.

animations: Array[String] = An array of all the animations. Set immediately.

Important Functions

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

func generate_buttons(folder: String, container: VBoxContainer, type: AssetItem.AssetType) -> void: Generates a button per asset type that is specified.

func find_image(imageName: String, currentDirectory: String) -> Image: Finds an imageName from the currentDirectory.

func find_image_in_folder(folderPath: String) -> Image: Returns the first image found in folderPath.

func validate_image(image: Image) -> bool: Determines if image is valid based on multiple criteria.

func get_animation_from_folder(folderPath: String) -> Array[Image]: Returns an array with all images in the folder, expected to be a series of sprites for an animation, within the given folderPath.

func clear_imagae() -> DirAccess: Clears all stored image assets.

func replace_image(newImagePath: String) -> void: Replaces the currently selected image at the given newImagePath.

func find_file_by_name(targetFileName: String, currentDirectory: String = filePath) -> String: Searches for a targetFileName in currentDirectory.

func find_directory_by_name(targetDirectoryName: String, currentDirectory: String = filePath) -> String: Searches for the targetDirectoryName within a currentDirectory.


Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  1. Adding functionality for audio files to be replaced

Risks:

  • None.

Miscellaneous Notes

A place for miscellaneous notes pertaining to this system.

  • None.

Clone this wiki locally