tile scrolling in random 360 directions..

BlitzMax Forums/BlitzMax Programming/tile scrolling in random 360 directions..

DREAM(Posted 2008) [#1]
Hi, i am trying to make a tile of set width and height and tileable be able to fill the screen and to be able to scroll it whichever direction i want in a 360 direction, i can do the usual 8 directions, but i was trying to make it more fluid for any direction.

this is what i Have so far.



the image "Kystal_BackTile001.png" is just a 128x128 tile, if you click left mouse it then randomly changes the move angle "tang" from 0 to 359 and moves the tiles in that direction, its just getting the map to loop perfectly for each direction, at the moment on certain directions it has gaps or overlaps the tiles.

Any ideas what i am missing here...

the basic tiles are set up with
For y = -1 To Int(game.deskheight / ImageHeight(Ttile.tileimg)) + 1
	For x = -1 To Int(game.deskwidth / ImageWidth(Ttile.tileimg)) + 1
		Ttile.Create(x*ImageWidth(Ttile.tileimg),y*ImageHeight(Ttile.tileimg)) 
	Next
Next


1 extra tile all around the screen to allow for smooth scrolling and no missing blips....

so in principle once working should work for any sized tile...

thanks..
Ian