Page 1 of 1

New to Lua and love

Posted: Sat Apr 10, 2010 6:30 pm
by Umbrageous
Hello, Im a new to game developement, and i found this site, and i thought it might be fun to create a 2D game using this engine. However, I went to the Getting Started Page on the wiki, and thats about as far as i got, how Would i go about, adding sound to the Hello World Code given on the Getting started page?

Re: New to Lua and love

Posted: Sat Apr 10, 2010 6:50 pm
by pekka
Hello and welcome to the forums! Did you look at the tutorials page yet, and particularly this one?

http://love2d.org/wiki/Tutorial:Audio

One possible place to add sound playing would be as response to events. To learn about them, you can read about callbacks here:

http://love2d.org/wiki/Tutorial:Callback_Functions

If you would like to see some short but complete example programs using these features, you should ask. I am sure people will be happy to help and provide code snippets. But, I think you'll find out that LÖVE is not at all complicated and it is easy to get started by just trying things out. Have fun!

Re: New to Lua and love

Posted: Sat Apr 10, 2010 6:52 pm
by adrywalsh
I would start by returning to the wiki page and clicking on the link for love.audio.
From here you should learn how to initialize/preload whatever sounds you want outside of your main loop using newSource.
Then I would totally memorize love.audio.play( ____ ) because it's just that easy.

Best of luck,

_adry

Re: New to Lua and love

Posted: Sun Apr 11, 2010 11:17 pm
by Umbrageous
Thanks for all the help! I just kept tinkering around with it more and more, and got it working! I cant wait to get started working with this engine.