While wrapping up an Arduino-based game project, I wanted to see how large a level (stored as a 2d array) could be stored on the Arduino while not making the user wait too long. Running some test code (available as a Gist here), two interesting discoveries:
- It seems that a 2d array of integers larger than 28×28 integers will crash (no error message, just stop responding)
- Varying the array size below that has basically no impact on creation time. A 10×10 and 28×28 array with 1000 random steps through the array both take 145ms from boot. Increasing the number of steps to 2000 increases the load time to 289ms.