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
  • No one is chatting at the moment.
  • The Real Jdbye @ The Real Jdbye:
    the vram is one advantage when it comes to AI but ends up being slower even with that and really AI is the only use case that needs more than 12gb vram right now
  • Psionic Roshambo @ Psionic Roshambo:
    Interesting lol
  • Psionic Roshambo @ Psionic Roshambo:
    I think I watched a video where two games at 4K where eating just over 16GB of RAM and it's the one case where the 7900XT and XTX pulled ahead (minus RTX of course)
  • Psionic Roshambo @ Psionic Roshambo:
    So my opinion is that they could age a bit better in the future, and maybe AMD will continue improving them via drivers like they tend to do. No guarantee there but they have done it in the past. Just a feeling I have.
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
    Psionic Roshambo @ Psionic Roshambo: @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to...