[GroupAI] Dynamic background Music V3 - Page 3

[GroupAI] Dynamic background Music V3

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Noruas wrote:gah, your right, whenever your units get reclaimed, or canceled, battle music plays.
I can see where this would get rather annoying...
Though I think OTA had this problem to, the Dynamic music feature needs much more definity between when battles end and begin, and more definity of whens theres even a battle going on!
of course as I said before, OTA had this problem to... if someone were to fix this problem, then I think this would be awesome.

Also, some victory/defeat music that plays when the game ends and the endgame graphs show would be pretty damn cool.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Not possible, as soon as the game ends the groupAI ends too and so does the music.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Pfff. :( Oh well.
I also notice that it keeps randomly changing the music during battle every minute or so, this is not neccesary, as its already playing battle music, and you never get to hear the whole song.. It also seems to change to battle music when nothings happening. Nothings getting killed, nothing getting reclaimed, buildques arent being canceled, ect. Seems just random.
Oh, and another thing:
Image
Perhaps find a more efficent way of playing the music?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Noruas: Even in SupCom, with a custom built music engine, the battle music starts when you cancel a construction. *facepalm*

I would play tension first instead of battle music. So, when something has been killed, but units aren't being killed on a regular basis, start the tension music. So, whenever some outlying forces are picked off, or when you're being shelled by a bertha, the tension music starts. If that killing precipitates into a far larger amount of killing, then the music switches to the battle music.
This also fixes the problem of battle music starting when you cancel a building or reclaimed, because this would not be considered a 'battle' just 'tension'. And most of the 'tension' music is probably sitting in the build section currently anyway.

Now, I don't know if this is possible, and I don't fully understand the way it works, but if you could run a ratio of the amount of friendly units killed to enemy units over say, a 2 minute limit, and that ratio falls to like 1:4 or something, then it would play the victory music. If your units are dying at a rate of 4:1, then it plays the defeat music. If it is in the middle, then it continues to play the battle music.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

What your sayign si very vague because I need to put down hard values and hard definitions in code and your speaking in abstract terms.

Give numbers, Every mention of the word ratio should be followed by an actualy ratio,

for example:
when something has been killed, but units aren't being killed on a regular basis,
Define regular basis in a mod independant way that could be put into a set of if statements using logical operators such as AND OR NOT XOR NAND NOR etc.

And no groupAI have the following 2 events:
Initialize
Update (called 30 times a second)

There is no UnitDestroyed (Skirmish AI) or UnitDamaged or Enemy Damaged or EnemyDesttroyed or UnitCreated, theres just 2 individual calls, neither of which give any information about unit events.

Imagine walking into a room and seeing a computer with a spring game paused. You can only see within the players LOS. You have no information on unit deaths creation damages. You cannot see it in motion. You have to decide which music to play based upon what yous ee without mentioning anything mod specific. If you want unit deaths of the enemy, theres simply not enough information available for that, you cant see the enemy.

Everything has to be estimated, and it has to be reliable.


@Lordo

You're using a phail codec for mp3s. Dont use ffdshow for playing mp3s. My AI uses the windows multimedia interface to play MP3s. That codecs phail anyway it has a habit fo crashing trying todisplay thumbnails of movies even if explorer isn't set to show them. This is your problem with your system not my AI.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

As one of the people trying to push forward on a site redesign which includes a totally new wiki, not to mention the person who re-arranged that menu page int he wiki, I'd have to decline there.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

A lot of people got that format rounded out including myself and Redstar, unless you mean you changed it... again.

You're just going to import the Wiki text anyway, right?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I am Redstar.

And no, there's a mediawiki->dokuwiki converter but it lacks table support, and tables are mostly menu related for which a redesign is necessary anyway.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

A cunning twist of events, but still, new tables, eh? Fine, I'll help when I can.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Most of mediawiki can be converted save tables, there are a few hiccups where mediawiki allows 1 thing but extra dokuwiki syntax would work better, such as code in the middle of list which in dokuwiki should have <code></code> or <file></file> tags around it so its positioned in a nice pretty box.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

I kept it deliberately vague because I do not have enough of an understanding of the coding process to give you any further help then a vague suggestion. I just wanted to recommend that perhaps using the ratio of deaths in favour vs deaths against over time would be a potential way to determine whether the battle is being 'won', is 'in the balance' or is being 'lost'.

Beyond that, I'm getting out of my depth in terms of the coding, and I'd just talk myself into a corner, because I literally don't know enough.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

basicly, battle music needs to be less sensetive. one unit dieing shouldnt set off ultra battle music. maybe if x units die in y frames, or x damage is done/second on average, that way you could cause it to pnly kick in when things get serious

also, why not make this LUA so it dosnt have to me manually activated every game
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I havent got any lua experience. Also lua mp3 playback in 0.74b3 is supposed to be horrendously ugly.
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post by BigHead »

Sorry for digging up old thread, but why exactly is this done by groupAI? Spring is an open source game. Why don't you ask some dev to make you empty method "updateMusic()" that is called every x miliseconds and put your code there. You'd be "inside" spring and thus able to get any data you need to make spring 0.75 the game with the best dynamic music engine ever created :)
Yeah, I know it's never that easy and also sorry if i'm speaking as if i knew everything.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Please read the thread before you dig it up.

First:

- My groupAI uses windows APIs as I keep saying over and over again, its not portable.
- Lua would require a horrible method of doing this in 0.74b3, at the time I wrote it I wasn't even aware this horrendous method of doing it was possible.
I could release versions without waiting 6 months+ for spring to be updated.

All of this has been repeated over and over again and I'm rather tired of repeating it, its gettign quite annoying. I have a bad headache now.
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

Well, someone has to be our savior, and you almost were.
hammydude
Posts: 49
Joined: 26 Jun 2006, 20:59

Post by hammydude »

af you fucking own! i want to have your children!

anywyas thanks for this great coding, keep up the good work! now to test this out...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

ooh, must upload 0.75 compatible version
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Post Reply

Return to “AI”