A game loading screen animation I made a while back. Thought I post to inspire some art. It can also be a intro screen if you change words.
titlenameL = vec2()
titlenameO = vec2()
titlenameA = vec2()
titlenameD = vec2()
titlenameI = vec2()
titlenameN = vec2()
titlenameG = vec2()
function setup()
--Guy
sp={x=0,y=HEIGHT/2,count=0} -- start position and variable to use
tween(5,sp,{x=WIDTH,y=HEIGHT/2,count=50}, -- time, start, end
{easing=tween.easing.linear,loop=tween.loop.once},done) -- tween type
--timer
et=ElapsedTime
count=30
titlenameL = vec2(WIDTH/2-380,HEIGHT/2)
titlenameO = vec2(WIDTH/2-320,HEIGHT/2)
titlenameA = vec2(WIDTH/2-260,HEIGHT/2)
titlenameD = vec2(WIDTH/2-200,HEIGHT/2)
titlenameI = vec2(WIDTH/2-155,HEIGHT/2)
titlenameN = vec2(WIDTH/2-110,HEIGHT/2)
titlenameG = vec2(WIDTH/2-50,HEIGHT/2)
b1=Block(WIDTH/2-15,HEIGHT/2,595,150)
end
--ball
point = {x = 50, y = 50}
function tween1()
t1 = tween(1, point, {x = 50,y=HEIGHT-50})
t2 = tween(1.375, point, {x = WIDTH-50,y=HEIGHT-50})
t3 = tween(1, point, {x=WIDTH-50,y = 50})
t4 = tween(1.375, point, {x=50,y = 50})
tween.sequence( t1, t2, t3, t4 )
end
function draw()
background(40, 40, 50)
fill(255)
displayMode(FULLSCREEN)
if ElapsedTime-et>.25 then
count = count - .25
et=ElapsedTime
end
if count<=29.50 then
pushStyle()
fontSize(70)
text("L",titlenameL.x, titlenameL.y)
popStyle()
end
if count<=29 then
pushStyle()
fontSize(70)
text("O",titlenameO.x,titlenameO.y)
popStyle()
end
if count<=28.50 then
pushStyle()
fontSize(70)
text("A",titlenameA.x,titlenameA.y)
popStyle()
end
if count<=28.25 then
pushStyle()
fontSize(70)
text("D",titlenameD.x,titlenameD.y)
popStyle()
end
if count<=28 then
pushStyle()
fontSize(70)
text("I",titlenameI.x,titlenameI.y)
popStyle()
end
if count<=27.75 then
pushStyle()
fontSize(70)
text("N",titlenameN.x,titlenameN.y)
popStyle()
end
if count<=27.50 then
pushStyle()
fontSize(70)
text("G",titlenameG.x,titlenameG.y)
popStyle()
end
if count<=27 then
pushStyle()
fontSize(70)
fill(255, 0, 91)
text("G",WIDTH/2+70,HEIGHT/2)
popStyle()
end
if count<=26.75 then
pushStyle()
fontSize(70)
fill(233, 80, 198)
text("A",WIDTH/2+130,HEIGHT/2)
popStyle()
end
if count<=26.50 then
pushStyle()
fontSize(70)
fill(170, 80, 233)
text("M",WIDTH/2+190,HEIGHT/2)
popStyle()
end
if count<=26.25 then
pushStyle()
fontSize(70)
fill(80, 135, 233)
text("E",WIDTH/2+250,HEIGHT/2)
popStyle()
end
if count==29.75 then
tween1()
end
if count<=24 then
pushStyle()
fontSize(70)
fill(80, 133, 233)
text("L",titlenameL.x, titlenameL.y)
titlenameL.y = titlenameL.y - 10
popStyle()
end
if count<=23.75 then
pushStyle()
fontSize(70)
fill(183, 80, 233)
text("O",titlenameO.x, titlenameO.y)
titlenameO.y = titlenameO.y - 10
popStyle()
end
if count<=23.50 then
pushStyle()
fontSize(70)
fill(232, 80, 233)
text("A",titlenameA.x, titlenameA.y)
titlenameA.y = titlenameA.y - 10
popStyle()
end
if count<=23.25 then
pushStyle()
fontSize(70)
fill(240, 51, 98)
text("D",titlenameD.x, titlenameD.y)
titlenameD.y = titlenameD.y - 10
popStyle()
end
if count<=23 then
pushStyle()
fontSize(70)
fill(233, 120, 80)
text("I",titlenameI.x, titlenameI.y)
titlenameI.y = titlenameI.y - 10
popStyle()
end
if count<=22.75 then
pushStyle()
fontSize(70)
fill(233, 200, 80)
text("N",titlenameN.x, titlenameN.y)
titlenameN.y = titlenameN.y - 10
popStyle()
end
if count<=22.50 then
pushStyle()
fontSize(70)
fill(193, 240, 51)
text("G",titlenameG.x, titlenameG.y)
titlenameG.y = titlenameG.y - 10
popStyle()
end
if count<=22.25 then
pushStyle()
textMode(CENTER)
fontSize(40)
text("tap screen to start",WIDTH/2-140,HEIGHT/2)
popStyle()
end
--if count<=23 then
--background(0)
--end
--if count<=23 then
--text("tap screen to start",WIDTH/2,HEIGHT/2)
--end
if count<=30 then
ellipse(point.x, point.y, 50)
end
if count<=28.75 then
pushStyle()
fill(255, 0, 91)
ellipse(point.x, point.y, 50)
end
if count<=27.375 then
pushStyle()
fill(233, 80, 198)
ellipse(point.x, point.y, 50)
end
if count<=26.375 then
pushStyle()
fill(170, 80, 233)
ellipse(point.x, point.y, 50)
end
if count<=22 then
b1:draw()
end
if count<=22 then
b1:flash()
end
sprite(asset.builtin.Platformer_Art.Guy_Standing,sp.x,sp.y,150,150)
fill(40, 40, 50)
text("count "..sp.count//1,WIDTH/2,HEIGHT-100)
text(count,WIDTH/2,HEIGHT/2-200)
end
function done()
print("done")
end
function touched(t)
--if t.state==BEGAN then
--tween1()
--end
end
Block=class()
Block.selectedColor = {r=192,g=55,b=55,a=255}
Block.normalColor = {r=255,g=255,b=255,a=255}
Block.sp={r=Block.normalColor.r,g=Block.normalColor.g,b=Block.normalColor.b}
local id = 0;
function Block:init(x,y,w,h)
self.x = x
self.y = y
self.w = w or 150
self.h = h or 40
self.id = id;
print( "creating a block", self.id )
self.counters = { inputDisplay=0, outputDisplay=0 }
self.isInputSelected = false;
self.isOutputSelected = false;
self.isBlockSelected = false;
self.blockDrawColor = Block.normalColor;
id = id + 1;
end
function Block:draw()
rectMode( CENTER );
noFill();
stroke(Block.sp.r,Block.sp.g,Block.sp.b)
strokeWidth(3);
rect(self.x,self.y,self.w,self.h );
end
function Block:flash()
Block.sp.r,Block.sp.g,Block.sp.b=
Block.selectedColor.r,Block.selectedColor.g,Block.selectedColor.b
tween(.08,Block.sp,{r=255,g=255,b=255},{loop=tween.loop.pingpong})
tween.delay(1,function() tween.stopAll()
Block.sp.r,Block.sp.g,Block.sp.b=
Block.normalColor.r,Block.normalColor.g,Block.normalColor.b
end)
end