Dark Bit Factory & Gravity

GENERAL => Challenges & Competitions => Topic started by: Rbz on June 11, 2006

Title: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Rbz on June 11, 2006
Here's my entry, BlitzPlus code with "Horizontal Scroller + Check Board Background"  in 19 lines  Â  :||


Download executable ~ 322kb  (http://www.rbraz.com/temp/Rbraz%20-%20Short%20Intro%20-%201.rar)

Code: [Select]
Graphics 640,480,32,2

tile1 = CreateImage(720,720)

SetBuffer ImageBuffer(tile1)
ClsColor 30,30,80
Cls
Color 50,50,100
For y = 0 To 11
 For x = 0 To 5
  Rect x*120+z,y*60,60,60,1
 Next
 If z = 60 Then z = 0 Else z = z + 60
Next

SetBuffer BackBuffer()


While Not KeyHit(1)

If angle# > 359 Then angle# = 0 Else angle# = angle# + 0.4

TileImage tile1,320*Sin(angle#)*Cos(angle#), 240*Cos(angle#)

Text (-angle+140)*5, (Cos(angle#*10)*30)+240,"First >> Short Intro <<  with Horizontal Text Scroller !!!  Â  Â ....................................  Â  Not much to say here, sorry :("

Flip
Wend
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Rbz on June 11, 2006
Btw, for Bliz3D, you will need to use this code, 20 lines now.

Code: [Select]
Graphics 640,480,32,2

tile1 = CreateImage(720,720)

SetBuffer ImageBuffer(tile1)
ClsColor 30,30,80
Cls
Color 50,50,100
For y = 0 To 11
 For x = 0 To 5
  Rect x*120+z,y*60,60,60,1
 Next
 If z = 60 Then z = 0 Else z = z + 60
Next

SetBuffer BackBuffer()

Color 255,255,255
While Not KeyHit(1)

If angle# > 359 Then angle# = 0 Else angle# = angle# + 0.4

TileImage tile1,320*Sin(angle#)*Cos(angle#), 240*Cos(angle#)

Text (-angle+140)*5, (Cos(angle#*10)*30)+240,"First >> Short Intro <<  with Horizontal Text Scroller !!!     ....................................    Not much to say here, sorry :("

Flip
Wend
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Optimus on June 11, 2006
Hey, the scroller has incredibly small sized fonts. I can't read it :)
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Shockwave on June 11, 2006
Cool Rbraz :)
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Tetra on June 11, 2006
Cool to see this one attempted. thumbs up here  :)
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Rbz on June 13, 2006
A little update, just to let you know what BB can do without colons  ;)

Only 4 lines of code, weird, but works  ;D

Download (B3D or BlitzPlus) (http://www.rbraz.com/temp/Rbraz%20-%20Short%20Intro%20-%201.rar)

Code: [Select]
Graphics 640,480,32,2 fnt = LoadFont("Arial",48) SetFont fnt tile1 = CreateImage(720,720) SetBuffer ImageBuffer(tile1) ClsColor 30,30,80 Cls
Color 50,50,100 For y = 0 To 11 For x = 0 To 5 Rect x*120+z,y*60,60,60,1 Next If z = 60 Then z = 0 Else z = z + 60
Next SetBuffer BackBuffer() Color 255,255,255 While Not KeyHit(1) If angle# > 719 Then angle# = 0 Else angle# = angle# + 0.5 TileImage tile1,320*Sin(angle#)*Cos(angle#), 240*Cos(angle#) Text (-angle+140)*5, (Cos(angle#*10)*30)+200,"First >> Short Intro <<  with Horizontal Text Scroller !!! Now in 4 lines :)  Â  Â ....................................  Â  Not much to say here, sorry :(" Flip
Wend



Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Ghost^BHT on June 14, 2006
Pretty tricky :) I didn't know you could do that without colons   :cheers:
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Tetra on June 14, 2006
thats insane, you could probably make a few one liners like that  :o  :D
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: TinDragon on June 14, 2006
OMG that is mad, also kind of shows that the 20line limit doesnt really restrict blitz like other languages but who would have guessed you didnt need : with all those commands  :o
Title: Re: Short Intro Challenge - Horizontal Scroller + Check Board Background
Post by: Shockwave on June 14, 2006
FFS! Thats crazy.