Homebrew [Release] - LövePotion - LÖVE API for 3DS Homebrew - BETA

joshjosh100

Member
Newcomer
Joined
Oct 11, 2015
Messages
24
Trophies
0
Age
26
XP
77
Country
United States
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?
 
Last edited by joshjosh100,

VideahGams

Well-Known Member
OP
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
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?

libpng
 

VideahGams

Well-Known Member
OP
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
Is it possible or will it be possible to make a game spanning across both the top and bottom screens?

You can already do that.
Setting the screen applies to the draw calls following it, until you change it again.

for example:
Code:
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


Gives us this:
ULFQiUI.png
 

CKlidify

Well-Known Member
Newcomer
Joined
May 31, 2015
Messages
70
Trophies
0
XP
208
Country
Canada
Ah, 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.
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 :P
 

Jwiz33

Banned
Joined
Jun 5, 2014
Messages
2,654
Trophies
0
Location
in the illuminati headquar—I have said too much!
Website
iwillcleanyourbasement.webstarts.com
XP
1,492
Country
United States
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.
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
Thanks for your help!
 

VideahGams

Well-Known Member
OP
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
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.
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
Thanks for your help!

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()
   -- 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
 

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States

Jwiz33

Banned
Joined
Jun 5, 2014
Messages
2,654
Trophies
0
Location
in the illuminati headquar—I have said too much!
Website
iwillcleanyourbasement.webstarts.com
XP
1,492
Country
United States
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
Oh, that makes sense. Thanks!
 

VideahGams

Well-Known Member
OP
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country

VideahGams

Well-Known Member
OP
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
One more question, how do I make the game exit on start?
Code:
-- some other code is right here
end
if love.keyboard.isDown("start") then
        love.event.quit()
    end
end
This doesn't work, it doesn't do anything when I press start :unsure:

Why is there 2 end's? And is this being ran in love.update(dt)?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    I gotta raid0 these m.2s yay
  • BigOnYa @ BigOnYa:
    Do a raid10
  • K3Nv2 @ K3Nv2:
    That's tomorrow
    +1
  • Xdqwerty @ Xdqwerty:
    Yawn
  • BigOnYa @ BigOnYa:
    Damn Wal-Mart has 42" 4k TVs for only $150
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i bet it will not fit inside your bedroom
  • BigOnYa @ BigOnYa:
    Yea here in North Korea, we are only allowed 1 19" tv per household. And the only channel we get is, MLT (Missile Launch Today)
    +1
  • K3Nv2 @ K3Nv2:
    @BigOnYa, doesn't fit in his bedroom he's American
    +1
  • BigOnYa @ BigOnYa:
    I hate ordering stuff online if I can go buy it somewhere close to me, and everywhere anymore will give you a discount only if you order it online, bs. Should be a discount if I go pick it up, not order online.
  • K3Nv2 @ K3Nv2:
    I love it for most things most stores you just shows the receipt online and they scan it
    +1
  • K3Nv2 @ K3Nv2:
    Makes it easy for incompetent restaurant staff that don't know how to hear an order
  • BigOnYa @ BigOnYa:
    Mostly for big purchases, I want it in my hands before I pay. Like a tv, I trust picking it up myself, before I'd trust it being sent thru mail/delivery. (Broken screen, etc) But yea if I can order online, then pickup at store is ok, but not all places offer that.
  • cearp @ cearp:
    > Like a tv, I trust picking it up myself, before I'd trust it being sent thru mail/delivery. (Broken screen, etc)

    Thing is, if you break it driving back to your house, it's your fault. But if the delivery driver damages it, it's not your fault.
    +1
  • K3Nv2 @ K3Nv2:
    Most people that haul big tvs have empty trucks or know enough not to set it face down
  • BigOnYa @ BigOnYa:
    Then I gotta send it back and wait another week or two. I have a pickup truck, with a extended cab, so no prob for me.
  • K3Nv2 @ K3Nv2:
    Most manufacturers pack it well enough where they aren't that dumb to let it happen
  • BigOnYa @ BigOnYa:
    They building a new Microcenter store near by me, is kinda scary. That's my favorite place, I'm like a kid in a candy store there.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, what's a microcenter?
  • K3Nv2 @ K3Nv2:
    Cool I'll make you ship me stuff
    +1
  • K3Nv2 @ K3Nv2:
    Microcenter sells high quality microwaves
  • BigOnYa @ BigOnYa:
    Computer store basically, but they sell everything, like game systems, tvs , 3d printers, etc
    +1
  • K3Nv2 @ K3Nv2:
    I've seen i9/mobo deals for like 400
  • BigOnYa @ BigOnYa:
    Yea been itching to build a new pc, mine is like 3-4 years old, ancient in pc tech time. Still using a sata SSD even.
  • K3Nv2 @ K3Nv2:
    That's still high tech to ancientboi
    +2
    K3Nv2 @ K3Nv2: That's still high tech to ancientboi +2