On Sun, Sep 5, 2010 at 9:15 PM, Kurosu <kur...@free.fr> wrote:
> Top callers are:
> 95053    20.8283  libgcc_s.so.1            /lib/libgcc_s.so.1
> 75516    16.5473  libSDL-1.2.so.0.11.1     BlitNtoNPixelAlpha
> 41306     9.0511  libc-2.5.so              /lib/libc-2.5.so
>
> I'm a bit surprised by first one, as I'm not sure what is called; maybe
> threads logic, but it would be surprising. For the libc call, it's
> probably memcopies. Optimizing BlitNtoNPixelAlpha would be worthwhile,
> but I think it's very general purpose (32 to 24, 24 to 16 etc). And
> halving its execution time would only bring like 8% speedup, almost
> negligible.

I can try to install more debug symbols to more exact results.

> Last profile is also surprising: it shows that character animation (not
> really surprising in fact: for the same screen, you now have twice more
> characters to display) and AI become more expensive.

Animation seems to be the big obstacle on 4x10 case. I made crude test
(see below) with animations, and this alone changes completely
unplayable game to about 10 fps game.

Latter change disable part of the animations and characters are partly
floating. I tested the first change because according to call graph
Body::Build is called twice. I am not sure if there is any other
effect than some error messages being printed.



Index: src/game/game.cpp
===================================================================
--- src/game/game.cpp   (revision 8358)
+++ src/game/game.cpp   (working copy)
@@ -735,7 +735,7 @@
       // If no cacluate frame action is sheduled the frame
calculation will be skipped and the bodies don't get build.
       // As the draw method needs builded characters we need to build here
       FOR_ALL_CHARACTERS(team,character) {
-        character->GetBody()->Build();
+        //character->GetBody()->Build();
         character->GetBody()->RefreshSprites();
       }

Index: src/character/body.cpp
===================================================================
--- src/character/body.cpp      (revision 8358)
+++ src/character/body.cpp      (working copy)
@@ -526,12 +526,12 @@
         y_max = val;
     }
   }
-
+/*
   body_mvt.pos.y = GetSize().y - y_max + current_mvt->GetTestBottom();
   body_mvt.pos.x = ONE_HALF*(GetSize().x -
skel_lst.front()->member->GetSprite().GetWidth());
   body_mvt.SetAngle(main_rotation_rad);
   skel_lst.front()->member->ApplyMovement(body_mvt, skel_lst);
-
+*/
   need_rebuild = false;
 }

_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à