direction=path[((x>>bloon_fract_bits)/tile_size_px)+(((y>>bloon_fract_bits)/tile_size_px)*11)];Also just to give a heads up the bitshifts are because I am using fixed point math for the enemy speed and the array path is uchar array that is 88 bytes my level is 11x8 tiles and the tiles are 64 pixels each
Here are some pictures
The correct path in the level editor:
Click on image for full size on my computer it resizes the pictures ~99% and makes them look blurry it is not your vision.
The incorrect path being taken
If anybody has a good algorithm to correctly follow the path it would help me alot thank you for reading this
Edited by sega16, 29 September 2012 - 09:33 PM.