# Dark Bit Factory & Gravity

## GENERAL => Challenges & Competitions => Topic started by: relsoft on June 20, 2006

Title: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 20, 2006
Updated and Optimized.....

New update: More stars and more bob helix

Code: [Select]
`'Here's my final entry to the 20 line screen effect challenge in DBF'Features'1. scaled and multi colored 3d Starfield'2. 3d rubber band effect'3. scaled and multicolored 3d bobs'Relsoft 2006'http://rel.betterwebber.com'updated!!!!1     IF F& = 0 THEN SCREEN 18,32 , 2,1 ELSE if F% = 1 then screenset 1,0 else LINE (0, 0)-(639, 479), 0, BF2     F& = (F& + 1) AND &H7FFFFFFF3     FOR i% = 0 TO 3004     if i% < 300 then A! = (A! + 0.0003) * -(A! < 6.283186 - 0.0003) else screensync5     IF F& = 1 THEN DIM S!(300, 3) ELSE IF F& = 2 THEN S!(i%, 0) = -90 + INT(RND * 180) ELSE IF F& = 3 THEN S!(i%, 1) = -80 + INT(RND * 160)6     IF F& > 3 THEN S!(i%, 2) = (S!(i%, 2) + S!(i%, 3)) * -(S!(i%, 2) < 253) ELSE S!(i%, 2) = INT(RND * 255)7     IF F& > 3 THEN CIRCLE ((320 + (256 * S!(i%, 0) \ (256 - S!(i%, 2)))), (240 - (256 * S!(i%, 1) \ (256 - S!(i%, 2))))), 128 \ (256 - S!(i%, 2)), rgb(s!(i%, 0)*s!(i%, 1),s!(i%, 2),s!(i%, 3)) ELSE S!(i%, 3) = .1 + RND * 28     x! = ((250 * COS(4 * 3.141593 / 200 * I%)) * (COS(A!) * COS(A!)) + (250 * SIN(8 * 3.141593 / 200 * I%)) * (SIN(A!) * SIN(A!) * COS(A!) - COS(A!) * SIN(A!)) + (I% - (200 / 2)) * (COS(A!) * SIN(A!) * COS(A!) + SIN(A!) * SIN(A!)))9     y! = ((-150 * COS(8 * 3.141593 / 200 * I%)) * (COS(A!) * SIN(A!)) + (150 * SIN(8 * 3.141593 / 200 * I%)) * (COS(A!) * COS(A!) + SIN(A!) * SIN(A!) * SIN(A!)) + (I% - (200 / 2)) * (-SIN(A!) * COS(A!) + COS(A!) * SIN(A!) * SIN(A!)))10    z! = ((50 * COS(16 * 3.141593 / 200 * I%)) * (-SIN(A!)) + (50 * SIN(8 * 3.141593 / 200 * I%)) * (SIN(A!) * COS(A!)) + (I% - (200 / 2)) * COS(A!) * COS(A!))11    if i% < 300 then circle((320 + (256 * x! \ (256 - z!))), (240 - (256 * y! \ (256 - z!)))), 1024 \ (256 - z!), rgb((A! * 57.29577 + I%),(A! + I%),(A!* I%)) else y! = -320        12    NEXT i%13    twister! = 0    14    for Slice = 0 TO 640 15        if slice <640 then twister! += csng(sin(F&/18) *0.0129171) else screencopy16        y! += 117    for Band = 0 TO 3              18        line -(320 + (256 * (70+(sin((F&+slice)/42) * 15)) * cos((6.28 / 4) * Band+twister!) / (256 - z!*0.7)), 240 - (256 * y! / (256 - (70+(sin((f&+slice)/42) * 15)) * sin((6.28 / 4) * Band+twister!)))), rgb(slice * 10, band * 20 ,slice * band), , &haaefa911  19    next Band, Slice20    IF INKEY\$ = "" THEN 1 `
Code: [Select]
`'Here's my final entry to the 20 line screen effect challenge in DBF'Features'1. scaled and multi colored 3d Starfield'2. 3d rubber band effect'3. scaled and multicolored 3d bobs'Relsoft 2006'http://rel.betterwebber.com1Â  Â  Â IF F& = 0 THEN SCREEN 18,32 , 2,1 ELSE if F% = 1 then screenset 1,0 else LINE (0, 0)-(639, 479), 0, BF2Â  Â  Â F& = (F& + 1) AND &H7FFFFFFF3Â  Â  Â FOR i% = 0 TO 2004Â  Â  Â if i% < 200 then A! = (A! + .0003) * -(A! < 6.283186 - .0003) else screensync5Â  Â  Â IF F& = 1 THEN DIM S!(200, 3) ELSE IF F& = 2 THEN S!(i%, 0) = -90 + INT(RND * 180) ELSE IF F& = 3 THEN S!(i%, 1) = -80 + INT(RND * 160)6Â  Â  Â IF F& > 3 THEN S!(i%, 2) = (S!(i%, 2) + S!(i%, 3)) * -(S!(i%, 2) < 253) ELSE S!(i%, 2) = INT(RND * 255)7Â  Â  Â IF F& > 3 THEN CIRCLE ((320 + (256 * S!(i%, 0) \ (256 - S!(i%, 2)))), (240 - (256 * S!(i%, 1) \ (256 - S!(i%, 2))))), 128 \ (256 - S!(i%, 2)), rgb(s!(i%, 0)*s!(i%, 1),s!(i%, 2),s!(i%, 3)) ELSE S!(i%, 3) = .1 + RND * 28Â  Â  Â x! = ((250 * COS(4 * 3.141593 / 200 * I%)) * (COS(A!) * COS(A!)) + (50 * SIN(8 * 3.141593 / 200 * I%)) * (SIN(A!) * SIN(A!) * COS(A!) - COS(A!) * SIN(A!)) + (I% - (200 / 2)) * (COS(A!) * SIN(A!) * COS(A!) + SIN(A!) * SIN(A!)))9Â  Â  Â y! = ((150 * COS(8 * 3.141593 / 200 * I%)) * (COS(A!) * SIN(A!)) + (50 * SIN(8 * 3.141593 / 200 * I%)) * (COS(A!) * COS(A!) + SIN(A!) * SIN(A!) * SIN(A!)) + (I% - (200 / 2)) * (-SIN(A!) * COS(A!) + COS(A!) * SIN(A!) * SIN(A!)))10Â  Â  z! = ((50 * COS(8 * 3.141593 / 200 * I%)) * (-SIN(A!)) + (50 * SIN(8 * 3.141593 / 200 * I%)) * (SIN(A!) * COS(A!)) + (I% - (200 / 2)) * COS(A!) * COS(A!))11Â  Â  if i% < 200 then CIRCLE ((320 + (256 * x! \ (256 - z!))), (240 - (256 * y! \ (256 - z!)))), 1024 \ (256 - z!), rgb((A! * 57.29577 + I%),(A! + I%),(A!* I%)) else y! = -320Â  Â  Â  Â  12Â  Â  NEXT i%13Â  Â  twister! = 0Â  Â  14Â  Â  for Slice = 0 TO 640 15Â  Â  Â  Â  twister! += csng(sin(F&/18) *0.0129171)16Â  Â  Â  Â  y! += 117Â  Â  for Band = 0 TO 3Â  Â  Â  Â  Â  Â  Â  18Â  Â  Â  Â  if slice <640 then line -(320 + (256 * (70+(sin((F&+slice)/42) * 15)) * cos((6.28 / 4) * Band+twister!) / (256 - z!)), 240 - (256 * y! / (256 - (70+(sin((f&+slice)/42) * 15)) * sin((6.28 / 4) * Band+twister!)))), rgb(slice * 10, band * 20 ,slice * band), , &haaefa911Â  else screencopy19Â  Â  next Band, Slice20Â  Â  IF INKEY\$ = "" THEN 1 `

exe ans source attatched. :*)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Shockwave on June 20, 2006
Crumbs! That's a lot of effects to be squeezed into 20 lines!
Staggering.
Nice twister too :)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 20, 2006
Got bored after finishing my tute for QBE.  Last entry for me though.  Doing some newton lib learning.  For the KART game. :*)

Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Shockwave on June 20, 2006
I'd been wondering where you were Rel :)
Voting starts on Saturday btw.
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 20, 2006
Went to the boondocks, did some farming.

Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Clyde on June 20, 2006
Nice one relsoft, it has a ZX Spectrum feel to it.
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Optimus on June 20, 2006
Cool!

I have few days to work on my second entry now ;)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 21, 2006
Updated. See first post.  O0
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: cirux on June 21, 2006
Thats insane, how do you fit soo much into so little space. Great work!
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 21, 2006
O0
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Shockwave on June 21, 2006
Updated and optimised?!? It was fast as it was! :)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: relsoft on June 21, 2006
the update has screensync and put the screenflip check on the outside loop. :*)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: Tetra on June 21, 2006
Very Cool Relsoft  ;D

Really like the twisty rubber band ting :)
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: taj on December 01, 2006
Impressive as hell in 20 lines! Good one relsoft: ++ karma I think for that!
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: lilw4t3rdr0p on December 03, 2006
Love the colors. My 2 favorite! Very nice.  I agree I like the rubber band thingy.
Title: Re: Short Intro Challenge - 3d rubber, 3d starfield and 3d bobs in 20
Post by: combatking0 on December 05, 2006
Wow! It's so vibrant and lively.