'"Rotating Pyramid" 'b+2022-03-01-microAversionbyAurelvarx1,y1,x2,y2,x3,y3,x4,y4varax,ay,cx,ex,ey,xr,yr,a,width,Piwidth=800:Pi=3.14159cx=width/2ax=cx:ay=50' apexex=cx:ey=330' ellipsexr=cx*0.7:yr=0.33*xrLABELDoLoopfcolor0,0,0:rect0,0,800,600'clsx1=ex+xr*Cos(a):y1=ey+yr*Sin(a)x2=ex+xr*Cos(a+Pi*0.5):y2=ey+yr*Sin(a+Pi*0.5)x3=ex+xr*Cos(a+Pi):y3=ey+yr*Sin(a+Pi)x4=ex+xr*Cos(a+Pi*1.5):y4=ey+yr*Sin(a+Pi*1.5)fcolor220,200,100linex1,y1,x2,y2linex2,y2,x3,y3linex3,y3,x4,y4linex4,y4,x1,y1linex1,y1,ax,aylinex2,y2,ax,aylinex3,y3,ax,aylinex4,y4,ax,aya=a+0.01' use 0.01 if is slowswapGoToDoLoop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'alien_Pipes - micro(A)varlenght,angle,x,y,diff,adiffvarx2,y2,counter,a,b,pi,r,px,py,nwcolor0,0,0pi=3.14596lenght=300angle=3.44x=400y=300x2=55diff=1.14adiff=0.8y2=yfcolor0,120,80'line x y x2 y2lenght=lenght-diffcounter=0whilecounter<360ifcounter<80:fcolor0,170,180:endififcounter>80:fcolor30,80,150:endifangle=angle+adifflenght=lenght-diffa=sin(angle*pi)*lenghtb=tan(angle*pi/2)*lenghtx2=x+by2=y+ar=(counter/pi)/3circlex2,y2,rswapcounter=counter+1'swapwendfcolor200,200,220:print5,5,"Alien pipes"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'test_while/wend_blackHole varw,h,a,r,ps,i,px,py,radvarrr,gg,bb,rx,ryw=640/2:h=480/2wcolor0,0,100fcolor200,220,160print10,10,"Black hole"a=1:r=1labelagaini=1wcolor0,0,0whilei<60ps=70/(i/a)rx=cos(i*r)*ps+wry=sin(i*r)*ps+hcirclery,rx,4'change values between 0.1 and 0.08i=i+0.3'swapwenda=a+0.01ifa<20a=a+0.1r=r-0.19endififr<360r=r+0.01endififr>360r=r-1endifswapgotoagain'commenr
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'Coded By Ashish - "Dragon" in qb64'micro(A) by Aurelvarsx,sy,ox,oy,z,i,x,y,xx,yy,n,a,b,r,px,pywcolor0,0,0z=40ox=600*0.46oy=380*0.09fcolor255,180,0i=0whilei<5000a=sx:b=syx=a:y=blabeldrawDragonr=rnd(1)ifr>0ifr<0.8xx=0.824074*x+0.281428*y-1.88229yy=-0.212346*x+0.864198*y-0.110607endif'endifelse'if r < 0xx=0.088272*x+0.520988*y+0.78536yy=-0.463889*x-0.377778*y+8.095795endifpx=xx*z+ox:py=yy*z+oypsetpx,pyifn<5n=n+1:gotodrawDragonelsesx=xx:sy=yyn=1endifi=i+1swapwendprint10,10," Dragon Curve in micro(A)":swap
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'Fractal19 from mySmallBasic-> in micro(A)
var x,y ,i,r,ux,uy
wcolor 20,60,40 : fcolor 180,180,230
print 10,10,"Fractal19 from MySmallBasic-github...in micro(A)"
x = 100 : y = 100
'change color
fcolor 220,220,100
while i < 10000
r = rand(3)
ux = 150
uy = 30
Ifr=1ux=30uy=1000EndIfIfr=2ux=1000uy=1000EndIf
x = (x + ux) / 2
y = (y + uy) / 2
pset x, y
i=i+0.5
wend
swap
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'full_circle by [B+=MGA]2017->micro(A) by aurel'everything was supposed to be turning around another circlevarxc,yc,xx,yy,x,y,x3,y3,r,w,ww,w3,pi,i,j,k,ww,loopxc=640/2:yc=480/2:pi=3.14:i=1:j=1:k=1:loop=1wcolor0,0,0whileloop<2400r=r+pi/180w=w+pi/72i=1:j=1:k=1whilei<12x=xc+200*cos(w+i*pi/6)*sin(r)y=yc+200*sin(w+i*pi/6)*sin(r)fcolor120,150,100:circlex,y,40ww=ww+pi/80whilej<12xx=x+100*cos(ww+j*pi/6)*sin(r)yy=y+100*sin(ww+j*pi/6)*sin(r)fcolor150,100,100:circlexx,yy,20w3=w3+pi/80whilek<12x3=xx+50*cos(w3+k*pi/6)*sin(r)y3=yy+50*sin(w3+k*pi/6)*sin(r)fcolor100,120,150:circlex3,y3,rk=k+1wendj=j+1wendi=i+1wend'wcolor 0,0,0loop=loop+0.1swapwend
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'primitive game in microA with Johnno help varr,g,b,mx,my,ax,ay,wp,p,scorevarbf,bx,by,bs,ex,ey,hit,eh,evptrwmKeyDown,wmTimeray=175:ax=120:ex=5:ey=10wcolor0,0,0:fcolor140,180,200print20,410,"primitive game in micro(A)"print20,430,"move 'A' with LEFT<->RIGHT arrow keys"print20,450,"Shoot with SPACE bar"print20,470,"Pause with ESC key"print456,10,"player":print456,40,"bullet":print456,70,"enemy"print456,100,"score"updateScreen():fcolor220,10,10:printax,ay,"A"hit=0WinMsgwmKEYDOWNhWparamwp'vkLEFT ?-----------------------------------ifwp=37ifax>11:ax=ax-5:endifendif'vkRIGHT ?----------------------------------ifwp=39ifax<229:ax=ax+5:endifendif'vkSpace ?----------------------------------ifwp=32ifbf=0bf=1bx=axby=ayendifendif'empty loop ---------------------------------whilewp!27fcolor180,180,120:rect1,1,256,192updateScreen()updateBullet()updateEnemy()testCollision()'delay loopp=0whilep<800p=p+0.1wendswapwendEndWm'--------------------------------------------------funcupdateScreen()'update ax positionfcolor80,80,100:rect524,5,68,24fcolor100,160,220:print530,10,ax'display playerfcolor100,210,230:printax,ay,"A"'Display bullet ifbf=1fcolor255,255,0:printbx,by,"^"'update by bullet positionfcolor80,80,100:rect524,35,68,24fcolor235,218,100:print530,40,byendif'display enemyfcolor0,150,100:rectex,ey,10,6'update ex enemy positionfcolor80,80,100:rect524,65,68,24fcolor100,160,100:print530,70,ex'update scorefcolor80,80,100:rect524,95,68,24fcolor245,118,0:print530,100,scoreswapendfn'----------------------------------------------------------------funcupdateBullet()ifbf=1by=by-5'Bullet has left the screen. ifby<0:bf=0:endifendifendfn'----------------------------------------------------------------funcupdateEnemy()ifex<250:ex=ex+5:endififex>240:ex=5:endififey>100:ey=5:endifeh=ex+10:ev=ey+10fcolor0,150,100:rectex,ey,10,6endfnfunctestCollision()'if(pointX > rectX && pointX < rectX + rectWidth){' if(pointY > rectY && pointY < rectY + rectHeight){' //the point is inside the rectangle ' }'}ifbx>ex&bx<ehifby>ey&by<evhit=1endifelsehit=0endififhit=1fcolor220,100,100:printex,ey,"-XX-":score=score+10endifendfn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'test demo in gdiptrimg,img2,img3,img4ptrwmKeyDown,wmTimervarwp,ix,iy,p,ex,ey,eh,ev,bx,by,bf,hitvarscwcolor200,200,210fcolor180,60,150:print10,510,"give banana to monkey"LoadImgimg,"beach.bmp",0,640,400,16'program name...print10,440,"Coconut Monkey m(A)":print10,460,"Press ESC for pause.."'show img on windowShowImgTimg,0,0,640,360'load another image LoadImgimg2,"explorer1.bmp",0,32,32,16LoadImgimg3,"monkey1.bmp",0,32,32,24LoadImgimg4,"banana.bmp",0,32,32,16ShowImgTimg3,300,300,32,32ex=300:ey=30:ix=300:iy=360updateScreen():sc=0'show score rectfcolor80,80,100:rect524,470,68,24fcolor245,118,0:print530,475,sc'events...WinMsgwmKEYDOWNhWparamwp'vkLEFT -----------------------------------ifwp=37ifix>0:ix=ix-5:endifendif'vkRIGHT ?----------------------------------ifwp=39ifix<600:ix=ix+5:endifendif'vkUP --------------------------------------ifwp=38ifiy>0:iy=iy-5:endifendif'vkDOWN -------------------------------------- ifwp=40ifiy<360:iy=iy+5:endifendif'vkSPACEifwp=32ifbf=0bf=1bx=ixby=iyendifendif'game loop if key not ESCwhilewp!27updateBack()updateShip()updateBullet()updateEnemy()testCollision()updateScreen()'delay loop' p=0'while p < 80'p=p+0.1'wendswapwendEndWmfuncupdateScreen()fcolor80,80,100:rect524,415,68,24fcolor100,160,220:print530,420,ixfcolor80,80,100:rect524,440,68,24fcolor100,160,220:print530,445,iy'Display bullet ifbf=1ShowImgTimg4,bx,by,32,32endif'show enemyShowImgTimg3,ex,ey,32,32'show ship ShowImgTimg2,ix,iy,32,32'update score'if hit = 1fcolor80,80,100:rect524,470,68,24fcolor245,118,0:print530,475,sc'endif'swapendfnfuncupdateBack()ShowImgTimg,0,0,640,400endFnfuncupdateShip()ShowImgTimg2,ix,iy,32,32endFnfuncupdateBullet()ifbf=1by=by-1'Bullet has left the screen. ifby<0:bf=0:endifendifendfnfuncupdateEnemy()eh=ex+32ev=ey+32ifex=598:ex=0:endififex<600:ex=ex+1:endifendfnfunctestCollision()'hit=0ifbx>ex&bx<ehifby>ey&by<evhit=1endifelsehit=0endififhit=1'fcolor 220,100,100'print ex,ey,"-XX-"sc=sc+1endifendfn'func updateScore()'fcolor 80,80,100 : rect 524,470,68,24 ' fcolor 245,118,0 : print 530,475,sc 'endfn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'mini solar system - micro(A)varx,y,x1,y1,pi,t,w,h,r,w2,h2,fPi,fRad,r2varx2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8,x9,y9varr2,r3,r4,r5,r6,r7,r8,r9w=800:h=600:w2=w/2:h2=(h/2)-20fPi=Cos(0.98):fRad=fPi/180wcolor0,0,0t=0r=30r2=50r3=90r4=130r5=150r6=190r7=220r8=240r9=270fcolor0,100,200'----------------------------------labelstartfcolor160,160,160:rect0,0,800,600fcolor160,160,160:circlew2,h2,r9fcolor160,160,160:circlew2,h2,r8fcolor160,160,160:circlew2,h2,r7fcolor160,160,160:circlew2,h2,r6fcolor160,160,160:circlew2,h2,r5fcolor160,160,160:circlew2,h2,r4fcolor160,160,160:circlew2,h2,r3fcolor160,160,160:circlew2,h2,r2fcolor160,160,160:circlew2,h2,r'sunfcolor240,200,100:circlew2,h2,10:print4,4,"MINI SOLAR SYSTEM"x=w2+r*Cos(t+0.5+fRad*90):y=h2+r*Sin(t+0.5+fRad*90)fcolor150,100,20:circlex,y,5:printx,y,"mercury"x2=w2+r2*Cos(t-0.5+fRad*90):y2=h2+r2*Sin(t-0.5+fRad*90)fcolor200,180,0:circlex2,y2,8:printx2,y2," venus"x3=w2+r3*Cos(t+fRad*90):y3=h2+r3*Sin(t+fRad*90)fcolor0,150,200:circlex3,y3,8:printx3,y3," earth"x4=w2+r4*Cos(t+0.9+fRad*90):y4=h2+r4*Sin(t+0.9+fRad*90)fcolor240,160,100:circlex4,y4,7:printx4,y4," mars"x5=w2+r5*Cos(t-0.9+fRad*90):y5=h2+r5*Sin(t-0.9+fRad*90)fcolor180,190,210:circlex5,y5,12:printx5,y5," jupiter"x6=w2+r6*Cos(t-2.5+fRad*90):y6=h2+r6*Sin(t-2.5+fRad*90)fcolor230,190,110:circlex6,y6,10:printx6,y6," saturn"x7=w2+r7*Cos(t-3.2+fRad*90):y7=h2+r7*Sin(t-3.2+fRad*90)fcolor130,190,240:circlex7,y7,6:printx7,y7," uranus"x8=w2+r8*Cos(t-4.2+fRad*90):y8=h2+r8*Sin(t-4.2+fRad*90)fcolor130,190,160:circlex8,y8,6:printx8,y8," neptune"x9=w2+r9*Cos(t-5.5+fRad*90):y9=h2+r9*Sin(t-5.5+fRad*90)fcolor160,160,160:circlex9,y9,5:printx9,y9," pluto"t=t+0.001666swapgotostart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'test demo in gdiptrimg,img2,img3ptrwmKeyDown,wmTimervarwp,ix,iy,p,ex,eywcolor200,200,210fcolor180,60,100:print110,10,"Test Load Bitmap Image into handler"'syntax-> LoadImg (1)hImg , (3)str "img.bmp" ,(5)imgType , (7)w , (9)h, (11)colorFlagsLoadImgimg,"Jungle.bmp",0,640,360,16'print value of img handler / if value not null -> OK!print10,440,"Jungle Life m(A)"print10,460,"Move ship with arrow keys..."'show img on windowShowImgTimg,0,0,640,360'load another image LoadImgimg2,"craft2.bmp",0,116,48,16LoadImgimg3,"satelite2.bmp",0,40,40,24ShowImgTimg3,300,300,40,40ex=300:ey=300updateScreen()'events...WinMsgwmKEYDOWNhWparamwp'vkLEFT -----------------------------------ifwp=37ifix>0:ix=ix-6:endifendif'vkRIGHT ?----------------------------------ifwp=39ifix<500:ix=ix+6:endifendif'vkUP --------------------------------------ifwp=38ifiy>0:iy=iy-6:endifendif'vkDOWN -------------------------------------- ifwp=40ifiy<420:iy=iy+6:endifendifwhilewp!27updateBack()updateScreen()updateShip()'updateBullet()updateEnemy()'testCollision()'delay loop' p=0' while p < 800' p=p+0.01'wendswap'ShowImg img,0,0,646,438 wendEndWmfuncupdateScreen()fcolor80,80,100:rect524,5,68,24fcolor100,160,220:print530,10,ixfcolor80,80,100:rect524,34,68,24fcolor100,160,220:print530,38,iyShowImgTimg3,ex,ey,40,40ShowImgTimg2,ix,iy,116,48endfnfuncupdateBack()ShowImgTimg,0,0,640,360endFnfuncupdateShip()ShowImgTimg2,ix,iy,116,48endFnfuncupdateEnemy()ifex<600:ex=ex+1:endififex=598:ex=10:endifendfn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'ponggameinmicro(A)useo2_compilefunction$filename"Pong.exe"include"rtl32.inc"include"window.inc"Window"Pong in micro(A) by Aurel",320,240,1'SetFPS10x=50y=50x2=130y2=160pspeed=1xadj=1yadj=1delay=1score=0'haha="wav/haha.wav"'pong="wav/pong.wav"WHILEKey(27)=0ClsColor(200,200,247)Circle(x,y,8,0,0,255)FillBox(x2,y2,30,4,255,255,255)Box(20,20,280,160,4,255,255,0)Text(10,0,"SCORE:"&score,255,0,0)IFy<=20yadj=1'PlayWavpongENDIFIFy>=180yadj=-1'PlayWavpongENDIFIFx>=300xadj=-1'PlayWavpongENDIFIFx<=20xadj=1'PlayWavpongENDIFIFKey(37)ANDx2>18:x2=x2-pspeed:endifIFKey(39)ANDx2<270:x2=x2+pspeed:endifx=x+xadjy=y+yadjIFy>y2-7ANDy2<y2+2ANDx<x2+30ANDx>x2yadj=-1score=score+1ENDIFIFy>y2+10'Text(sysx,y,stringtxt,sysr,g,b)Text(100,200,"GAME OVER!",0,160,55)'PlaywavhahaWaitkey(27)score=0x=5y=5x2=130y2=150ENDIFFlipBuffer()SetFps60WENDWinEnd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Under this topic i will try to add examples and programs written in micro(A)
fake pyarmid by Paul Dunn
Alien Pipes
BlackHole...vortex animation
butterfly...
Dipol antenna Calculator
Factorial with recursion
'Fractal19 from mySmallBasic-> in micro(A)
var x,y ,i,r,ux,uy
wcolor 20,60,40 : fcolor 180,180,230
print 10,10,"Fractal19 from MySmallBasic-github...in micro(A)"
x = 100 : y = 100
'change color
fcolor 220,220,100
while i < 10000
r = rand(3)
ux = 150
uy = 30
x = (x + ux) / 2
y = (y + uy) / 2
pset x, y
i=i+0.5
wend
swap
full circle by MGA
primitive game in microA with Johnno help
GDI demo
mini Solar system
MoveImage
Jungle life
Move with key UPDATED
PONG in micro(A)
'origin by Aurel
GDI Robot in bush: