[Warzone-dev] [patch #973] Fixes CPU cycle wasting on pause

2008-02-07 Thread Bugs Buggy

URL:
  

 Summary: Fixes CPU cycle wasting on pause
 Project: Warzone Resurrection Project
Submitted by: buginator
Submitted on: Friday 02/08/2008 at 04:41
Category: Fix
Priority: 9 - Immediate
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None

___

Details:

This patch is needed mostly for notebook users, since wasting CPU cycles eats
up battery life for no good reason, but it also is good for everyone else.

Inline profiling results:

atmos.c is still a *massive* CPU hog
This is mainly because of:
#define MAX_ATMOS_PARTICLES (MAP_MAXWIDTH * MAP_MAXHEIGHT)

When paused, it *still* executes that horrible loop.
When condition for paused is check, at least we don't execute that loop
anymore.
This resulted in limited savings for CPU cycles though.

However, we are still executing the mainloop & gameloop @ whatever
framelimiter is set to when paused.

I think it is set to 60 for default.

Even by not doing many of the drawing routines, we are still wasting CPU
cycles
when paused.  I pretty much stopped all drawing routines when paused, and it
didn't help much either, which does make sense when you look at how this loop
operates, and just what the lone
SDL_Delay() is used for.

Tried to set the framelimiter to a lower value when paused, and restore it
when unpaused, that resulted in choppy menu animation, and overall was not
satisfied with the results at all.

Next added a SDL_Delay(30) call when the pause menu is up.  This worked
nicely, and is a *huge* improvement.

I also modified display3d.c to not execute some routines when paused, and
came across this:
/* This is done here as effects can light the terrain - pause mode problems
though */

I didn't notice a problem when I did:
if ( !gamePaused() )// Don't bother drawing/updating when paused!
{
processEffects();
atmosUpdateSystem();
}

Can someone shed some light on what the issue is(was?)?  I did NOT include
that in this patch.





___

File Attachments:


---
Date: Friday 02/08/2008 at 04:41  Name: pausefix.patch  Size: 1kB   By:
buginator



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Warzone-dev] [patch #972] Sorts savegames

2008-02-07 Thread Bugs Buggy

URL:
  

 Summary: Sorts savegames
 Project: Warzone Resurrection Project
Submitted by: buginator
Submitted on: Friday 02/08/2008 at 04:38
Category: Feature
Priority: 6
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None

___

Details:

As requested, this sorts the savegames so that the latest ones are displayed
first.






___

File Attachments:


---
Date: Friday 02/08/2008 at 04:38  Name: sortsavegames.patch  Size: 4kB   By:
buginator



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Warzone-dev] [bug #11005] warzone crashes

2008-02-07 Thread Shevek

URL:
  

 Summary: warzone crashes
 Project: Warzone Resurrection Project
Submitted by: shevek
Submitted on: Friday 08/02/08 at 00:37
Category: None
Severity: 5 - Blocker
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:

0xe410 in ?? ()
(gdb) #0  0xe410 in ?? ()
No symbol table info available.
#1  0xbfec1528 in ?? ()
No symbol table info available.
#2  0x in ?? ()
No symbol table info available.

I vaguely remember something about (VIEWDATA *)psCurr->somethingviewdata was
null, assertion failed




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


Re: [Warzone-dev] [Warzone-commits] r3712 - /trunk/src/intelmap.c

2008-02-07 Thread Dennis Schridde
Am Donnerstag, 7. Februar 2008 20:19:17 schrieb Gerard Krol:
> Author: gerard_
> Date: Thu Feb  7 20:19:15 2008
> New Revision: 3712
>
> URL: http://svn.gna.org/viewcvs/warzone?rev=3712&view=rev
> Log:
> Make sure that long lines of text are correctly drawn and wrapped for the
> intelligence display. This also works for larger fonts. This fixes bug
> #10913, and makes patch #965 obsolete.
>
> Modified:
> trunk/src/intelmap.c
- Form->width, Form->height,
+ Form->width-40, Form->height,

Magic value?


signature.asc
Description: This is a digitally signed message part.
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [bug #10995] --nosound broken

2008-02-07 Thread Kevin Gillette
So then the next question would be: how much processing is there *outside*
of the openal calls? is it minimal enough to be considered almost a NOP?

On Feb 7, 2008 8:44 AM, Gerard Krol <[EMAIL PROTECTED]> wrote:

> 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]
> > > wrote:
> >
> >
> > URL:
> >  
> >
> > 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: ''
> > 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
>
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [bug #10995] --nosound broken

2008-02-07 Thread Gerard Krol
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] 
> > wrote:
>
>
> URL:
>  
>
> 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: ''
> 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