Hello @Wiser1201 ,
In the case of a snake game, I would use some tricks to not use an undefined number of elements on my UI.
I assume from what you said earlier that there is 3 different assets, one is the head, one is the body and can be repeated and the last one is the tail.
Since the snake game is a tile based game we have a limited amount of tiles and possible positions, so I could simply put an image on each tile and load the corresponding bitmap (head, body, tail or nothing) for each of the images based on the state of the game.
But something smarter (and maybe it would work for your project) would be to only have 3 image widget, one loaded with head, one with body and one with tail.
When the snake moves, first you invalidate the 3 images, then one tile ahead, you move the head image where it is going, you move the body image where the head previously was and move to tail image where the last body part was, then you invalidate the 3 images again. The key here is that only the head and tail are invalidated so the body will not be changed even if there is no image there.
Maybe this solution is what you need because you said "Just a picture widget won't work for me because I need to draw the same picture many times in different places".
The solution works in the snake example because you only draw the picture once per tick but if you wanted to draw the picture more than once per tick (ex: one of the fruits makes the snake gain 2 length), you would need more image.
If this solution work for you, it would save you memory and computation power (because you invalidate only the necessary area) but it might be a bit tricky to implement and prone to error if someone work on the project after you without knowledge of the project.
Regards,