This project is an example of an editable tile grid that can expand infinitely in any direction. Comments explaining the code can be found inside. Controls: Use the mouse to draw. Press the arrow keys to move the camera. Press 0, 1, 2, or 3 to change the paint brush's colour.
If you have any questions, feel free to ask!