New to Lua and love

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Umbrageous
Prole
Posts: 8
Joined: Sat Apr 10, 2010 5:45 pm

New to Lua and love

Post 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?
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: New to Lua and love

Post 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!
User avatar
adrywalsh
Prole
Posts: 20
Joined: Fri Feb 26, 2010 7:24 am

Re: New to Lua and love

Post 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
while (1)
do LÖVE
Umbrageous
Prole
Posts: 8
Joined: Sat Apr 10, 2010 5:45 pm

Re: New to Lua and love

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests