Skip to content

Instantly share code, notes, and snippets.

@MBoffin
Last active January 11, 2019 04:32
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MBoffin/0ad8ffc850fb797fe2d90fcc98d81492 to your computer and use it in GitHub Desktop.
Save MBoffin/0ad8ffc850fb797fe2d90fcc98d81492 to your computer and use it in GitHub Desktop.
Global Game Jam PICO-8 Bumper
--to add this to your game, put
--this in your _init() function,
--like so:
function _init()
show_ggj_logo(34,4,10)
end
--the 3 parameters are how far
--down the screen to draw the
--bumper, how many seconds to
--leave it on the screen, and
--how fast to do the screen
--wipe. 1 will do 1 pixel at a
--time (slow), whereas 10 will
--do 10 at a time (fast).
--then add the following code
--somewhere else (maybe tucked
--away in a lonely tab):
function show_ggj_logo(ggjy,ggjw,ggjs)
ggjw=90+ggjw*30*ggjs
for i=20-ggjw,110,ggjs do cls(1) clip(i,ggjy,ggjw,62) draw_ggj_logo(ggjy) flip() if (btnp()>0) then break end end cls()
end
function draw_ggj_logo(ggjy)
logo="00000000000000777770000000000000000aaaaa000cc77c7ccccc000000000000aaaaaaaa777cccccccccc0000000000aaa000aaaa77777cccccccc00000000aaa000007aaa7777ccccccccc0000000aa00000777aaa777cccccccc77000000aa000007777aaa7ccccccccc77000000aa0000c77777aaacccccc777ccc00000aaa000c777777aaacccc77777c7000000aaa00cc7777ccaaaccc77777770000000aaaacc777ccccaaacc7777777aaa00000aaacc77ccccccaaacc777777aaaa0000000cc77cccccccaaacc7777700aaa000000cc77ccccccccaaac77777000aa0000000c77cccccccccaaa77770000aa0000000c77ccccccccccaaa777000aaa00000000cc7ccccccccc7aaaa000aaa0000000000cccccccccc777aaaaaaaa000000000000cccccccccc7770aaaaa00000000000000ccccccccccc000000000000000000000000ccccc"
for i=1,#logo do if (sub(logo,i,i)!="0") pset(48+((i-1)%32),ggjy+16+flr((i-1)/32),tonum("0x"..sub(logo,i,i))) end
for i=-1,1 do for j=-1,1 do print("game born at",40+i,ggjy+1+j,0) print("global game jam",34+i,ggjy+47+j,0) end end print("game born at",40,ggjy+1,13) print("global game jam",34,ggjy+47,7) print("www.globalgamejam.org",22,ggjy+57,13)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment