Does SNESAPU.DLL and libgme.dll work in LOVE2D
Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D
So How do you use this in say, a 2D platformer game.
-
- Party member
- Posts: 559
- Joined: Wed Oct 05, 2016 11:53 am
Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D
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
See one of Yozzaxia's replies for a crude example
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.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
Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D
Can you please upload your own code here so I can see.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
Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D
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?
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Who is online
Users browsing this forum: No registered users and 4 guests