LÖVE Glitches

Whilst I was in Venice for the Laptop Meets Musicians festival with BiLE I had the pleasure of (finally) meeting {rukano} who later showed me this really awesome way of displaying uncleared video memory with LOVE and LICK. I’m using Ubuntu 11.04 with LÖVE version love_0.7.2-0natty2_i386.deb.

LÖVE glitches

Once you have downloaded and installed LÖVE and LICK (instructions for different platforms are provided on their websites) create the following files:

main.lua

require "LICK"
require "LICK/lib"
lick.reset = true
lick.clearFlag = true

function love.load()
  fb = love.graphics.newFramebuffer(800,600)
end

function love.draw()
  love.graphics.draw(fb, 0, 0)
end

function love.keypressed (a)
  print(a)
  if a == " " then
     fb = love.graphics.newFramebuffer(800,600)
  end
end

conf.lua

function love.conf(t)
   t.modules.joystick = true   -- Enable the joystick module (boolean)
   t.modules.audio = true      -- Enable the audio module (boolean)
   t.modules.keyboard = true   -- Enable the keyboard module (boolean)
   t.modules.event = true      -- Enable the event module (boolean)
   t.modules.image = true      -- Enable the image module (boolean)
   t.modules.graphics = true   -- Enable the graphics module (boolean)
   t.modules.timer = true      -- Enable the timer module (boolean)
   t.modules.mouse = true      -- Enable the mouse module (boolean)
   t.modules.sound = true      -- Enable the sound module (boolean)
   t.modules.physics = true    -- Enable the physics module (boolean)
   t.console = false           -- Attach a console (boolean, Windows only)
   t.title = "live_testproject"        -- The title of the window the game is in (string)
   t.author = "Your Name Here"        -- The author of the game (string)
   t.screen.fullscreen = false -- Enable fullscreen (boolean)
   t.screen.vsync = true       -- Enable vertical sync (boolean)
   t.screen.fsaa = 0           -- The number of FSAA-buffers (number)
   t.screen.height = 600       -- The window height (number)
   t.screen.width = 800        -- The window width (number)
   t.version = 0               -- The LÖVE version this game was made for (number)
end

Compile all of this code into something like Glitch.love. Instructions for this may be different for different operating systems. Before launching the program be sure to first open lots of videos and images. Once you’ve done that, launch the Glitch.love program and press spacebar to cycle through your uncleared video memory!

Shoutouts go to Tilmann Hars, who first showed this trick to rukano and who maintains the LICK library.

p.s. I’m still trying to find out how to do this kind of stuff using Pure Data. If anyone knows how please let me know!