Posted 24 July 2013 - 01:59 PM
I am trying to write a program for a simple rpg game. But I am running into a problem. The way I am setting it up is that I have to call a function for every tile in the map. I am using loops when there is a pattern to the kind of tile I am placing. However it is just too cluttered and messy. For the sake of optimization and ease of making a map I want to have a file called "map" and I would be able to take all information from it about the area, and it would look like something like this.
qqqqqqqqqqqqqqqqqqqqqqqqq
qoooooooooooooooooooooooq
qoooooooooooooooooooooooq
qooooooooyyyyyyyooooooooq
qooooooooysssssyooooooooq
qooooooooysssssyooooooooq
qooooooooysssssyooooooooq
qooooooooyyyyyyyooooooooq
qoooooooooooooooooooooooq
qoooooooooooooooooooooooq
qqqqqqqqqqqqoqqqqqqqqqqqq
So my question Is, would there a simple way to check the character in a specified row and column from another program, and would there be a way to edit the character by specifying its position in the file from another program.