I will give in details an explanation of what I wanted to do for the computer AI part. (There is no monsters in my game so I intend to use the term computer AI instead.) Each level such as level1, level2, level3, level4 etc have a certain pattern that I want the computer to follow. For example down below:
Y X
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 3*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 4*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 5*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0 7*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 8*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 9*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 10*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 11*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,99,0,0,0,0,0,0 12*16 (13X16)=208
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13*16 (13X16)=208
So let me explain above now what is this all about. It read from data the X,Y coordinate of 99, 33 and 100. 99 is the starting base where the computer starts from this point...so it plots or appear at 99 and 33 is the path it needs to go to. It will go all the way up to 100 where it ends and every time it moves on 33 it plots 33 on that spot before it goes to the second 33 until it reaches to 100 where that computer (sprite disappears) disappears. However, it is not just 33, it could be 33, 34, 35, 36, 37, 38, 39, 40, 41,42,43 and 44 as the pattern it follows. Now I don't know how do this where it starts at 99 and ends at 100 as it follows 33. But I want to be able to do something like this as well below:
Y X
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0*16 ...
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1*16 ...
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2*16 ...
Data 0,0,0,0,35,35,40,39,38,37,0,0,0,0,0,0,0,0,0,0 3*16 ...
Data 0,0,0,0,36,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0 4*16 ...
Data 0,0,0,0,33,0,0,0,0,35,0,0,0,0,0,0,0,0,0,0 5*16 ...
Data 0,0,0,0,33,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0 6*16 ...
Data 0,0,0,0,33,0,0,0,0,34,33,33,33,33,0,0,0,0,0,0 7*16 ...
Data 0,0,0,0,33,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 8*16 ...
Data 0,0,0,0,33,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 9*16 ...
Data 0,0,0,0,33,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0 10*16 ...
Data 0,0,0,0,100,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0 11*16 ...
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,99,0,0,0,0,0,0 12*16 ...
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13*16 ...
So with the above scenario it would start at 99 and complete all the patterns until it reaches to 100. I want it to be able to move and do whatever path it needs but in the end it would fill the screen with that EXACT pattern and always finish at 100...and always move and reach 100 before the computer object disappears. Any idea how I can do something like this? Any psuedoe code? Any partial code? Any advice on how to do this? Please don't send me links to wikipedia or universe where this is complex C/C++ code or theory of path taken and I have to read 100 page article...it would not help me, increase frustration and put in stuck mode. Any help on how do I start this would be great.
Thanks in advance.