:333:333 :3:030:: :: 3:0 ̬̬̬̪쬪̬̬̬̪쬪0:00 3:3:3:3:33333:333:333 :3 3:3:3:3:333330::3333 : 333330::3333 : 33333   ` ` ` ``` ` ` `` `` ` `` `` `` ` ` ` ` ```3000?p C `03 0D  `w ɜ  Y ePPvPpp 0 C y ̙̜ ̜̔ɐɐ̖̜ !P f P<ɐ ɜ ̒̐ ̜̖ ̓ "T  ɜ 0 ̜0̉ 9L̉ y̜̐\ D 0v < P̐  0Lu Cp 0 P `Pe 2p ! `0`0Tv0w Pu   3P `!  T P "C @   0P P `P Ct  pp ve w1 ``P`  2   p`u2P @ T ` 3 P p0D P 0 3`! 1  @ `Tp0w @ p C"v C  T0 v!C pp 0fA30`  0T@ 0  TC  P0 p` D@ @2Pv 0 B 2@` 0 BTp `v CT  0 @` PPP PpT ` 0T3 p` PPp   p P PpTv`0T 0 S ep C TB ` @  2Cv e !@ u@w   @t !D`2PS `  `P` D ST1`S pp pU A  ` v @e@Ppw@pp0 1` ePU ` `2 2 p @ @ @fS@C2 TPv00T@ ` @ p T Pv wp0P U `` C "ewP`P e 0 e@ d Tp  wT Se@P  1@@v 0 `Bu 2`  @ ` @0 p" 0 fUU0p` !3@ P0C 1SC0d p0BT  p 0` ` `0 P` @P pf  @v 0 P 3 0P V 0  2 3 UvP 2@@p P`  p  ` 0 3 2S P 0 f P  "Cu  eeP @@` f @2T P@P 2 !p03@0 `20`Tp  `p2d Pv  ! ` @`0U`T0C!  v  BP U2TB 0@D` `p0P SfR`` 0 2pD p >DP 00 `vP 0   S p`G0@ `T !@0 p @p`eP@P` p `1`p@ P`  ! `@pbz  .3`U   3 @P  /` 0 e! g@P0 /x !!0  @e B0v   3T ! Q   U@Te  0d"4 @  @ !C u1@e@S0@0 w2U p `p@00 P@1p BpD0f@@ @p U@v 3` p @0CTp@ `   @@P` @ 0 p P0p` `PpP0p @v 0`P @`p 0e A Pxe P 0Pv Tp0P@ P-3 " p` 0vf  0@Tv C p P`  3 0`0 T  pB  p/ p !v 0v! ` @  v 2p fw0p3 P 0S00 U PP 0    Tp00 Pp03 0Tew` T 0"evdw CV   `2S@ 0  p T T  0  1P P   Tfwt 3wT 0u pS p Pf0D` ` `p P0e CvB P  ` 0u v USp2 P P   C3@xp @ f p  0 d0T  C  0`CPU `  d p  @`  P 0Cv!w!ef`p v P! ` 3 p Pp ` Up` 0 U  P u 3d0tv "Uv   1`@t 0`D@Ufwp0u U!pe P!`@P p00 2vPP  0@  2 ` `P xp up02C 0` P`C P 2D @` `0u` Sp P !Cfv"Pw  p!C v P0D` `0   ` P  ` 0 Sp0 f  p0TD!Pfv CeU!@PP SD  D PP P 0P Pf3 0/vP P @@@ B U@e P @ @@` `  `p0v 0 @pv @ P  P  T @p p P 00` e v@!@v "`  T P CvT D 0` p@0P PdS 0tp 0!vp pv dS 3e Pp `w  2Pvf`2Pd d @ ` 0TpT Pd0T  @ 1@0T0pP2  CU 0Pp D P  ` PDf p  P  ppp0P@0`0 "fw  Tp " CPfe 1Pwew 0!  S@p ` P P 02 `2   PD C 3"0`@ !p @Up@p1P0Pp` ` 2T   Pf2` `0D!3 1CF0T!2f C`w2 0e 3e 1e"`ewB   2T! e0` @dP` pw @e0 00 C `    P`T@ 0 @ 0w P   0"e D`  C0 2f  @  0U !  03pp ` @`!`! C 0 P`BP` e  e@U2 d`3Uv v "-- title: game title -- author: game developer, email, etc. -- desc: short description -- site: website link -- license: MIT License (change this to your license of choice) -- version: 0.1 -- script: lua math.randomseed(5) math.randomseed(100) waitBeforeExist = 8000 frameCount=0 earthSprite=5 earthDecalX=35 earthTime=0 t=0 x=96 zoom = 6; y=24 pause=false ang = 0 lineLength=10 maxParticles = 2000 blackHolesLimit = 9 refreshCpuTime = 0; cpu = 0 blackHolesCount=0 stopBlackHoles=false state = "one_star" ct =0; prevText="" cls(0) music(0) realScreenWidth=240 realScreenHeight=136 screenWidth=240/2 screenHeight=136/2 --co = {} --co[1] = coroutine.create(function () -- print("hi") -- end) earthScale=1 sqrt = math.sqrt sin = math.sin cos = math.cos rnd = math.random items = {} function add() if #items > maxParticles then return end i = #items + 1 sr = rnd(3) if sr == 1 then speed = 0.2 end if sr == 2 then speed = 0.5 end if sr == 3 then speed = 1 end --if iscreenWidth) then items[i].dx = -1 end end if (items[i].y<0) then items[i].dy = 1 end if (items[i].y>screenHeight) then items[i].dy = -1 end ang = ang + 0.000001 --3.14/4; -- ang + 0.1; if ang > 3.14 then ang = ang - 3.14 end rotX = items[i].x; rotY = items[i].y; rottedX = rotX*cos(ang) - rotY*sin(ang) rottedY = rotY*cos(ang) + rotX*sin(ang) items[i].color = rottedX%16; x = items[i].x; y = items[i].y; if #items>=maxParticles then if blackHolesCount==0 then blackHolesCount=1 end blackHolesCount = blackHolesCount + 0.000005 if blackHolesCount >blackHolesLimit then blackHolesCount=blackHolesLimit stopBlackHoles = true -- dclenche aussi le zoom end for j=1, blackHolesCount, 1 do if items[j]~=nil then if stopBlackHoles then --items[j].speed = 0 end cx = items[j].x; cy = items[j].y; items[j].cr = items[j].cr + 0.0001; if items[j].cr>60 then items[j].cr=60; end cr = items[j].cr; dist = sqrt(pow(x-cx) + pow(y-cy)); if (dist blackHolesLimit -- and -- x>screenWidth/2 - 5 and -- xscreenHeight/2 -5 and -- y5000 and #items<500 then if frameCount%10 then add(); end end if #items>200 then add(); add(); add(); add(); end if keyp(16) then pause=not pause end --if key(16) and not pause then pause=true end --cls(0) -- trace(#items,8) ComputeLoop(1, #items) if earthSprite==49 then for i=1, #items, 1 do -- erase loop items[i].x = -100 items[i].y = -100 end waitBeforeExist = waitBeforeExist - ct; if waitBeforeExist<0 then exit() end end for i=1, #items, 1 do -- erase loop if pause==false then pix(items[i].prevX[1], items[i].prevY[1], 0) -- circ(items[i].prevX[1], items[i].prevY[1], 2, 0) for k=2, lineLength, 1 do items[i].prevX[k-1] = items[i].prevX[k] items[i].prevY[k-1] = items[i].prevY[k] end items[i].prevX[lineLength] = items[i].drawX; items[i].prevY[lineLength] = items[i].drawY; --circ(x,y, 2, color) end end for i=1, #items, 1 do -- draw loop if pause==false then pix(items[i].drawX, items[i].drawY, items[i].color) --circ(x,y, 2, color) end end if prevText~="" then print(prevText, 0,0, 0) print(prevText, 1,1, 0) end -- if #items > maxParticles then -- text = "particles: too much"; -- else timeAfter = time() if refreshCpuTime<=0 then refreshCpuTime = 100; cpu = ((timeAfter-timeBefore)*100)/16 cpu = math.floor(cpu) end ct = (timeAfter-timeBefore) earthTime = earthTime - (timeAfter-timeBefore); refreshCpuTime = refreshCpuTime - (timeAfter-timeBefore); text = "particles: " .. #items; text = text .. " black holes: " .. math.floor(blackHolesCount); -- text = text .. " ang: " .. ang; text = text .. " cpu: " .. cpu .. "%"; -- end prevText = text if earthSprite==49 then else --print(text ,0,0, 9) --print(text ,1,1, 12) end --t=t+1 end