carykh / VirusGame

Watch here for information about this project: https://www.youtube.com/watch?v=o1IheoDRdGE
MIT License
88 stars 40 forks source link

a WORLD_SIZE > 12 makes the game crash #33

Open j0912345 opened 2 years ago

j0912345 commented 2 years ago

error: ArrayIndexOutOfBoundsException: <WORLD_SIZE> it happens in: cell.pde line #329 in function: public void pushOut(Particle waste) while(chosen == -1 || cells[y+dire[chosen][1]][x+dire[chosen][0]].type != 0){

(i know I'm talking like a compiler error)

SeanTheGleaming commented 2 years ago

I have found something interesting related to this. Most world sizes over 12 crash, but if the world size is a solution to 12*3^x (where x is a positive integer) the world doesnt crash. my guess is that it has to do with the fractal patterns, as each x adds exactly 1 layer to the fractal

j0912345 commented 2 years ago

interesting