New games every week!
JSE - Optimisationalism 3 - Optimise with a Vengeance Blog
12th October 2021
Oooh, a stress test!

-=-=-

I've made a new stress tester, which incorporates audio, music, sprites as well as testing ifs, arrays, random numbers and more.
It's a heck of a lot tougher on the engine than the previous edition of Optimisationalism, so should help me get things a bit more speedy in the long-term.

I hope!!

// Optimisationalism 3 - Optimise with a Vengeance // by Jayenkai // Created 2021/10/12 // https://SoCoder.net/?GotoPost=80562 // GotoJSE.com/46DDqcxw.BAS Symbol 0,"05_40!404044040,40040,404404004044040,40040,404404040!4"; JMTrackr 180,"<C32r1r2r4r8r16r32|r2<C8r1r4r8|r1r4<C32r32C32r2r8r32|r4r8C32r4r16r32C32r4r16r32C32r2r4r16r32|r2<C32r4r16r32C32r2r4r16r32C32r32C32r32C32r16r32|r1|[d]|G+1G+1|r1|",1 max=2000 Dim Array(max,5) Dim Array2(max,5) tick=0 CLS 0,60,0 Graphics 640,480,3 Repeat CLS 0,60,0,0.5 t=Mills() SeedRnd 37171650 ResetDraw:SetCol 180,255,180 SetAlpha 0.1 for m=0 to 99 SetRot m*3.6+Mills()*0.05 SetSize Rand(0.5,3) Plot Rand(ScreenWidth()),Rand(ScreenHeight()) DrawImg Rand(ScreenWidth())+Sin(m*37+Mills()*0.06)*360,Rand(ScreenHeight())-Cos(m*37+Mills()*0.045)*360,0,Rand(0,7) Line Rand(ScreenWidth())+Sin(m*37+Mills()*0.004)*360,Rand(ScreenHeight())-Cos(m*37+Mills()*0.003)*360,Rand(ScreenWidth())+Sin(m*37+Mills()*0.002)*360,Rand(ScreenHeight())-Cos(m*37+Mills()*0.001)*360 next SeedRnd ResetDraw SetFont "Segment8":SetFontSize 8 avg=0 y=0 for m=max-1 to 0 step -1 if m<max-1 then Array(m)=Floor(Array(m+1)+1.234) Array(m)=Pyth(Array(m),Array(m+1)) Array(m)=(Array(m)+Array(m+1)) endif if m==max-1 then Array(m)=Rand(37171650) if Array(m)>37171650 then Array(m)=Array(m)*0.01 if m mod 30==1 d=Rand(20,50) SetCol d,d*5,d v=Sin(Mills*0.05)*Cos(Mills*0.03)*0.2 Text 64+Abs(Sin(m*v+Mills()*0.1))*64,y*8+4,Array(m):y=y+1 endif next SetCol 180,255,180 for m=0 to 59 avg=avg+Array2(m) Array2(m)=Array2(m+1) SetCol m,m*4,m Text 2,(m*8)+4,Array2(m) Plot Rand(ScreenWidth()),Rand(ScreenHeight()) next tick=tick+1 if Rand(0,50)<2 then PlaySFX("Sonniss_Ui_"+Rand(1,10)) avg=Floor(avg/59) SetFont "CPC" If tick>60 SetFontSizeFit avg,640,480 Text ScreenWidth()/2,ScreenHeight()/2,avg,1 endif If tick<=60 SetFontSizeFit "Working",640,480 Text ScreenWidth()/2,ScreenHeight()/2,"Working",1 endif Array2(60)=Mills()-t Flip Forever

Views 133, Upvotes 4  
Jse , Optimising
New games every week!
Site credits : Jayenkai, one crazy fool who has far too much time on his hands.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - JSE - Optimisationalism 3 - Optimise with a Vengeance - AGameAWeek