Does SNESAPU.DLL and libgme.dll work in LOVE2D

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Neito
Prole
Posts: 21
Joined: Sat Jul 09, 2022 9:00 pm

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

Post by Neito »

So How do you use this in say, a 2D platformer game.
MrFariator
Party member
Posts: 559
Joined: Wed Oct 05, 2016 11:53 am

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

Post 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.
Neito
Prole
Posts: 21
Joined: Sat Jul 09, 2022 9:00 pm

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

Post 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.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

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

Post 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?
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests