Hello Telokis,
first of all, thanks for your reply!
The type comparison was a very good tip. I will watch out for that in the future. I did some further testing myself and changed the code, so it will just set up the array first and then create the gamefield, but the results were even stranger:
for(var i=0; i < 64; i++)
{
for(var j=0; j < 32; j++)
{
if(Phaser.Math.Between(1,100) > 33)
{
gameArr[i][j] = 0;
}
else
{
gameArr[i][j] = 1;
}
}
}
for (var i = 0; i < 1600; i+=25)
{
for(var j = 0; j < 800; j+=25)
{
if(gameArr[i / 25][j / 25] === 0)
{
var x = i + 8.25;
var y = j + 6.25;
blocks.create(i + 12.5, j + 12.5, "free_inactive").setScale(0.25);
this.add.text(x, y, '0', { fontSize: '12px', fill: '#ffffff' });
}
else
{
blocks.create(i + 12.5, j + 12.5, "occupied_inactive").setScale(0.25);
}
}
}
This was the result (tested in Firefox and Chrome):
Even though, I didn’t change any of the assets. I suspected a memory problem with the virtual machine and increased its RAM from 4 to 8 GB, but everything stayed the same. After that, I thought, this might be due to a faulty installation of sorts and reinstalled the machine, but same results.
I think, this might either be a problem with my browser, the Plesk webhost environment or the VirtualBox environment. Since my ISP has thrown me in a new net, I have to wait until tomorrow, so I can access my webserver again from work. There, I will upload the code and see, if the behaviour changes and it will be more comfortable to test.
Thanks again for all the support and happy new year!
Schmiddae