Skip to content

Game Piece Asset Support [AARD-1902] #1190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 107 commits into
base: dev
Choose a base branch
from

Conversation

azaleacolburn
Copy link
Contributor

@azaleacolburn azaleacolburn commented Jul 2, 2025

Description

Game pieces are now treated as separate assets from the field, they are able to be spawned, deleted, cached, etc, all on their own.

Objectives

  • Frontend configuration menu for game pieces
  • Game pieces are returned as separate assemblies
  • Game pieces are pruned from the main assembly
  • Game pieces are treated like separate entities, neither fields nor robots and are configurable
  • Game pieces still start in the same place on the field as before
  • Game pieces cache properly
  • Game pieces can be interacted with by robots as before
  • Game pieces work in match mode as before

Testing Done

  • Parsing fields (2023 & 2024) still works
  • Game pieces can still be manipulated
  • Game pieces can be configured
  • Configuration and spawning UI works

Note

Fields no longer spawn with a transform gizmo attached

image

AARD-1902

@azaleacolburn azaleacolburn requested review from a team as code owners July 2, 2025 16:56
@azaleacolburn azaleacolburn marked this pull request as draft July 2, 2025 20:25
@azaleacolburn azaleacolburn self-assigned this Jul 8, 2025
Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are currently failing, looks like it might be similar to #1222 but want to confirm.

@Dhruv-0-Arora
Copy link
Collaborator

Dhruv-0-Arora commented Aug 6, 2025

@BrandonPacewic @azaleacolburn this PR just requires merge conflicts resolution, correct?

Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking into the tests I think this is a separate issue and one that is introduced by this PR. Please take a look.

Comment on lines -196 to +308
let rn: RigidNode | null = null
rg.occurrences!.forEach(y => {
rg.occurrences!.reduce<RigidNode | null>((rn, y) => {
const currentRn = this._partToNodeMap.get(y)!

rn = !rn ? currentRn : currentRn.id != rn.id ? this.mergeRigidNodes(currentRn, rn) : rn
})
return !rn ? currentRn : currentRn.id != rn.id ? this.mergeRigidNodes(currentRn, rn) : rn
}, null)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also a refactor

@azaleacolburn azaleacolburn force-pushed the colbura/1902/game-piece-asset-support branch from 3ea97cb to d51c833 Compare August 7, 2025 18:14
@azaleacolburn azaleacolburn marked this pull request as draft August 8, 2025 18:51
@azaleacolburn azaleacolburn marked this pull request as ready for review August 8, 2025 20:35
Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I click on Configure Assets and go to the Pieces tab all I see is the current field. If I select it I don't see any other options:
image

image

When spawning fields the game pieces don't appear to be aligned properly. I remember this coming up in discussions at one point but I don't remember what the conclusion of it was.

image

@azaleacolburn
Copy link
Contributor Author

azaleacolburn commented Aug 12, 2025

When spawning fields the game pieces don't appear to be aligned properly. I remember this coming up in discussions at one point but I don't remember what the conclusion of it was.

This issue is caused by the transform on the part instance being miscalculated in the exporter. This wasn't an issue before since we used the field rigid node rather than the independent part transform. The pieces aren't off by a consistent amount across fields, so here's what I'm going to do:

  1. See if I can get a transform from the field rigid node to use for alignment
  2. Since all the pieces are off by the same amount within each field, I could have a map of transform adjustments to fix this for out (incorrectly exported) fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gameplay Relating to the playability of Synthesis mirabuf Relating to the mirabuf format rendering Relating to the rendering engine or how something is rendered ui/ux Relating to user interface, or in general, user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants