Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Background music "addon"
PostPosted: Sun Feb 21, 2010 9:39 am 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
This is a user-script I made for the Greasemonkey Add-on on Mozilla Firefox to play background music on levels.
The music will work for anyone playing the level if they have the user-script (and have no problems with YouTube).

Requirements:
Mozilla Firefox
Greasemonkey Add-on

If you already have these then you can click here and install the user-script.

The script allows you to add music from YouTube as the background music of your level.
You only need to specify it in your AI code. An example level can be found here. (The music will only work if you have the user-script.)

The syntax is as follows:
Code:
bgMusic, startingMinutes, startingSeconds, endingMinutes, endingSeconds, volume (0 - 100), youtubeID

Example:
Code:
randomRotate
bgMusic,0,2,3,55,100,YOUTUBEID
randomWaypoints
rotatePart,0,10

The code will play the video specified in youtubeID from 0:02 to 3:55 and then loop. It will also set the volume to 100.

You can get the YouTube ID from the url for example in
youtube.com/watch?v=9SbGP4TlwAQ
The ID would be 9SbGP4TlwAQ. (Only include the ID even if there would be parameters after it eg. &fmt=18 or &feature=related)

If you find any bugs let me know :P


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 11:09 am 
Joined: Sun Dec 28, 2008 11:27 am
Posts: 223
Does it only work on firefox?


Profile E-mail Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 12:01 pm 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
Yeah :P I know, I know, FF sucks but it was the easiest one for me.
Other browsers support user-scripts too but you'd have to rewrite it and fix browser specific problems.


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 12:58 pm 
Joined: Sun Aug 31, 2008 3:16 am
Posts: 29
This is awesome, I already use Firefox with GM, so this went fairly quick.
I should do a level for this sometime soon.

btw, Firefox might not be the best browser, but it is so customizable that I can get it to look the way I want it to, which in my opinion makes it awesome. :D


Profile E-mail Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 1:17 pm 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
I hope this doesn't turn into Browser Wars™ but anyway I too liked Firefox for a long time and I'm still using it because I couldn't live without the extensions. The best thing about Firefox is also the worst thing. All the extensions make it a bit buggy and slow at least for me (it's not the fastest even without the extensions) so I'm also using Chrome on the side sometimes. [/offtopic]

Glad you liked it Fruktfisk :P


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 7:37 pm 
User avatar
Joined: Mon Dec 10, 2007 10:40 pm
Posts: 155
The install is painless and it worked great. Now please write one for IE :-)

_________________

"Reality is merely an illusion, albeit a very persistent one." - Albert Einstein


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Feb 21, 2010 11:07 pm 
User avatar
Joined: Sun Aug 31, 2008 7:46 pm
Posts: 82
Location: Laughing evilly as he manipulates the government on Zeta Flolan.
It seems totally impossible to transplant this into Seamonkey...

Shame really, as it works in Iceweasel, which JUST SO HAPPENS to completely fail at using Zeta Flow.

I swear the world is conspiring against me...

_________________
I am of open mind and willing to hear criticism. Also: That's stupid and you're stupid. ~ 8Bit Theater

Ye who runs needlessly,
Thou art a fool,
Thou art a fool,
Thou art a fool,
Thou art a fool,
~La Mulana, Endless Corridor Tablet


Profile E-mail Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 2:10 am 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
I guess I'll have to look into making different versions of this then.


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 2:15 am 
User avatar
Joined: Sun Aug 31, 2008 7:46 pm
Posts: 82
Location: Laughing evilly as he manipulates the government on Zeta Flolan.
Can anybody hear music in this?
http://zetaflow.skylogic.ca/game/profile/12294

_________________
I am of open mind and willing to hear criticism. Also: That's stupid and you're stupid. ~ 8Bit Theater

Ye who runs needlessly,
Thou art a fool,
Thou art a fool,
Thou art a fool,
Thou art a fool,
~La Mulana, Endless Corridor Tablet


Profile E-mail Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 2:39 am 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
Works for me.


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 4:29 am 
User avatar
Joined: Mon Dec 10, 2007 10:40 pm
Posts: 155
NARF - Your level worked for me too. Yours differed from Mouzi's example, in that the music started as soon as I clicked the joystick icon and went to the level title page. Whereas Mouzi's music doesn't begin until a few seconds after level play starts.

There also seemed to be a difference of about 1 FPS. It would appear that the music file size has an impact.

_________________

"Reality is merely an illusion, albeit a very persistent one." - Albert Einstein


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 10:05 am 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
I noticed a small mistake there. It said background music loading even if there is no bgmusic. Fixed the code now, so update if you have it installed.


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 10:11 am 
User avatar
Joined: Mon Dec 10, 2007 10:40 pm
Posts: 155
Mouzi - Do I have to uninstall and then reinstall? Pardon my ignorance, but I rarely use FF and this is the first add-on I've ever installed.

_________________

"Reality is merely an illusion, albeit a very persistent one." - Albert Einstein


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Mon Feb 22, 2010 11:22 am 
User avatar
Joined: Sat Sep 01, 2007 5:34 am
Posts: 153
Location: Finland
You can just click the link again and reinstall. It replaces the old one.


Profile  Offline
 
 Post subject: Re: Background music "addon"
PostPosted: Sun Mar 14, 2010 6:11 pm 
Joined: Sun Dec 28, 2008 11:27 am
Posts: 223
Even though I don't have the software required, I have put music in a few of my levels.
Most recent example is the chaleng enhanced. Enjoy! :)


Profile E-mail Offline
 

Display posts from previous:  Sort by  

Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest

Panel

Top You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Dizayn Ercan K.
Updated by phpBBservice.nl