Jump to content

Multiple buttons, slow reaction time


Recommended Posts


For a game, I need to make a 8 * 10 grid with buttons as follow :

var counter = 0;
for (var i = 0; i < 8; i++) {
    for (var j = 0; j < 10; j++) {
        this.btnNumbers[counter] = this.game.add.button(50 * j, 50 * i, 'check-box-rounded', this.onNumberTicked, this);


The "onNumberTicked" event add a sprite over the button to make it feel as "checked" (I don't use buttons frames for that because I need to overlay a bigger image over a text centered on the button).

My probleme, is that with about 10 buttons, onNumberTicked is called quickly, but when I add 80 buttons, I notice a big delay, maybe about ~500 ms. Is there a solution to solve this issue ?


Thank you for you replies,


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...