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

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
So which fork of LovePotion should I use now?? XD It seems like the two have different things now. TurtleP has worked on spritebatches and audio streaming, versus the Videah's having changes with dependencies and stuff.
 

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 which fork of LovePotion should I use now?? XD It seems like the two have different things now. TurtleP has worked on spritebatches and audio streaming, versus the Videah's having changes with dependencies and stuff.

With the new sf2dlib/ctrulib changes, I don't think Turtle's fork compiles anymore ;v
Sorry for the lack of progress, I keep hitting obstacles then lose motivation. I'll try to merge Turtles audio changes, add Canvases and Spritebatches, then make another stable release.
 
  • Like
Reactions: XavyrrVaati

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
So has anyone made any games with this so far? I alway like playing people's games.
I'm making a not really game with LovePotion, and after that I'm probably going to learn Unity and try and make something with the SDK.
With the new sf2dlib/ctrulib changes, I don't think Turtle's fork compiles anymore ;v
Sorry for the lack of progress, I keep hitting obstacles then lose motivation. I'll try to merge Turtles audio changes, add Canvases and Spritebatches, then make another stable release.
YOU CAN DO IT! :O
 

DutchyDutch

COPYRIGHT LOLOLOLOL
Member
Joined
Nov 16, 2014
Messages
954
Trophies
0
Age
24
XP
862
Country
Netherlands
This is pretty awesome, finally tried to make a simple hello world in it and button input works fine too. Learned this really quickly, it's pretty easy! I might make my first public app in it soon :D The only problem I have is, I can't get
audio to work, which is what my project will mostly be using :(. This is my code (and yes fartSound is exactly what it sounds like)

fartSound = love.audio.newSource('fart-01.wav')

function love.load()
love.graphics.set3D(true)
love.graphics.setScreen('top')
end

function love.draw()
love.graphics.setScreen('top')
love.graphics.print("Hello World",100,100)
end


function love.update(dt)
function love.draw()
love.graphics.print("Hello World",100,100)
end


end

function love.keypressed(key)
if key == 'x' then
function love.draw()
love.graphics.setScreen('top')

love.graphics.print("Waddup m8",240,200)
end
function love.update(dt)
function love.draw()
love.graphics.print("Waddup m8",240,200)
end
end
end
function love.keypressed(key)
if key == 'select' then
fartSound:Play()

end
end

function love.keypressed(key)

-- start returns you to the homebrew menu :3
if key == 'start' then
love.event.quit()
end

end
end
As you can see pressing X will print waddup m8 bottom left of the screen. Works fine, but another problem is that whenever you press any other key before that one, nothing besides start works. AND select won't play the audio at all.
 
Last edited by DutchyDutch,

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
This is pretty awesome, finally tried to make a simple hello world in it and button input works fine too. Learned this really quickly, it's pretty easy! I might make my first public app in it soon :D The only problem I have is, I can't get
audio to work, which is what my project will mostly be using :(. This is my code (and yes fartSound is exactly what it sounds like)

fartSound = love.audio.newSource('fart-01.wav')

function love.load()
love.graphics.set3D(true)
love.graphics.setScreen('top')
end

function love.draw()
love.graphics.setScreen('top')
love.graphics.print("Hello World",100,100)
end


function love.update(dt)
function love.draw()
love.graphics.print("Hello World",100,100)
end


end

function love.keypressed(key)
if key == 'x' then
function love.draw()
love.graphics.setScreen('top')

love.graphics.print("Waddup m8",240,200)
end
function love.update(dt)
function love.draw()
love.graphics.print("Waddup m8",240,200)
end
end
end
function love.keypressed(key)
if key == 'select' thens
fartSound:Play()

end
end

function love.keypressed(key)

-- start returns you to the homebrew menu :3
if key == 'start' then
love.event.quit()
end

end
end
As you can see pressing X will print waddup m8 bottom left of the screen. Works fine, but another problem is that whenever you press any other key before that one, nothing besides start works. AND select won't play the audio at all.
It's actually pretty simple. First off, you're re-defining the function love.keypressed(key) because you have it more than once.
You need to combine all of them to make it work for anything. Second, you need to tell your code to keep printing the string, since it will disappear the second you let go of X (assuming you want it to stay there, I recommend creating a flag variable to keep track of whether it should print or not. Unless you only want it while it is pressed, then ignore me haha.
Anyways, you should consolidate your keypressed function to look something like this:
Code:
if key == 'select' then
    fartSound:play()
elseif key == 'x' then
    (code for X here)
elseif key == 'start' then
    love.event.quit()
end
Make sure you tab properly! Lua requires it!

Anyways, I recall having trouble with the keypressed function, so I just don't use it. I personally just use:
Code:
if love.keyboard.isDown("KEY YOU WANT HERE") then
     PUT YOUR CODE YOU WANT TO DO WHILE PRESSED
end
Just stick it in your love.update().
 
Last edited by XavyrrVaati,

DutchyDutch

COPYRIGHT LOLOLOLOL
Member
Joined
Nov 16, 2014
Messages
954
Trophies
0
Age
24
XP
862
Country
Netherlands
It's actually pretty simple. First off, you're re-defining the function love.keypressed(key) because you have it more than once.
You need to combine all of them to make it work for anything. Second, you need to tell your code to keep printing the string, since it will disappear the second you let go of X (assuming you want it to stay there, I recommend creating a flag variable to keep track of whether it should print or not. Unless you only want it while it is pressed, then ignore me haha.
Anyways, you should consolidate your keypressed function to look something like this:
Code:
if key == 'select' then
    fartSound:play()
elseif key == 'x' then
    (code for X here)
elseif key == 'start' then
    love.event.quit()
end
Make sure you tab properly! Lua requires it!

Anyways, I recall having trouble with the keypressed function, so I just don't use it. I personally just use:
Code:
if love.keyboard.isDown("KEY YOU WANT HERE") then
     PUT YOUR CODE YOU WANT TO DO WHILE PRESSED
end
Just stick it in your love.update().
Thanks for the detailed response! I had learned a lot since I made that post, but this stilll helped me clean up my code and fix the audio.
Is there any other file other than .wav that I can use for audio? .wav files are really big compared to .mp3 for some reason, yet LovePotion doesn't seem to support MP3. I tried it
and got an error.

EDIT: And is it possible to use anAL (animations and love) with LovePotion, so I can animate my sprites? Or is there a built-in feature in this?
 
Last edited by DutchyDutch,

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
Thanks for the detailed response! I had learned a lot since I made that post, but this stilll helped me clean up my code and fix the audio.
Is there any other file other than .wav that I can use for audio? .wav files are really big compared to .mp3 for some reason, yet LovePotion doesn't seem to support MP3. I tried it
and got an error.

EDIT: And is it possible to use anAL (animations and love) with LovePotion, so I can animate my sprites? Or is there a built-in feature in this?
Currently, only .wav files work, but eventually .ogg might be supported. As for other Love plugins, they don't usually work since LovePotion isn't complete yet. Therefore LovePotion has missing features and potentially different behavior when compared to Love. You can always try though. The Github page has a list of implemented Love functions. It can be as simple as modifying some parts of the Love 'plugin' (for lack of a better word).
 

DutchyDutch

COPYRIGHT LOLOLOLOL
Member
Joined
Nov 16, 2014
Messages
954
Trophies
0
Age
24
XP
862
Country
Netherlands
Currently, only .wav files work, but eventually .ogg might be supported. As for other Love plugins, they don't usually work since LovePotion isn't complete yet. Therefore LovePotion has missing features and potentially different behavior when compared to Love. You can always try though. The Github page has a list of implemented Love functions. It can be as simple as modifying some parts of the Love 'plugin' (for lack of a better word).
Thanks a lot! I've found a way to make .wav files smaller, so it's okay now. Thanks to this forum my game is getting better and better. Movement already worked before, but now my "camera" and sound work
perfectly too :D I'm still working on everything, now mostly of the art, but here's a Citra screenshot of my game in its current state (bottom screen is a quick placeholder, trust me) :
d3d5af43da674131992f6abc1853ec8e.png

I'm not really good at drawing but I try my best. It looked a LOT worse in it's first state obviously, so I'm very happy with how it looks now :D I'll release the first build once the first 3 objectives are made and of course when it has as little bugs as possible.
 
Last edited by DutchyDutch,
  • Like
Reactions: XavyrrVaati

hoksyjp

Active Member
Newcomer
Joined
Aug 20, 2016
Messages
39
Trophies
0
Age
26
Location
Boston
Website
illteteka.itch.io
XP
141
Country
United States
Hey I'm working on a homebrew game using LovePotion and I was wondering if I can call functions directly from crtulib in lua. I'm trying to make use of features that a homebrew game could only do, such as using the 3d depth slider as part of the controls. Does anyone know if this is possible?

I would try to add hooks in myself, but I can't get LovePotion to compile
 

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
Hey I'm working on a homebrew game using LovePotion and I was wondering if I can call functions directly from crtulib in lua. I'm trying to make use of features that a homebrew game could only do, such as using the 3d depth slider as part of the controls. Does anyone know if this is possible?

I would try to add hooks in myself, but I can't get LovePotion to compile
You would have to fork LP and add those functions yourself. Though that requires compiling it. Also not being able to compile is too vague.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
  • I @ I-need-help-with-wup-wiiu:
    i need help with nusspli failed downloads, can someone respond to my thread? pretty please:wub:
  • Sheeba- @ Sheeba-:
    I can't wait to hack my 11.00 PS4 pro
    Sheeba- @ Sheeba-: I can't wait to hack my 11.00 PS4 pro