Manipulate assets from asset library in a game

Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.

What Wick Editor Version are you using?
1.19.3 (1.19.4 should also apply)

Describe the Problem
so, block stacker game that for the sake of copyright is definitely not t*tris. (i don’t think i have to worry too much about copyright but whatever)

my goal is to make a 60fps game, and i know that having a lot of things like clips and vectors are resource-intensive. i’m already taking a step by using image clips instead of vector clips for the blocks.

and while i’m here, i should probably ask: is it better to clone from 8 different blocks to make all the colors or to clone a single clip with all 8 colors? the 2nd option makes it so that every block has 8 frames, which i’m assuming is worse? however, with the first option, i have to completely delete any block that has changed and replace it with a new one.

anyway, i’m currently doing the 2nd option, and i realized that instead of cloning clips with pictures of blocks inside them, it would be better if i could just clone the pictures themselves directly from the asset library (and have control over them so that i can delete them later). however i have no idea how to do that. i have a small feeling i’ve seen someone do it before but i can’t find any post talking about it.

What have you tried so far?
searching through the forums with no success

Do you have a Wick Editor File that we can see? Optional*

Stacker 2.010-26-2022_13-26-58.wick (18.9 KB)


go to the frame in the top layer and scroll down to updateBoard() to find this mess of a switch.

the board is a clip, if you go inside there’s 8 more clips for all the colors. those are the colors i’m cloning to render the board.

1 Like

not really related to the topic of your post, but in case you didn’t know, you could also do this:

const names = ["black", "red", "orange", "yellow", "green", "cyan", "blue", "purple"];
...
let block = this.clip[names[this.stack[row][col]] || "black"].clone();
1 Like