Jump to content

stwf

WFG Retired
  • Posts

    178
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by stwf

  1. Hello All,

    Sorry for my prolonged absence. I'l be getting back into the programming thing in the new year. Its good to hear all of this oniterest in the sound stuff. I'll try and explain some thing as easily as I can. I'll also be writing up a short description of how the sound stuff works. Some of it is counterintuitive but it explains a lot of why we do things the way we do.

    I would think it's best if it replaces some/most of the existing fight sounds when there is a large fight, something along the lines of this old idea for the sound system: http://trac.wildfiregames.com/wiki/Intensity_%26_Priority I don't know how much/if anything of that is implemented in the sound system, we'd have to ask Stephen about that, but I definitely think that having ambient battle sounds + attack sounds for all units + battle music would be too much. Having something like this would be great though, and more of it for more units. Or more damage dealt, but imho if it's possible to have it be per the amount of units fighting rather than the damage dealt would be nice as many units fighting would make a lot of noise even if not a lot of damage is dealt. While on the other hand even a couple of siege engines might deal a lot of damage, but shouldn't cause as much battle sounds imho :) On the other hand I'm not sure how often such a situation should occur though as it would be suicide to send in just siege engines without any protection :P

    Team, in order to make this more efficient, and make the battle sounds accurate, varied, and rich, we have to decide a few things before going any further:
    1.- I will create from the draft the following ambience loops:
    "Small Battle Sound" for severity = 2
    "Large Battle Sound" for sevetity = 3
    "Larger Battle Sound" for severity = 4
    2.- Loops will include less units weapons sounds
    3.- We prefer 10 variations for each "small", "Large" and "Larger" battle sounds
    Thanks in advance for your confirmation. If you have further suggestions, please, kindly use the same structure when replying (1.-; 2.-; 3.-; etc.). Also, if you want me to improve or change something in the battle sounds do your best to be as descriptive as possible . Bear in mind that 'good ' or 'bad' doesn't say much and it's pretty subjective.
    Thanks!
    Matias

    Currently the sound system will locate a sound source so when listening in stereo sounds from the righ of the screen come out of tthe right speaker. My issue with the battle intensity sounds is that this would largely eliminate that. and I think it would be bad.

    I believe if we had formations, and could easily locate a group of fighters to one area, it would then make sense to have one sound for 10 archers firing instead of playing 10 singe arrow shots at one time. But otherwise we lose a lot unless we introduce some complicated method of grouping and locating similar fighters. Of course we need to be very careful not to do anything that takes too long. This code would need to be executed every frame. I have always worked to keep the computation time to a minimum there.

    Also note that the current code does alter the pitch, volume and frequency for most sounds randomly. This is in addition to the 10 or sos sounds there are for a sword clank. These also get used in a random order and have their volumes and pitches altered randomly.

    I think it is important to remember this is a game. The sounds should first serve the game, making sure to alert the player of important events, and not serve to confuse them with too many sounds. It would be nice if in addition to that everything sounded like a hollywood movie battle scene, but playability should come first.
    Please feel free to ask any questions. I'll try to be in IRC more too. Let me know if there is a good time and I can try to be online.
    • Like 4
  2. We already have decent SDL 2.0 support, though I've only tested on Windows and OS X (briefly) so far. I have a patch for using SDL 2.0's color cursors, that fixes a conflict between SDL and our hardware cursor implementation on Windows, I will try to post that soon. Progress has been tracked somewhat on #935.

    So by support you are saying that switching over to SDL 2.0 may not be that hard? In that case maybe I will look at it (if you don't mind) as part of the Android move. Who knows how many odd issues it may clear up...

  3. I think training and building complete sounds should be omnipresent. This, after watching some Age of Kings gameplay videos and also when playing 0 A.D. being confused when I couldn't hear these sounds when off-camera.

    I think that can be fixed by editing the appropriate XML file and turning on eOmnipresent if you want it to play at the listener location, or turning on eDistanceless and it is played at a location, but at full volume.

  4. OK, thread resurrected! My Ouya has just shipped, I should be getting it in the next week -> month lol. At that point I'm going to try and build this.

    http://www.ouya.tv/

    This may also be a good chance to upgrade to SDL2.0 which is still a WIP but their timeline seems to roughly jive with the amount of time the port will take. Anyone with some Android expertise / interest who wants to stay in the loop on this let me know. OF course I'll post here when I am successful. Defeat is not an option!

  5. I think its time the game got a working preferences system, so I don't have to keep editing default.cfg. Does this work on any platforms?

    A good start would be having our current settings dialog box remember its settings. Then probably adding some better options to the dialog box. Apologies if this is my error or a Mac issue.

  6. Hi, sorry haven't been on IRC the last few days. I do believe we mean to put some indication on the minimap when someone is attacked, or dies. Which is the best way to handle this.

    But maybe some sort of rolloff for far away deaths isn't a bad idea. Right now sounds are marked as distanceless, meaning they are played even if they are far off screen. But maybe they still could be played at lower volume. Right now the Sound code doesn't do many distance measurements, its more concerned with whether stuff is on screen or not.

  7. No problem! It actually made my code much simpler, so I'm glad to have them in there...

    I'll incorporate all of your suggestions soon, although I may let you work through it a little more on your own so I get all of the fixes at one time ;-)

    What do we do when functions are only available at certain stages in game? "GameView" for example can only be used when a GameView instance is available which currenty means when a match is running. My hacky workaround is only registring the function in the case of "if(g_Game && g_Game->GetView())". That's not very good because this check runs when the GUI page is initialized and in the future it could be required to access GameView's function from a page that was initialized before the game started. I've noticed that you check for "if ( g_SoundManager )" in each function and simply do nothing if it's false. In the soundmanager's case that's probably good enough because it gets initialized quite early and stays active until the game ends. I'm wondering if I should try to implement a common solution for this problem like a check that can be added when registring the function so that the ScriptInterface itself would react sensible and the C++ code providing the functions doesn't need to worry about that in each individual function. This way I could also use the same approach for registring the functions of GameView and they could be used in all pages when GameView is available no matter when the page was initialized.

    In my case its best since the SoundManager will also be nil if the game was compiled without audio support, or if the user disables music from the settings menu during a game. So its a case I always have to deal with.

  8. Hi,

    OK, I have these changes done, although there is a bug or two I'm still working out, the JSObjects have all been replaced by globals.

    This is currently in a github branch. Can you get it from there? Would you just like it as a diff file? I suppose I could just check in the changes to svn when its bug free, but that may take a little bit. Would you rather have the changes first?

    • Like 1
  9. I don't think triggers should be made to fit the campaigns needs.

    I never meant to say that the triggers be designed just for a particular campaign. Just that it would be nice to have a sample campaign to work against as we did the coding. It seems like a lot of campaign type scenarios don't require triggers at all, but some other type of functions like timers and such.

    Also that its my opinion that high quality content takes much longer to create than the programming behind it (once its begun).

  10. I am really interested in implementing triggers and getting campaigns in the game. Its just there are a few other things that need to be done first. I would think it would be better to have at least an outline of the narrative available first though. This way we could make sure the trigger system was adequate for what the campaign requires.

    I remember someone saying they had written out a tutorial campaign. I'll have to find that post.

  11. Is anyone against any of these changes or do you have additional inputs to consider? I've spent a lot of time thinking about it and I'm sure enough to write that post, but I still don't understand everything in detail and could be wrong about some aspects.

    Hi , they seem doable, so if it helps out keeping the code current I have no problem with it...

    Trying to build the latest code with your patch applied brings up the following errors and warnings though:

    ../../../source/graphics/GameView.cpp:621:10: warning: address of function

    'CGameViewImpl::ConstrainCamera' will always evaluate to 'true'

    [-Wbool-conversions]

    if (!m->ConstrainCamera)

    ~~~~^~~~~~~~~~~~~~~

    ../../../source/graphics/GameView.cpp:407:18: error: no matching member function

    for call to 'RegisterFunction'

    ...scriptInterface.RegisterFunction<void, bool, &CGameViewImpl::LockCullCamera>...

    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  12. I'm willing to make whatever changes are needed to move the game forward, but there are a few things that need to be thought through here. What time frame are we talking about here?

    I'm not as much in favor with passing handles back to the simulation. It makes me think I would need to keep these references around forever since I wouldn't know when a handle went out of scope or the converse, forcing js developers to dispose of each handle seems like a complication for them. In general I've tried to move the work into the C code like with playlists.

    Is the behavior of source/simulation2/CCmpSoundManager along the lines of what you want?

  13. It seems to me that some of these suggestions are getting away from what we are trying to create here, which is a game of ancient warfare, and also pretty unrealistic.

    I mean a stand of trees that you could cut down in a week takes years and years to regrow. Unless we place strict limits on how many units are chopping trees there is no way they could ever regenerate. Same with berries, or animals, and that seems like too much micromanagement.

    Better could be new resources showing up as research is done, like some detection technique being researched would result in a bunch of invisible metal deposits becoming visible In addition farms getting renewable, and more productive through research is also more realistic. Maybe bigger trees becoming available for cutting down. But lets remember that we aren't trying to rewrite Civ3 here (at least not yet).

  14. It appears that if you start a game, and then return to main menu, any more games will play the music from the first one, regardless of civilization.

    OK, this actually seems to be a javascript error. The variable this.tracks.PEACE keeps getting each civs music added tothe list.

    I can clear this up with a call to

    tracks.PEACE = [];

    at line 120 of music.js. But I don't know the javascript code very well. Does this seem like the best place to do this? This only works for peace tracks which seems to be all that there is in the civ json files at this moment...

×
×
  • Create New...