I am not exactly sure how to state this question, what I basically want to do is to seed a tile based map with some values. So I asked myself how I could spread some values outgoing from a start tile, with values being reduced the further I get away from that start tile. Does that make any sense? What algorithms are there to calculate spreading of fire for example, or pollution?
[0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,S,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,]
[0,0,0,0,0,0,0,0,
0,0,2,2,2,2,2,0,
0,0,2,3,3,3,2,0,
0,0,2,3,X,3,2,0,
0,0,2,3,3,3,2,0,
0,0,2,2,2,2,2,0,
0,0,0,0,0,0,0,0,]
And what if I have another starting tile, can the values be added?
[2,3,3,3,2,0,0,0,
2,3,Y,5,4,2,2,0,
2,3,5,6,5,3,2,0,
2,2,4,5,X,3,2,0,
0,0,2,3,3,3,2,0,
0,0,2,2,2,2,2,0,
0,0,0,0,0,0,0,0,]
Maybe it's like an explosion. Not sure what to look for though, I cannot find anything in my endless searches on tile based games.