start wars TM scrolling * free source code *
Community Forums/Showcase/start wars TM scrolling * free source code *
| ||
Graphics 800,600,32,2 Global a AppTitle "in an empire far away" Graphics 444,444,0,2 For i#=1 To 300 Step 3 Cls ;a=LoadFont("Arial",(300/i#)*24,False,False,False) ;If a=0 Then RuntimeError "font load err." ;SetFont a Text 150,300-i#, "Hiya. Welcome to Star WarsTM",True,True Delay 110 Next ;FreeFont a aged video! http://picasaweb.google.com.au/lh/photo/nc3ngIwpLR-VMkD52kd_7Q?authkey=Gv1sRgCJyD1aWdkYWWcQ&feat=directlink |
| ||
... |
| ||
yea. Me t00. |
| ||
I hereby publicly declare rs to be a troll. |
| ||
*comment deleted* |
| ||
the code snippet does the job.. this is.. smart but.. for beginners usefull :) |
| ||
thats just scrolling down starwars scrollers scroll up and shrink in size title fail atleast |
| ||
LOL! Quicky (very) did this: SuperStrict Const screenWidth% = 800, screenHeight% = 600 Graphics screenWidth, screenHeight, 0 Type TText Field x#, y#, scale# Field text$ Global list:TList Function Create:TText(x#,y#,scale#,text$) Local t:TText = New TText If list = Null list = CreateList() list.addlast t t.x = x t.y = y t.scale = scale t.text = text Return t End Function Function drawAll() If Not list Return For Local t:TText = EachIn list t.draw() Next End Function Method draw() drawTextCentred(x, y, scale, text) End Method Function updateAll() If Not list Return For Local t:TText = EachIn list t.update() Next End Function Method update() y:-0.5 If y < screenheight scale:-0.002 End Method End Type TText.Create(screenWidth/2, screenHeight, 4, "StarWarsTM") For Local i% = 1 To 10 TText.Create(screenWidth/2, screenHeight + i * 45, 4, "Far Far") Next TText.Create(screenWidth/2, screenHeight + 11 * 45, 4, "Away") While Not AppTerminate() TText.updateAll() Cls TText.drawAll() Flip Delay 1 Wend Function drawTextCentred(x#, y#, scale#, text$) Local w# = TextWidth(text) If scale<>1 Then w=w*scale EndIf x# = x - ( w / 2 ) If scale<>1 Then Local h#=TextHeight(text) Local diff# = (h*scale)-h y:-diff/2.0 EndIf SetScale scale, scale DrawText text, x, y SetScale 1, 1 End Function |
| ||
I wouldn't think it possible for that code (in first post) to be any worse than I anticipated, but having watched the video (and I don't know why I did), I'm afraid that the text scrolls the wrong way. |
| ||
If there was ever a reason for a voting system for the code archives, this is it. The compulsion to vote this into oblivion is overwhelming.. |
| ||
If there was ever a reason for a voting system for the code archives, this is it. +1 |
| ||
If there was ever a reason for a voting system for the code archives, this is it. I would give it a high vote if only to piss Josh off |
| ||
If there was ever a reason for a voting system for the code archives, this is it. What the 2 guys above said. |
| ||
Erm, I think we may be dealing with someone very young here (we all had to start from the beginning), or someone with... issues. Therefore I will refrain from putting the boot in, on this occasion. :P |
| ||
Oh he definitely has issues. I just looked at his worklogs: Rewrote code to avoid whitespace as much as possible. No indentation is best for coding. Liberal use of : between lines of code is cool. |
| ||
jhocking: I actually have that printed out and framed and hanging on my wall at work. |
| ||
thanks for all helpfull comments! |