Hello,
I have another project, and I need the help of confirmed ASOC programmers to know if this project is possible with Cocoa’s methods.
I want to implement an editable map, given the following parameters:
The map view is a matrix of 64x64 cells of a given size (8x8 pixels).
Each cell retains one information : a type of terrain (the map is flat).
This information is set with a tool : you choose a “type of terrain” from a palette, and click on the cells (like a Photoshop’s pencil on a bitmap) to attribute the type of terrain to the cell.
Once finished with the editing, you click on “Save” to write the map to a file. There is no undoable action.
Full stop.
The first implementation of this project was made with a bitmap. The “cells” were points of this bitmap, so everything (click locations included) had to be multiplied by 8.
I was wondering how to get this done with Cocoa’s powerful interface and methods.
My first idea was to implement a monstrous set of 4096 tiny image wells arranged to form the matrix. :o
My second was to make a image background of a grid and calculate where the click occurred (that was the first implementation) but I didn’t know what to do next.
Then I went to the idea of a tableView, with cells in row and columns.
It should not be impossible to do this – with minimal memory consumption.
Or am I just being seriously wrong?
Regards,