Page 1 of 1
Love.sound, Love.image, Love.font
Posted: Wed Jul 31, 2013 10:43 pm
by HazardBlu
What are these modules for, what are encoders and decoders, and what is raw data?
Re: Love.sound, Love.image, Love.font
Posted: Thu Aug 01, 2013 4:52 am
by raidho36
These modules are for operating corresponding data on a lower level, particularry, these allow to modify the data contained within an object such as image or sound.
Normally, raw data refers to unprocessed bytes directly read from the file, but in LÖVE raw data would be already decoded bytes, that is uncompressed ready-to-use data array.
Codecs (encoder-decoder) are programs that convert uncompressed plain data to a specific format, usually compressed, and vice versa. In LÖVE, decoder objects are used to read encoded data from disc, and would be tied to a certain file.
Re: Love.sound, Love.image, Love.font
Posted: Thu Aug 01, 2013 5:20 am
by T-Bone
For most games, you rarely need the love.sound, love.image and love.font modules, the love.audio and love.graphics respectively contain everything you need for doing basic things like displaying images and playing sounds and making fonts. Those modules are only needed when you want to do some more specific things that the more general modules don't cover.
Re: Love.sound, Love.image, Love.font
Posted: Thu Aug 01, 2013 8:37 am
by bartbes
T-Bone wrote:you rarely need the love.sound, love.image and love.font modules, the love.audio and love.graphics respectively contain everything you need for doing basic things
To be more precise, love.audio automatically calls love.sound when creating new Sources from anything other than a Decoder or SoundData, and similar things go for other functions and the other modules.