Created
May 30, 2012 12:32
-
-
Save Bri-G/2835987 to your computer and use it in GitHub Desktop.
Text Snowman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Use this function to perform your initial setup | |
function setup() | |
saveProjectInfo("Description", "Flash Screen") | |
saveProjectInfo("Version", "1.001 beta") | |
saveProjectInfo("Author", "Bri_G") | |
print(string.char(0xe2,0x98,0x83)) | |
snow = string.char(0xe2,0x98,0x83) | |
displayMode(FULLSCREEN) | |
-- iparameter("posX",40,100,60) | |
-- iparameter("posY",40,100,60) | |
posX = 80 | |
posY = 95 | |
counter = 0 | |
increment = 3 | |
end | |
-- This function gets called once every frame | |
function draw() | |
-- This sets a dark background color | |
background(counter, counter, counter, 255) | |
fill(240, 240, 240, 255) | |
fontSize(102) | |
-- This sets the line thickness | |
strokeWidth(5) | |
for loop = 1,9 do | |
for loop2 = 1,10 do | |
fill(loop*20+70,loop2*20+50,loop*loop2*3) | |
text(snow,posX*loop,posY*loop2) | |
end | |
end | |
counter = counter + increment | |
if counter > 255 then | |
counter = 255 | |
increment = -3 | |
elseif counter < 0 then | |
counter = 0 | |
increment = 3 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Guys an' Gals,
Back with the trivia I'm afraid. Picked up on a cute printing capability, which I'll explore later - when I get time, and tried it on the pad. It worked so I built a little flash screen and added colour cycling to effect. Again - it's trivial but I liked it. Code below.
I'm sure many of you can improve on it, especially the colour cycling. I remember the days when you booted up the Atari ST and were presented with the Atari logo with a colour cycled background. Similar, but better effects generated on the Amiga.
So, have a play and if you produce a masterpiece post it for us to view.