Page 4 of 4

Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D

Posted: Tue May 09, 2023 1:25 pm
by Neito
So How do you use this in say, a 2D platformer game.

Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D

Posted: Wed May 10, 2023 12:57 am
by MrFariator
These are audio playback related libraries, so there's no difference in how you use them in a platformer, grand strategy or a racing title. You'll load the library (presumably at startup), and then periodically give it the appropriate commands to play, pause and switch tracks as the rest of your game's logic dictates.

See one of Yozzaxia's replies for a crude example
Yozzaxia wrote: Sat Oct 01, 2022 3:09 am I don't know what your code looks like, but this works for me:

Code: Select all

local gme = require("LoveGme")()

function love.load()
	gme:loadFile("RS3_Podorui.spc")
	gme:play()
end

function love.update(dt)
	gme:update(dt)
end
If you don't know how to approach programming a platformer (in terms of structure or otherwise), then that's an entirely different topic, and has no particular relation to SNESAPU or libgme themselves.

Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D

Posted: Mon Sep 04, 2023 6:24 pm
by Neito
Yozzaxia wrote: Sat Oct 01, 2022 3:09 am I don't know what your code looks like, but this works for me:

Code: Select all

local gme = require("LoveGme")()

function love.load()
	gme:loadFile("RS3_Podorui.spc")
	gme:play()
end

function love.update(dt)
	gme:update(dt)
end
Can you please upload your own code here so I can see.

Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D

Posted: Thu Sep 07, 2023 3:36 pm
by milon
Neito wrote: Mon Sep 04, 2023 6:24 pm Can you please upload your own code here so I can see.
That code should be sufficient to load & play an .spc file, assuming you have the LoveGme library. What might be more helpful for you to see?