Oh your right, ive been testing on Citra and cannot move. But just threw on my n3ds moves just fine. Maybe I not pressing the correct key in Citra. Anyone know the Keyboard Bindings? Thanks for responding
-- LövePotion example/no game screen
-- love.load() is called once when a LövePotion game is ran.
function love.load()
-- Enables 3D mode.
love.graphics.set3D(true)
-- Seeds the random number generator with the time (Actually makes it random)
math.randomseed(os.time())
-- Sets the current screen for draw calls to draw to.
-- Lasts until it is called again.
love.graphics.setScreen('top')
logo = {} -- Creates a table to hold variables for the logo (x, y, image etc.)
-- Sets the logo position to the center of the screen, using love.graphics.getWidth()/getHeight()
-- and Image:getWidth()/getHeight()
logo.x = 200
logo.y = 120
--Me adding Speed
logo.speed = 10
potionText = {} -- Creates a table to hold variables for the text
font = love.graphics.newFont() -- Creates a new font, when no arguments are given it uses the default font
-- Loads images from filepaths
logo.image = love.graphics.newImage('rightskim.png')
background = love.graphics.newImage('BeachWave.png')
inspector = love.graphics.newImage('bottommenu.png')
message = love.graphics.newImage('nogame.png')
messagebg = love.graphics.newImage('bubble.png')
-- Sets the texts position, by setting variables in the potionText table
potionText.x = 50
potionText.y = 75
-- Load the beep sound from a .raw file to play on exit
exitSound = love.audio.newSource('beep.wav')
-- Sets the background color to a nice blue
love.graphics.setBackgroundColor(88, 186, 255)
end
-- love.update(dt) is called every frame, and is used for game logic.
-- The dt argument is delta-time, the average time between frames.
-- Use this to make your game framerate independent.
function love.update(dt)
if love.keyboard.isDown("left") then
logo.x = logo.x - logo.speed*dt
elseif love.keyboard.isDown("right") then
logo.x = logo.x + logo.speed*dt
end
end
-- love.draw() is called every frame. Any and all draw code goes here. (images, shapes, text etc.)
function love.draw()
-- Start drawing to the top screen
love.graphics.setScreen('top')
-- Reset the current draw color to white
love.graphics.setColor(255, 255, 255)
-- Draw the background image
love.graphics.draw(background, 0, 0)
-- Draws the framerate
love.graphics.setColor(255, 255, 255)
love.graphics.rectangle('fill', 10, 15, font:getWidth('FPS: ' .. love.timer.getFPS()) + 10, font:getHeight() + 3)
love.graphics.setColor(35, 31, 32)
love.graphics.setFont(font)
love.graphics.print('FPS: ' .. love.timer.getFPS(), 15, 15)
love.graphics.setColor(255, 255, 255)
-- Draw Player
love.graphics.draw(logo.image, logo.x, logo.y)
-- Start drawing to the bottom screen
love.graphics.setScreen('bottom')
-- Draw the baby inspector with the no-game text
love.graphics.draw(inspector, 0, 0)
love.graphics.draw(messagebg, 160, 0)
love.graphics.draw(message, 185, 10)
end
-- love.keypressed is called when any button is pressed.
-- The argument key is the key that was pressed.
-- Not all input code goes here, if you want to check if a button is down then
-- use love.update(dt) along with love.keyboard.isDown().
function love.keypressed(key)
-- If the start button is pressed, we return to the Homebrew Launcher
if key == 'start' then
love.event.quit()
end
end
-- love.quit is called when LövePotion is quitting.
-- You can put all your cleanup code and the likes here.
function love.quit()
-- Plays the exit beep sound.
exitSoundlay()
end
-- love.load() is called once when a LövePotion game is ran.
function love.load()
-- Enables 3D mode.
love.graphics.set3D(true)
-- Seeds the random number generator with the time (Actually makes it random)
math.randomseed(os.time())
-- Sets the current screen for draw calls to draw to.
-- Lasts until it is called again.
love.graphics.setScreen('top')
logo = {} -- Creates a table to hold variables for the logo (x, y, image etc.)
-- Sets the logo position to the center of the screen, using love.graphics.getWidth()/getHeight()
-- and Image:getWidth()/getHeight()
logo.x = 200
logo.y = 120
--Me adding Speed
logo.speed = 10
potionText = {} -- Creates a table to hold variables for the text
font = love.graphics.newFont() -- Creates a new font, when no arguments are given it uses the default font
-- Loads images from filepaths
logo.image = love.graphics.newImage('rightskim.png')
background = love.graphics.newImage('BeachWave.png')
inspector = love.graphics.newImage('bottommenu.png')
message = love.graphics.newImage('nogame.png')
messagebg = love.graphics.newImage('bubble.png')
-- Sets the texts position, by setting variables in the potionText table
potionText.x = 50
potionText.y = 75
-- Load the beep sound from a .raw file to play on exit
exitSound = love.audio.newSource('beep.wav')
-- Sets the background color to a nice blue
love.graphics.setBackgroundColor(88, 186, 255)
end
-- love.update(dt) is called every frame, and is used for game logic.
-- The dt argument is delta-time, the average time between frames.
-- Use this to make your game framerate independent.
function love.update(dt)
if love.keyboard.isDown("left") then
logo.x = logo.x - logo.speed*dt
elseif love.keyboard.isDown("right") then
logo.x = logo.x + logo.speed*dt
end
end
-- love.draw() is called every frame. Any and all draw code goes here. (images, shapes, text etc.)
function love.draw()
-- Start drawing to the top screen
love.graphics.setScreen('top')
-- Reset the current draw color to white
love.graphics.setColor(255, 255, 255)
-- Draw the background image
love.graphics.draw(background, 0, 0)
-- Draws the framerate
love.graphics.setColor(255, 255, 255)
love.graphics.rectangle('fill', 10, 15, font:getWidth('FPS: ' .. love.timer.getFPS()) + 10, font:getHeight() + 3)
love.graphics.setColor(35, 31, 32)
love.graphics.setFont(font)
love.graphics.print('FPS: ' .. love.timer.getFPS(), 15, 15)
love.graphics.setColor(255, 255, 255)
-- Draw Player
love.graphics.draw(logo.image, logo.x, logo.y)
-- Start drawing to the bottom screen
love.graphics.setScreen('bottom')
-- Draw the baby inspector with the no-game text
love.graphics.draw(inspector, 0, 0)
love.graphics.draw(messagebg, 160, 0)
love.graphics.draw(message, 185, 10)
end
-- love.keypressed is called when any button is pressed.
-- The argument key is the key that was pressed.
-- Not all input code goes here, if you want to check if a button is down then
-- use love.update(dt) along with love.keyboard.isDown().
function love.keypressed(key)
-- If the start button is pressed, we return to the Homebrew Launcher
if key == 'start' then
love.event.quit()
end
end
-- love.quit is called when LövePotion is quitting.
-- You can put all your cleanup code and the likes here.
function love.quit()
-- Plays the exit beep sound.
exitSoundlay()
end