0 Members and 1 Guest are viewing this topic.
...I can't understand anything in JWinslow's code o.o
.Just so we're clear, GDB1 is:.0,16,32,48,0,16,32,48,0,16,32,48,0,16,32,48,0,0,0,0,16,16,16,16,32,32,32,32,48,48,48,48.That should clear some stuff up..Lbl ANIMCopy(GDB1,L1+48,32).This copies the X values and Y values of the tiles to a memory location where they can be changed, but still remain somewhere in its original form..(overwriting GDBs overwrites the program code itself)0->[r3]For(16)^^rabs([r3]-{[r3]+32+L1})->{[r3]+32+L1}[r3]++End.The preceding code puts the distance in tiles that any tile will move in any direction in {L1+32} to {L1+47}.For(4)^^r.(as we are moving 4 pxls/frame, and 16/4=4 :p)15For(16)^^rRect(->[r3]^4*16,[r3]/4*16,15,)^^r[r3]-1End.That whole loop was to redraw the gray squares in the background, as they are erased when the tiles are moving.For(16)^^r.Loop for every tile[r3]+48+L1->[r4][r4]+16->[r5].X and Y positions of the currently looped tileIf {[r3]+16+L1}.If the tile being moved is not 0WRect({[r4]},{[r5]},15,)^^rBitmap({[r4]},{[r5]},{[r3]+16+L1}-1*32+Pic1).Erase the gray area behind the tile, and draw it at the X and Y positions it is now supposed to be in on the screen.End!If K{[r5]}+({[r3]+32+L1})->{[r5]}Else!If K-1{[r4]}-({[r3]+32+L1}*4)->{[r4]}Else!If K-2{[r4]}+({[r3]+32+L1}*4)->{[r4]}Else{[r5]}-({[r3]+32+L1})->{[r5]}End.That whole If/Else statement is supposed to update the X and/or Y positions of the tiles..(I'd've done it smaller, but Z-Test() in a subroutine causes the compiler to choke :p)[r3]++EndDispGraph^^r.Draw the current iteration to the screen.WRect(and 0,,63,).Erase every tile now drawn on the screen, so we can redraw it in a later iteration.End
yeah, those are the same graphics as in JWinslow's version and I have the permission to use them as I was the author and gave them to JWinslow
Dat grayscale when moving, though
Quote from: Hayleia on June 19, 2014, 04:12:05 pm...I can't understand anything in JWinslow's code o.oRude!
And that inconsistency with speed you're talking about? It's actually intentional, but not in the way anyone has percieved it.How my code works is: tiles move a certain speed towards their targets depending on their distance (a la the original). Therefore, it makes sense that the less tiles on the screen, the faster it seems; that means tiles may move a greater distance, and with a greater "speed". And this also stands with the more tiles on the screen, the less of a distance the tiles move, the slower it seems to go.
You did very good with yours! (Although it could be a bit faster... )
Good job . Also Jwinslow maybe your code being unreadable actually means it's too good, as in runer11fic2? (I didn't check tho)