builder icon indicating copy to clipboard operation
builder copied to clipboard

Enable sprite instantiation in the editor

Open nighca opened this issue 2 months ago • 1 comments

In the editor, we may support sprite instantiation, allowing users to create multiple instances from a single sprite definition.

  • These instances would share some information, like code, costumes, and animations
  • but have independent information, like positions, scales, and headings

We need to define precisely which properties are shared and which are configurable per instance.

An open question remains: how should the instance list be exposed to game code? Potential solutions (for sprite "A") include:

var As []*A

func (a *A) List() []*A

func listOf[T](spriteName) []*T

func listOf[T](sprite *T) []*T

This issue may be related to #2375.

nighca avatar Oct 21 '25 00:10 nighca

We may introduce a new concept for "a set some sprite instances" and allow the user to name a set.

nighca avatar Nov 03 '25 01:11 nighca