I am trying make make a basic chunk loading system using two dimensional arrays, and PNG images. I was just wondering if it is possible to create a uninitialized array for example;
Chunk[][] chunks;
and then initialize it based on the size of the PNG image and use different rgb pixels to stand for different tiles.
Say the immage is 15x25, is it possible to initialize the two dimensional array with a somewhat like this?
chunks = new Chunk[15][25];
Or should I go about making a large array and just having the index's that aren't set be a VOID tile I could just simply make.
Thank you everybody for your help!