x-d Very, very compressed source. From 20 to 10 lines
Load dll WinDir$()+"\TEMP\dbpdata\DBProSystemDebug.dll", 1 : tmp$=Str$(tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProBasic3DDebug.dll", 2) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProInputDebug.dll", 3) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\Core.dll", 4) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProCameraDebug.dll", 5) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProLightDebug.dll", 6) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProImageDebug.dll", 7) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProTextDebug.dll", 8) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProVectorsDebug.dll", 9) And tmp=Call Dll(1, "?DLLLoad@@YAXKH@Z", WinDir$()+"\TEMP\dbpdata\DBProBasic2DDebug.dll", 10)) : tmp$=Str$(tmp=Call Dll(3, "?HideMouse@@YAXXZ") And tmp=Call Dll(4, "?SyncRate@@YAXH@Z", 60) And tmp=Call Dll(4, "?SyncOn@@YAXXZ") And tmp=Call Dll(5, "?SetRange@@YAXMM@Z", 0.01, 6000.0) And tmp=Call Dll(6, "?SetAmbient@@YAXH@Z", 100) And tmp=Call Dll(4, "?Randomize@@YAXH@Z", Call Dll(4, "?TimerL@@YAHXZ")) And tmp=Call Dll(2, "?SetTexture@@YAXHH@Z", 1, 1) And tmp=Call Dll(2, "?SetCollisionOff@@YAXH@Z", 1) And tmp=Call Dll(2, "?MakeSphere@@YAXHMHH@Z", 1, 10.0, 100, 100) And tmp=Call Dll(7, "?LoadEx@@YAXPADH@Z", "planet.jpg", 1) And tmp=Call Dll(2, "?Set@@YAXHHHHH@Z", 2, 0, 0, 0, 1) And tmp=Call Dll(2, "?SetCollisionOff@@YAXH@Z", 2) And tmp=Call Dll(2, "?SetTexture@@YAXHH@Z", 2, 2) And tmp=Call Dll(2, "?MakeSphere@@YAXHMHH@Z", 2, 3000.0, 100, 100) And tmp=Call Dll(7, "?LoadEx@@YAXPADH@Z", "space.jpg", 2) And tmp=Call Dll(2, "?SetCollisionOff@@YAXH@Z", 3) And tmp=Call Dll(2, "?SetTexture@@YAXHH@Z", 3, 3) And tmp=Call Dll(7, "?LoadEx@@YAXPADH@Z", "moon.jpg", 3) And tmp=Call Dll(2, "?MakeSphere@@YAXHMHH@Z", 3, 5.0, 50, 50) And tmp=Call Dll(2, "?OffsetLimb@@YAXHHMMM@Z", 4, 0, 0.0, 0.0, 120.0) And tmp=Call Dll(2, "?Hide@@YAXH@Z", 4) And tmp=Call Dll(2, "?MakeBox@@YAXHMMM@Z", 4, 0.05, 0.05, 240.0) And tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 1))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 2))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 3))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 4))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 5))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 6))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 7))+Str$(tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 8)) : Do : If X Vector2(2)=X Vector2(3)
tmp$=Str$(tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 2, 0.0, 0.0) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 6, 0.0, 0.0) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 3, X Vector2(3)+5, 0.0) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 3, X Vector2(5)+ X Vector2(4), 0.0) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 4, X Vector2(3)-((X Vector2(3)/100.0)*(X Vector2(6)*10)), 0.0)) : For I=1 To Int(X Vector2(3)) : If Object Exist(I+4) : Delete Object I+4 : EndIf
tmp$=Str$(tmp=Call Dll(2, "?SetTexture@@YAXHH@Z", 4+I, 3) And tmp=Call Dll(2, "?MakeSphere@@YAXHMHH@Z", 4+I, 1.0, 3+Rnd(2), 3+Rnd(2)) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 10+I, 0.0, 0.0) And tmp=Call Dll(9, "?MakeVector2@@YAHH@Z", 10+I)) : Repeat : Position Object 4+I, RND(500)-RND(1000), RND(500)-RND(1000), RND(500)-RND(1000) : Until Sqrt(Object Position X(4+I)^2+Object Position X(4+I)^2+Object Position X(4+I)^2) > 200.0 And Sqrt(Object Position X(4+I)^2+Object Position X(4+I)^2+Object Position X(4+I)^2) < 500.0 : Next I
tmp$=Str$(tmp=Call Dll(5, "?Position@@YAXMMM@Z", Rnd(50), Rnd(50), Rnd(50)) And tmp=Call Dll(4, "?WaitForKey@@YAXXZ") And tmp=Call Dll(4, "?Sync@@YAXXZ") And tmp=Call Dll(8, "?SetTextSize@@YAXH@Z", 12) And tmp=Call Dll(8, "?CenterText@@YAXHHK@Z", Screen Width()/2, Screen Height()/2+60, "Press any key to continue") And tmp=Call Dll(8, "?CenterText@@YAXHHK@Z", Screen Width()/2, Screen Height()/2, "Level "+Str$(Int(X Vector2(3))/5)+" : Points "+Str$(Int(X Vector2(4)))+" : Total Points "+Str$(Int(X Vector2(5)))) And tmp=Call Dll(8, "?SetTextSize@@YAXH@Z", 36) And tmp=Call Dll(4, "?Sync@@YAXXZ")) : EndIf : tmp$=Str$(tmp=Call Dll(10, "?Circle@@YAXHHH@Z", Screen Width()/2, Screen Height()/2, 5) And tmp=Call Dll(5, "?SetToObjectOrientation@@YAXH@Z", 4) And tmp=Call Dll(2, "?Rotate@@YAXHMMM@Z", 4, Curveangle(Abs(X Vector2(1)-(((X Vector2(1)/90.0)-1.0)*90.0)*(Int(X Vector2(1)/90.0)/Int(X Vector2(1)/90.0)))*X Vector2(1)/Abs(X Vector2(1)), Object Angle X(4), 2.0), Wrapvalue(Curveangle(Object Angle Y(4)+Mousemovex()/2.0, Object Angle Y(4), 2.0)), 0.0) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 1, X Vector2(1)+Mousemovey()/2.0, 0.0) And tmp=Call Dll(2, "?Position@@YAXHMMM@Z", 4, Camera Position X(), Camera Position Y(), Camera Position Z()) And tmp=Call Dll(5, "?ControlWithArrowKeys@@YAXHMM@Z", 0, 0.5*(X Vector2(3)/5), 1)) : If Object Collision(4, 0) > 0 : tmp$=Str$(tmp=Call Dll(10, "?Circle@@YAXHHH@Z", Screen Width()/2, Screen Height()/2, 8) And tmp=Call Dll(10, "?Ink@@YAXKK@Z", RGB(255,0,0), RGB(255,0,0)))
If MouseClick()=1 : tmp$=Str$(tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 10+Object Collision(4, 0)-4, X Vector2(10+Object Collision(4, 0)-4)+1.0*(X Vector2(3)/5), 0.0) And tmp=Call Dll(10, "?Line@@YAXHHHH@Z", Int(Screen Width()+((Screen Width()/2-Screen Width())/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Height()+((Screen Height()/2-Screen Height())/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Width()/2), Int(Screen Height()/2)) And tmp=Call Dll(10, "?Line@@YAXHHHH@Z", Int(((Screen Width()/2)/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Height()+((Screen Height()/2-Screen Height())/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Width()/2), Int(Screen Height()/2)) And tmp=Call Dll(10, "?Line@@YAXHHHH@Z", Int(Screen Width()+((Screen Width()/2-Screen Width())/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(((Screen Height()/2)/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Width()/2), Int(Screen Height()/2)) And tmp=Call Dll(10, "?Line@@YAXHHHH@Z", Int(((Screen Width()/2)/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(((Screen Height()/2)/SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*X Vector2(7)), Int(Screen Width()/2), Int(Screen Height()/2)) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 7, RND(SQRT((Screen Width()/2)^2+(Screen Height()/2)^2))*1.0, 0.0)) : EndIf : tmp$=Str$(tmp=Call Dll(8, "?BasicText@@YAXHHK@Z", 10, 90, "Asteroid damages "+Str$(X Vector2(10+Object Collision(4, 0)-4)*2.0)+" %"+Chr$(10)+"Distance "+Str$(SQRT((Object Position X(4)-Object Position X(Object Collision(4, 0)-4))^2+(Object Position Y(4)-Object Position Y(Object Collision(4, 0)))^2+(Object Position Z(4)-Object Position Z(Object Collision(4, 0)))^2))) And tmp=Call Dll(10, "?Ink@@YAXKK@Z", RGB(255,255,255), RGB(255,255,255))) : EndIf
For I=1 To Int(X Vector2(3)) : If X Vector2(10+I) => 50.0 And Object Visible(4+I) : tmp$=Str$(tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 2, X Vector2(2)+1.0, 0.0) And tmp=Call Dll(2, "?SetCollisionOff@@YAXH@Z", 4+I) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 10+I, 0.0, 0.0) And tmp=Call Dll(2, "?Hide@@YAXH@Z", 4+I)) : EndIf : If X Vector2(10+I) < 50.0 And Object Visible(4+I) And SQRT((Object Position X(1)-Object Position X(4+I))^2+(Object Position Y(1)-Object Position Y(4+I))^2+(Object Position Z(1)-Object Position Z(4+I))^2) <= 5.0
tmp$=Str$(tmp=Call Dll(2, "?Position@@YAXHMMM@Z", 4+I, RND(500)-RND(1000), RND(500)-RND(1000), RND(500)-RND(1000)) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 6, X Vector2(6)+1.0, 0.0) And tmp=Call Dll(4, "?Cls@@YAXXZ"))
EndIf : If X Vector2(6) => 10.0 : tmp$=Str$(tmp=Call Dll(4, "?Quit@@YAKXZ") And tmp=Call Dll(1, "?ExitPrompt@@YAXKK@Z", " Game Over"+Chr$(10)+" Level "+Str$(X Vector2(3)/5)+" : Total Points "+Str$(Int(X Vector2(5))), "ARMAGEDDON by DMiTR0S")) : EndIf : tmp$=Str$(tmp=Call Dll(2, "?Rotate@@YAXHMMM@Z", 4+I, WrapValue(Object Angle X(4+I)+1.0), WrapValue(Object Angle Y(4+I)+1.0), WrapValue(Object Angle Z(4+I)+1.0)) And tmp=Call Dll(2, "?Position@@YAXHMMM@Z", 4+I, Object Position X(4+I)+((Object Position X(1)-Object Position X(4+I))/SQRT((Object Position X(1)-Object Position X(4+I))^2+(Object Position Y(1)-Object Position Y(4+I))^2+(Object Position Z(1)-Object Position Z(4+I))^2)*0.2), Object Position Y(4+I)+((Object Position Y(1)-Object Position Y(4+I))/SQRT((Object Position X(1)-Object Position X(4+I))^2+(Object Position Y(1)-Object Position Y(4+I))^2+(Object Position Z(1)-Object Position Z(4+I))^2)*0.2), Object Position Z(4+I)+((Object Position Z(1)-Object Position Z(4+I))/SQRT((Object Position X(1)-Object Position X(4+I))^2+(Object Position Y(1)-Object Position Y(4+I))^2+(Object Position Z(1)-Object Position Z(4+I))^2)*0.2)))
If ShiftKey() And Object In Screen(4+I) And Object Visible(4+I) And X Vector2(10+I) < 50.0 Then Text Object Screen X(4+I), Object Screen Y(4+I), "Asteroid #"+Str$(I)
Next I : tmp$=Str$(tmp=Call Dll(2, "?Position@@YAXHMMM@Z", 3, NewXValue(Object Position X(1), WrapValue(X Vector2(8)), 100), Object Position Y(1), NewZValue(Object Position Z(1), X Vector2(8), 100)) And tmp=Call Dll(9, "?SetVector2@@YAXHMM@Z", 8, X Vector2(8)+0.01, 0.0) And tmp=Call Dll(2, "?YRotate@@YAXHM@Z", 1, Object Angle Y(1)+0.3) And tmp=Call Dll(4, "?Sync@@YAXXZ") And tmp=Call Dll(8, "?BasicText@@YAXHHK@Z", 10, 10, "ARMAGEDDON by DMiTR0S: dmitr0s@newmail.ru"+Chr$(10)+"Press Shift to see positions of asteroids"+Chr$(10)+"Asteroids remaining "+Str$(X Vector2(3)-X Vector2(2))+Chr$(10)+"EARTH damages "+Str$(X Vector2(6)*10.0)+" %")) : Loop : tmp$=Str$(tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 1) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 2) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 3) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 4) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 5) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 6) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 7) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 8) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 9) And tmp=Call Dll(1, "?DLLDelete@@YAXH@Z", 10))