Yes I do, do you know if its a specific one of the port libs so i can manually install it?
so i fixed the problem( my portlibs were inside a folder in the libctru when i installed them through the command line), but then another problem popped up
C:\Users\joshjosh100\Desktop\rit_lua_player_fighting_game\lpp-3ds-master\LovePot
ion-master\LovePotion-master>make
linking LovePotion-master.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-e
abi/bin/ld.exe: cannot find -lpng
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/Users/joshjosh100/Desktop/rit_lua_player_fighting_game/lpp-3ds-
master/LovePotion-master/LovePotion-master/LovePotion-master.elf] Error 1
make: *** [build] Error 2
its not letting me build the .elf,.3dsx, or the smdh any idea what "-lpng" is?
Is it possible or will it be possible to make a game spanning across both the top and bottom screens?
function love.draw()
love.graphics.setScreen("top")
love.graphics.print("This will draw on the top screen!", 0, 0)
love.graphics.setScreen("bottom")
love.graphics.print("This will draw on the bot screen!", 0, 0)
love.graphics.print("This is still on the bot screen!", 0, 20)
love.graphics.setScreen("top")
love.graphics.print("Now back to top!", 0, 20)
end
-snip-
nonono, I mean like the 3ds browser where it's 1 thing spanning across both screens as if it was one big screen
I'm not super experienced with lua so I think I'll wait for you to add that feature before I work on that projectAh, well you can just handle the drawing of that yourself for now using tricks, but I'll think about adding it as an option somehow.
function love.load()
hero = {} -- new table for the hero
hero.x = 300 -- x,y coordinates of the hero
hero.y = 450
hero.speed = 100
end
function love.update(dt)
if love.keyboard.isDown("left") then
hero.x = hero.x - hero.speed*dt
elseif love.keyboard.isDown("right") then
hero.x = hero.x + hero.speed*dt
end
end
function love.draw()
-- let's draw some ground
love.graphics.setColor(0,255,0,255)
love.graphics.rectangle("fill", 0,465,800,150)
-- let's draw our hero
love.graphics.setColor(255,255,0,255)
love.graphics.rectangle("fill", hero.x,hero.y, 30,15)
end
I am a noob in Love, but I want to start learning it(I know bits of LUA)
First of all, I found this sample code on an online tutorial, what would I do to make it run on a 3DS? I get a black screen when running it currently.
Thanks for your help!Code:function love.load() hero = {} -- new table for the hero hero.x = 300 -- x,y coordinates of the hero hero.y = 450 hero.speed = 100 end function love.update(dt) if love.keyboard.isDown("left") then hero.x = hero.x - hero.speed*dt elseif love.keyboard.isDown("right") then hero.x = hero.x + hero.speed*dt end end function love.draw() -- let's draw some ground love.graphics.setColor(0,255,0,255) love.graphics.rectangle("fill", 0,465,800,150) -- let's draw our hero love.graphics.setColor(255,255,0,255) love.graphics.rectangle("fill", hero.x,hero.y, 30,15) end
function love.load()
hero = {} -- new table for the hero
hero.x = 20 -- x,y coordinates of the hero
hero.y = 185
hero.speed = 100
end
function love.update(dt)
if love.keyboard.isDown("left") then
hero.x = hero.x - hero.speed*dt
elseif love.keyboard.isDown("right") then
hero.x = hero.x + hero.speed*dt
end
end
function love.draw()
-- draw some ground
love.graphics.setColor(0,255,0,255)
love.graphics.rectangle("fill", 0, 200, love.graphics.getWidth(), 150)
-- draw our hero
love.graphics.setColor(255,255,0,255)
love.graphics.rectangle("fill", hero.x,hero.y, 30,15)
end
This is probably not a feature to be added. All you do it manage the object positioning yourself. If it goes off-screen from the bottom (y < 0) then you start drawing it to bottom of top screen. The hb menu is open source if you want to see how it does it...I'm not super experienced with lua so I think I'll wait for you to add that feature before I work on that project
Oh, that makes sense. Thanks!Your problem is that the ground and hero is being drawn off screen (The hero is being drawn at 300 pixels right, 450 pixels down. This is way higher than 3DS's resolution)
Here I've changed positions/sizes to fit 3DS's screen. I've also added indentation (which helps with readability)
Code:function love.load() hero = {} -- new table for the hero hero.x = 20 -- x,y coordinates of the hero hero.y = 185 hero.speed = 100 end function love.update(dt) if love.keyboard.isDown("left") then hero.x = hero.x - hero.speed*dt elseif love.keyboard.isDown("right") then hero.x = hero.x + hero.speed*dt end end function love.draw() -- let's draw some ground love.graphics.setColor(0,255,0,255) love.graphics.rectangle("fill", 0, 200, love.graphics.getWidth(), 150) -- let's draw our hero love.graphics.setColor(255,255,0,255) love.graphics.rectangle("fill", hero.x,hero.y, 30,15) end
This is probably not a feature to be added. All you do it manage the object positioning yourself. If it goes off-screen from the bottom (y < 0) then you start drawing it to bottom of top screen. The hb menu is open source if you want to see how it does it...
https://github.com/smealum/3ds_hb_menu/blob/master/source/background.c#L67
-- some other code is right here
end
if love.keyboard.isDown("start") then
love.event.quit()
end
end
One more question, how do I make the game exit on start?
This doesn't work, it doesn't do anything when I press startCode:-- some other code is right here end if love.keyboard.isDown("start") then love.event.quit() end end
The example had 2 and yes.Why is there 2 end's? And is this being ran in love.update(dt)?
I'll upload it tomorrow, I have to study for my exam. Thanks by the wayCan I see the full code?