Quake3World.com Forums
     Programming Discussion
        How to add Music in main menu on Quake 3 Arena. Pls HELP


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: How to add Music in main menu on Quake 3 Arena. Pls HELP

Grunt
Grunt
Joined: 11 Oct 2016
Posts: 55
PostPosted: 10-11-2016 09:03 AM           Profile Send private message  E-mail  Edit post Reply with quote


Does anyone know how to add music to the main menu in quake 3, Step-by-Step Guide if your can.




Top
                 

Grunt
Grunt
Joined: 11 Oct 2016
Posts: 55
PostPosted: 10-11-2016 10:39 AM           Profile Send private message  E-mail  Edit post Reply with quote


I find this answer here in site but i dont understand. Can someone explain ?

To play music files, use this function:
trap_S_StartBackgroundTrack( const char *intro, const char *loop)




Top
                 

Grunt
Grunt
Joined: 19 Sep 2012
Posts: 64
PostPosted: 10-11-2016 12:01 PM           Profile Send private message  E-mail  Edit post Reply with quote


Quick and incomplete:

1. I assume you want to program this for yourself, so post this question in the right place (Programming Discussion).
2. You need a function, something like UI_StartMenuMusic.
3. Inside this function you can use the trap_S_StartBackgroundTrack call. (trap call means the UI is caling a function inside the sound engine(s)).
4. You have to run your new function somewhere, best place seems to be 'UI_Refresh' in ui_atoms.c. (you need to refresh playing music to start a new and stop, thats why I suggest 'UI_Refresh', though I did not prove this)
5. IIRC playing music in main menu needs a lot of tweaking because it has a few issues (stuttering, freezing music etc.).
6. Also if I remember correctly id never fixed playing music from main menu because of this, at least for vQ3A, for Team Arena I think it was fixed by ioquake3 (?).

Additional info:
Outcommented, but a potential place to start with for playing music in ioquake3 is here: https://github.com/ioquake/ioq3/blob/ma ... in.c#L5258
AFAIK for base Q3 menu there is no code for playing music (?). Team Arena has UI/menu scripts (they can also play music), whereas Q3 menu uses no scripts.

These are only some quick thoughts so you can start somewhere, everything is written In good intent, but without guarantee!




Top
                 

Grunt
Grunt
Joined: 11 Oct 2016
Posts: 55
PostPosted: 10-11-2016 01:41 PM           Profile Send private message  E-mail  Edit post Reply with quote


ToKu Thx!! It's complicated but i'm try. ioquake3 - i don't testing, i like original Q3A without any mods.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group