From: Frederick W. <fre...@go...> - 2012-01-28 18:22:58
|
Master now contains a lot of new sound options, encompassing both - BGM: background music (5 parameterizable contexts) - SFX: sound effects (17 distinct events), including special handling (eg., length of set revenue sfx depends on the revenue amount (as in RRT1)) As before: - playing sounds (both bgm / sfx) is disabled by default - sound content I use locally is not uploaded for copyright reasons. In the following, I added some details about what has been done (all details found in commit comments/java-doc). --Frederick ============================================= What has been changed in rails (apart from rails.sound.*) ? ============================================= Game Engine (rails.game.*): - Removal of all calls to the old BackgroundMusicManager (developed 2 months ago) --> Full compliance with layering and publish/subscriber paradigm ("Rails2.0 ready") - GameManager(I) and PublicCompany(I) are extended with a getter-method for already existing but externally required game models (getCurrentRoundModel and getFloatedModel respectively). Config: - New option tag ("alwaysCallInit") for Config Items that init is executed even from the game setup (GameSetup is one of the BGM contexts) - Added scrollbars to config window's tab panels (sfx has 17 options...). Dynamic Report Window: - corrected its status model: now time warp mode is set before the goto associated with the clicked. ============================================= What has happened in rails.sound.*? How does it work? ============================================= Old BackgroundMusicManager removed and replaced by a new sound framework (5 classes). As a facade to the rest of rails, the Sound Manager is notified of - processed events (by GameUIManager) - this covers most of the triggers of playing sounds - model updates (by the respective models)- as an observer to the relevant game models. - rare case: direct notification from UI layer for non-action / non-model change events (eg., set revenue without dividend decision). Based on this input, several events / contexts are recognized: - Background music (BGM) is configurable on a per-round-type and per-phase basis. (currently 5 round types supported) - There are 17 sound effects (SFX) types, of which - one is parameterizable (train type for buy train) - one is played for a varying amount of time (set revenue depending on the revenue - similar to RRT1) The recognition of input received by the framework is evaluated by the event interpreter who - triggers sound playing directly (straightforward cases) - triggers sound context adjustment (complex case - eg. phase bgm) - which triggers in turn playing sounds The framework also correctly handles these situations: - timewarp (sfx disabled) - game loading (sfx/music disabled) - changing enabled/disabled config within the game |