Basic Program Won't Work? (w/ 'push' library)
Posted: Mon Mar 23, 2020 4:09 am
Here is my code:
Expected Output: https://love2d.org/imgmirrur/RL3rewA.png
My Output: A Blank Black Window (or sometimes nothing happens, not even the window pops up)
Can someone help me understand why this is happening? For some reason my code isn't working?
-Sincerly, Falkyraizu
Code: Select all
push = require 'push-master.push'
WINDOW_WIDTH = 1024
WINDOW_HEIGHT = 600
VIRTUAL_WIDTH = 400
VIRTUAL_HEIGHT = 200
function love.load()
love.graphics.setDefaultFilter('nearest','nearest')
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
resizable = false,
vsync = true
})
love.window.setMode(WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
resizable = false,
vsync = true
})
end
function love.draw()
push:start()
love.graphics.printf('Hello Pong', 0, WINDOW_HEIGHT / 2 - 6, WINDOW_WIDTH, 'center')
push:finish()
end
function love.keypressed(key)
if key == 'escape' then
love.event.quit()
end
end
My Output: A Blank Black Window (or sometimes nothing happens, not even the window pops up)
Can someone help me understand why this is happening? For some reason my code isn't working?
-Sincerly, Falkyraizu