0 Members and 1 Guest are viewing this topic.
2->ARepeat A=10Text(-1,8A-16,0,sub(Str1,14A-12,12StorePic 1Text(-1,8A-16,0,sub(Str2,14A-12,12RecallPic 1A+1->AEnd
:ClrDraw:For(A,0,60,7):For(B,0,94,5):If [B](A/7+1,B/5+1:Then:Text(-1,A,B,"O:StorePic 2:Text(-1,A,B,"X:RecallPic 2:End:End:End
I always found collision detection to be slower with strings than matrices, because with matrices all you got to do is put every solid tiles at the top or bottom, event tiles in the middle and then you only have to check if the tile number is below or above a certain number or between a certain number and another. With strings you need to check for every possible characters you can walk on so the more non-solid tiles you got, the slower your walking engine will be. This is the reason why in Illusiat 13 there are only two possible tiles you can walk on
true. Had Illusiat used matrices it would alerady hit about 130 KB right now I think
With strings you need to check for every possible characters you can walk on so the more non-solid tiles you got, the slower your walking engine will be.
Yeah that's true, but I don't know. Strings are WAY WAY smaller than matrices, especially for what I'm doing, that the slighter delay in hit detection doesn't really bother me.
For(A,2,9)Text(-1,8A-16,0,sub(Str1,14A-12,12StorePic 1Text(-1,8A-16,0,sub(Str2,14A-12,12RecallPic1End
For(A,1,8)Text(-1,8A-8,0,sub(Str1,15A-14,15StorePic 1Text(-1,8A-8,0,sub(Str2,15A-14,15RecallPic 1End
hmm, interesting stuff, I just played around with your code trevmeister66and I was able to cut four bytes from it and display the same amount.Code: [Select]For(A,2,9)Text(-1,8A-16,0,sub(Str1,14A-12,12StorePic 1Text(-1,8A-16,0,sub(Str2,14A-12,12RecallPic1EndI also was testing it out and it loads at about teh same speed, but it might be a little faster, I can't really tell.EDIT: oh yeah I modified it some more and made it 15*8 and I also made it so it doesn't waste memory by making the maps have extra characters that aren't displayed.Code: [Select]For(A,1,8)Text(-1,8A-8,0,sub(Str1,15A-14,15StorePic 1Text(-1,8A-8,0,sub(Str2,15A-14,15RecallPic 1Endthis also cut's two more bytes. and that excludes the bytes saved on the maps.EDIT2: ok, I also added a little bit of game play to it, but I'm having some trouble detecting tiles above your character... how did you do detection?