0 Members and 3 Guests are viewing this topic.
I think SourceCoder can also convert images, now.
the code is not complete, there is a part missing that:-has to let the object being disappeared if x<3 so X=1,2-it should make that the other objects stay displayed, and the data position of their data in L1 should be moved forward if a object disappears, such as Code: [Select]For(A,1,{L1+0}{L1+1+A+2}=>{L1+1+A}A+1=>AEndBut that doesnt work, then all objects disappear If you know a solution, plz post the code
For(A,1,{L1+0}{L1+1+A+2}=>{L1+1+A}A+1=>AEnd
{L1+1+A+2}=>{L1+1+A}
alright well.. i read through this topic but i still don't know what you're trying to do, besides create a level (which is too general).-what's its height?-what's its width?-how many tiles are there?-is this a level editor?-does it need to smoothscroll, or can it scroll by tiles?-are there any "special" tiles that correspond with each other?or am i completely off base?
aeTIos, all I've been able to draw from what you've said is that you want code to randomly generate levels for a sidescroller. I believe I speak for all of us when I say that this is too vague to understand what exactly you want. Despite how much we may want to help, we really can't help you until we have a better idea of what you want.
if X<3For(A,0,10){L1+A+3}→{L1+A+1}A+1→AEnd
Data(1,2)->Str1 // what object 1 = meteor, 2 = treeData(50,30)->Str2 // every 50 pixels scrolled, display a meteor. every 30 pixels scrolled, display a tree.Data(0,45)->Str3 // when you display a meteor, display it at (88,0). when you display a tree, display it at (88,45)
[meteor_sprite_hex]->Pic1[tree_sprite_hex]Repeat getKey(15) ... For(Z,0,length(Str1)-1 !If pixelsScrolled^{Str2+Z} Pt-Off(88,{Str3+Z},{Str1+Z}-1*8+Pic1 End End ...End
From what I can tell, that code will shift every other byte, starting at L1+3, backwards 2 bytes in memory. A total of 6 bytes of data will be moved. I may be wrong, but I'm guessing that this is not the effect you wanted to achieve?Before:Address: L1 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13Data: A B C D E F G H I J K L M NAfter (changes in bold):Address: L1 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13Data: A D C F E H G J I L K N M N
[meteor_sprite_hex]->Pic1[tree_sprite_hex]0->CRepeat getKey(15) ... C+1->C For(Z,0,length(Str1)-1 !If pixelsScrolled^{Str2+Z} Pt-Off(88,sin(C)//4+{Str3+Z},{Str1+Z}-1*8+Pic1 End End ...End[/code