The sound data that would be stored is the current track playing. 
Scripts can set this and expect to be able to query which one is 
playing. If the scripts select a piece of music with a certain theme and 
feeling, we want that track to play again when the game is loaded, 
preferably even at the point where it left off. A solution would be to 
explicitly notify the script that it is being loaded, so that it can 
restart the music.

Also, the trouble is that it is much more difficult to keep the games 
internal state correct when some pieces of code are sometimes executed, 
and sometimes not. Minimising the amount of conditional code is a good 
thing I think.

- Gerard

Kevin Gillette wrote:
> the correct way to do it *is* to skip past all sound specific stuff 
> from the game loop when --nosound is used. frankly, there's no reason 
> at all to store any sound-related data in a savegame -- all you lose 
> is about a second's worth of sounds that were initiated just before 
> the save point, just as there is no noticable benefit to storing the 
> animation frame index for cyborgs in a game like this. the benefit by 
> not running all the sound specific stuff is that you save ticks, and 
> not necessarily bring system requirements down, but along with other 
> optimizations, keep them from skyrocketing upwards.
>
> On Feb 5, 2008 2:26 PM, Gerard Krol <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
>     URL:
>      <http://gna.org/bugs/?10995>
>
>                     Summary: --nosound broken
>                     Project: Warzone Resurrection Project
>                Submitted by: gerard_
>                Submitted on: Tuesday 02/05/2008 at 22:26
>                    Category: Engine: Sound
>                    Severity: 3 - Normal
>                    Priority: 5 - Normal
>                      Status: None
>                 Assigned to: None
>            Originator Email:
>                 Open/Closed: Open
>             Discussion Lock: Any
>                     Release: svn/trunk
>            Operating System: GNU/Linux
>             Planned Release: None
>
>        _______________________________________________________
>
>     Details:
>
>     The --nosound command line option is broken, using it causes an
>     assert:
>
>     never   : directory: script/binary
>     never   : directory: script/data
>     never   : file: SCRIPTVAL cam1a.vlo
>     wz      : Loading script data cam1a.vlo
>     script  : allocated space for 27 events
>     error   : resGetDataFromHash: Unknown ID: 66d7b27 Type: WAV
>     error   : Assert in Warzone: frameresource.c:579 :
>     resGetDataFromHash (psRes
>     != NULL), last script event: '<none>'
>     warzone2100: frameresource.c:579: resGetDataFromHash: Assertion
>     `psRes !=
>     ((void *)0)' failed.
>
>     The way --nosound is implemented is wrong, it is better to act like
>     --dry-run, and perform all operations except the actual openall
>     calls. This
>     makes it that you can start a game with --nosound, save, start
>     with --sound,
>     and continue (with the sound playing as it would have been).
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Warzone-dev mailing list
> Warzone-dev@gna.org
> https://mail.gna.org/listinfo/warzone-dev
>   


_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to