balancebox: use pools to store created components
Open, NormalPublic


Instead of creating the objects at every levels, we can re-use the ones created in the previous level. If there are not enough, we'll need to create the difference, if there are too much, we can either remove the last ones or not display them

jjazeix created this task.Apr 20 2016, 3:05 PM
aseemarora added a subscriber: aseemarora.
jjazeix removed aseemarora as the assignee of this task.Dec 16 2017, 5:28 PM
dekumar claimed this task.May 7 2019, 2:29 AM
dekumar added a subscriber: dekumar.

I would like to take this up!

@jjazeix Can you please provide some more description about this issue?

For now, at each level, we delete the existing elements (walls, holes...) and create them again for a new level.
It takes time to create and delete the elements (especially with slow computers/tablets). The aim is to have a pool of elements that will be created at start of the activity and that we can use to do the elements instead of creating all of them at each level.
We have to find a compromise between the number of elements created at start (no need to create 100 walls at the beginning, it will take too much time too) and the number of elements we may need for the next level to avoid to have to wait too much for the creation of the level.