basic stuff w movemet n collision done

This commit is contained in:
0x81c 2015-03-12 04:05:39 -04:00
parent 03112bb0fb
commit bffa27ec01
4 changed files with 25 additions and 15 deletions

View file

@ -1,5 +1,6 @@
class = require "libs/middleclass"
Timer = require "libs/hump/timer"
sfxr = require "libs/sfxrlua/sfxr"
require "input"
require "color"
require "room"
@ -9,6 +10,7 @@ require "debug_helpers"
function love.load()
_initDefaults()
_initGridVars()
_initSounds()
loadSprites()
gameCanvas = love.graphics.newCanvas()
@ -59,10 +61,11 @@ function love.draw()
love.graphics.draw(gameCanvas, 0, 0)
love.graphics.setCanvas()
pixelate:send("seed", math.random())
pixelate:send("zoom", .2)
love.graphics.setShader(pixelate)
love.graphics.setBlendMode("alpha")
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(finalCanvas, 0, 0)
love.graphics.print("Current FPS: "..tostring(love.timer.getFPS( )), 10, 10)
end
function love.keypressed(key)
@ -96,6 +99,18 @@ function _initGridVars()
drawScale = width / gridWidth / 16
end
function _initSounds()
staticWave = sfxr.newSound()
staticWave.wavetype = 3
staticWave.frequency.start = .1
staticWave.envelope.release = 0
staticWave.envelope.sustain = 1
staticWave.envelope.decay = 0
static = love.audio.newSource(staticWave:generateSoundData())
static:setLooping(true)
static:setVolume(.15)
static:play()
end
function createCanvases()
end