im working on a kinda random map generator for my fighter game. Right now to simulate water i have my main terrain dip down bellow a seccond matrix that has a water textur and is constantly randomizing itself. Like this
___ ____ <<main matrix dips>
\ /
\ /
--- \------/---<<Water matrix>>
\ /
\__/<bottom of main matix witch is hidden by the water matrix
My #1 problem with this is lag. at first i made the water matrix as big as the main 1. The problem with this is the computer just about exploded because it was working so hard trying to constantly up date the water matrix. Now im trying to set the water matrix to appear where ever the dip is (the dip is placed by picking a rnd(10) and adding 20, so it always is withing 20 to thirty grids in on the main matrix witc is currently 50x50). My question is this: what point on a matrix does matrix position x(1) represent? it that the absol;ute center x corrdinate? or the cornner x corrdinate? and is it possible to keep the water matrix to constantly randomize or should i drop that becaus eit would make the computer to stressed?