Team 3 ‐ Level Design - UQcsse3200/2026-studio-3 GitHub Wiki

Notes and Considerations

Integrated with Feature-1 and Team5-Team6-integration-for-team5-test Code is on Feature-3

Scope of Feature

The task of Level design / battle system / turn order, spawn if create the "canvas" of he battle combat. We will spawn entities, call card effects, display hand, and wrap these all into a game loop

UI

This UI implements code Feature-1 and Team5-Team6-integration-for-team5-test

when you run Feature-3


image
then click battle to start the battle, this will be replaced by the map
image
the heart is a place-holder `.png` for the enemy but use the real stub given by the branch `Feature-1` to make compatible with our IO the following code was added
  public static Entity create(EnemyConfig config) {
    return new Entity()
        .addComponent(new TextureRenderComponent("images/heart.png")) //place holder image
        .addComponent(new EnemyStatsComponent(config.health, config.baseAttack, config.armour))
        .addComponent(new EnemyBehaviourComponent(config.behaviour))
        .addComponent(
            new EnemyDropTargetComponent(
                ServiceLocator.getDragAndDropService().getDragAndDrop(),
                ServiceLocator.getCamera())); //allow the user to drag a card on it
  }

once you click on up the card show
image
these card are just the library of cards for now given by the branch `Team5-Team6-integration-for-team5-test` and wrapped by the following code

 List<CardConfig> configs = CardConfigLoader.loadCards(); // reads configs/cards.json
    CardLibrary library = new CardLibrary(configs);
    ServiceLocator.registerCardLibrary(library);

    List<CardConfig> allCards = library.getAllCards();
    List<ClickableRecord> records = new ArrayList<>();
    float x = HAND_START_X;
    for (CardConfig card : allCards) {
      Skin cardSkin = skinFromTexturePath(card.texturePath);
      records.add(
          ClickableRecord.builder(card.id)
              .label(card.name)
              .variant("drag")
              .position(x, HAND_Y)
              .size(300, 456)
              .skin(cardSkin) // no .text(...) => Builder infers ButtonType.IMAGE
              .build());
      x += HAND_SPACING;
    }

// where this will be added to the ui of the screen via .addComponent(new ClickableFactory(records))


you and drag the card to the player
image
there is a slight quirk with the drag, when drop the mouse must be on the enemy for it to count as "dropped on enemy"
image
Once dropped a event is triggered with that card's id, the plan is to use this trigger in `BattleActions` to affect the player this the appropriate functions

What Does This Mean For YOU?

Drag Targets

if you are developing a Entity that a card on the battle screen need to be dragged on add

        .addComponent(
            new EnemyDropTargetComponent(
                ServiceLocator.getDragAndDropService().getDragAndDrop(),
                ServiceLocator.getCamera())); //allow the user to drag a card on it


this creates a hit box around you entity!

Battle Screen Battle Actions battle Area

Questions

How can we call the card effect to the player??

⚠️ **GitHub.com Fallback** ⚠️