Playing Sounds: in Draw(), or in Update()?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

Playing Sounds: in Draw(), or in Update()?

Post by sphyrth »

I never noticed it before. But now, I'm looking for consistency on where to put my_sound:play() method.

Any recommendations out there?
User avatar
DaedalusYoung
Party member
Posts: 407
Joined: Sun Jul 14, 2013 8:04 pm

Re: Playing Sounds: in Draw(), or in Update()?

Post by DaedalusYoung »

It's not drawing anything, so it should be in update.
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Playing Sounds: in Draw(), or in Update()?

Post by jjmafiae »

if it's a song call it from load and then loop it.
User avatar
Luke100000
Party member
Posts: 232
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Playing Sounds: in Draw(), or in Update()?

Post by Luke100000 »

Put it there where you use it, when you need them in the drawing function, you did something wrong :D
Post Reply

Who is online

Users browsing this forum: No registered users and 223 guests