0 Members and 2 Guests are viewing this topic.
Repeat getKey(41)If getKey(1)Y++EndIf getKey(2)x--Endif getkey(3)x++Endif getkey(4)y--EndRENDER()DispGraph^RREndReturnLbl RendercLrDraw^RR0->G For(E,0,Hfor(D,0,wPt-Mask(D-x,E-y.{G+str1MAP}*16+Pic1TILES D+7->DG++EndE+7->EEndReturn
Code: [Select]If getKey(1)Y++EndIf getKey(2)x--Endif getkey(3)x++Endif getkey(4)y--End
If getKey(1)Y++EndIf getKey(2)x--Endif getkey(3)x++Endif getkey(4)y--End
x+getKey(3)-getKey(2)->xy+getKey(1)-getKey(4)->y
Well, ok, then. I have that about using anther pair of buffers, but to me that seemed unoptimized(is unoptimized not in the English language?(i get a red line )). If it is the standard and best way, then ok thanks.
Buff(768)->str1B1 Buff(768)->str1B2
...Note: StrB1 and StrB2 are a pair of 765 byte buffers...lbl engine128->w64->hRENDERALL()Repeat getKey(41)If getKey(1)DOWN()Endif getKey(2)LEFT()Endif getKey(3)RIGHT()Endif getkey(4)UP()EndCopy(StrB1,L6).copy tilemap buffer to display bufferCopy(StrB2,L3)...other ui stuff to render...Gdisp().copy disp buffers to greyscale buffersEndReturnLbl RIGHTHorizontal-(Str1B1)Horizontal-(Str1B2)x/8+6->Dx++Y/8+5->J-9Repeat ->E=JRENTILE()E+1ENDReturnLbl LEFTHorizontal+(Str1B1)Horizontal+(Str1B2)x++x/8-6->DY/8+5->J-9Repeat ->E=JRENTILE()E+1ENDReturnLbl UPY--Vertical+(StrB1)Vertical+(StrB2)WHLine(0,StrB2WHLine(0,StrB2y/8-4->Ex/8+7->I-13Repeat ->D=IRENTILE()D+1EndReturnLbl DownVertical-(StrB1)Vertical-(StrB2)WHLine(63,StrB2WHLine(63,StrB2y/8-4->EY++x/8+7->I-13Repeat ->D=IRENTILE()D+1EndReturnLbl RENDERALL...sence t=this is only called once, not a spped issue...ReturnLbl RENTILE .renders tile (E,D)Return!If {E*W+D+TILEMAPSTART}->C .return if tile = airRetrunIf D<<0??E<<0>>(d+1)>>W??(E+1)>>H .return if (D,E) out of boundsPr-on(D*8-x+48->A,E*8-Y+32->B,C*16+TILESPRITESTART->C,StrB1Pt-on(A,B,C+8Return
I tried the build of TinyCraft from the first post. That gif was definitely recorded with the program running at full speed, so that's a 2.5x speed boost.
scroll two pixels per frame instead of just one
use #ExprOn to request that Axe optimize for speed instead of size.
I tried the build of TinyCraft from the first post. That gif was definitely recorded with the program running at full speed, so that's a 2.5x speed boost. And I checked the screen update rate, which is only 30-40Hz; the proper update rate for "perfect" grayscale is about 60Hz. That gives it a 2x speed boost on top of the 2.5x for a total 5x more free CPU time than a "perfect" grayscale program running at normal speed.
Quote from: Runer112 on May 12, 2015, 09:34:27 amI tried the build of TinyCraft from the first post. That gif was definitely recorded with the program running at full speed, so that's a 2.5x speed boost.Well depends on if he's talking about the first part of the gif (where I explicitedly state that it's 15MHz and it's too fast) or the second part (which is 6MHz).And that message at the beginning doesn't mean "Full is useless, it's too fast without it", but "Full is useless, it's too fast with it so let's remove it" Sorry if it was not clear.