First approach: own coordination system like rnlf sugguested
int x = (int)(player.x/CHUNK_SIZE_X); ..
Second approach: chunk is referent by real coord
int x=(int)( floor(player.x/CHUNK_SIZE_X)*CHUNK_SIZE_X);
Posted 19 September 2012 - 03:24 AM
int x = (int)(player.x/CHUNK_SIZE_X); ..
int x=(int)( floor(player.x/CHUNK_SIZE_X)*CHUNK_SIZE_X);
Posted 19 September 2012 - 03:23 AM
int x = (int)(player.x/CHUNK_SIZE_X); ..Second approach: chunk is referent by real coord
int x=(int)( floor(player.x/CHUNK_SIZE_X)*CHUNK_SIZE_X);