Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 69

Thread: 2006 PGD Annual: Stage 6 feedback

  1. #41

    2006 PGD Annual: Stage 6 feedback

    I had quite an interesting result when I looked further into the performance of this type of function..

    I ran the test 10 times, starting with a 0% failiure rate for the inner procedure and increasing each time by 10%.


    Here's my code: Note label1 is a valid control on the form.

    Code:
    var
       count : integer;
       loop, bigloop : integer;
       start : cardinal;
    
       fred : TLabel;
    begin
    
     for bigloop := 0 to 10 do
     begin
         count:=0;
         fred:=nil;
    
         start:=getTickCount;
    
         for loop:=1 to 1000000 do
             begin
                  inc(count);
    
                  if random*10 > bigloop then fred := label1
                  else fred := nil;
    
                  if &#40;fred<>nil&#41; then
                     fred.caption&#58;='Hello';
             end;
    
         memo1.lines.add&#40;'No Try &#58; '+intToStr&#40;getTickCount-start&#41;&#41;;
    
         count&#58;=0;
    
         start&#58;=getTickCount;
         for loop&#58;=1 to 1000000 do
             begin
                  try
                     inc&#40;count&#41;;
    
                     if random*10 > bigloop then fred &#58;= label1
                     else fred &#58;= nil;
    
                     fred.caption&#58;='Hello';
                  except
                  end;
             end;
    
         memo1.lines.add&#40;'Try &#58; '+intToStr&#40;getTickCount-start&#41;&#41;;
         memo1.lines.add&#40;' '&#41;;
     end;
    end;
    And it turns out that if your function works fine almost all the time (ie. a best case), a try except clause is actually *slightly* faster! I guess this is because the Non-Try code has one extra If Then statement. But from about 10-15% failiure rate, the overhead of the try except clause can be seen, and it is pretty big...



    P.S. Dont quote me here. Does it look believeable to you? Have I got my 'math' right?
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  2. #42

    2006 PGD Annual: Stage 6 feedback

    Interesting stuff !!!

    I avoid using "try" in any loop.
    I only use it in one shot procedures where the user runs something fishy,
    like a console command, or file loading.

  3. #43
    idee_fixe
    Guest

    2006 PGD Annual: Stage 6 feedback

    Hey Dirk,

    I was just looking at the config file for Tanx, and I noticed it uses '.' instead of ',' for decimal places. I know you had a problem with Blocked using '.' in the config file, so I just thought it was a little odd to see it in your game!

    Is the config file generated by the executable and saved using local settings, or did you have the fore-sight to use '.' instead of ','?

  4. #44

    2006 PGD Annual: Stage 6 feedback

    You are right, I don't do anything to avoid decimals problem and unfortunately I use floats to store in the inifile. In my case I didn't see the problem, because I use them only for volume and gamma settings etc.

    Did you have problems with it?

    If not, maybe Delphi 2005 (which I used to compile) takes care of the language setting.....

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  5. #45
    idee_fixe
    Guest

    2006 PGD Annual: Stage 6 feedback

    No, the floats didn't cause any problem on my system - Tanx is very error free for me! I was just wondering because I thought you were using some neat trick to get around the international compatibility problems!

  6. #46

    2006 PGD Annual: Stage 6 feedback

    Then it seems that Delphi 2005 compiler takes care of it. Maybe Borland adjusted the Read-functions for TInifile-class.

    I spent very much time on being errorfree. I tested on many different machines (about 30) and video cards (about 15 different ATI and NVidia models, from brandnew down to Geforce 2 MX cards).
    Additionally, Asphyre has a quite stable status, even if 3D support is limited and very new in it. I think I am the first person who did a "whole" 3D game with Asphyre.

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  7. #47

    2006 PGD Annual: Stage 6 feedback

    Well I think you did a great job with being bug free in Tanx.
    Probably will win the "Most Stable" award
    Altho ... there are a few games that we havent seen yet!!

    Stabililty is also a high priority of mine, but there were a couple bugs that slipped by me. Patched em up, but if the judges hit those bugs, I'm sure we'll get dinged. Considering the complexity of our game, I think its quite stable! Big thanks to Michalis or I wouldnt have known how to fix that language problem. I use Delphi 7 to code (*cross fingers for new compiler*)

  8. #48

    2006 PGD Annual: Stage 6 feedback

    Yes, I am very curious about the entrys which we haven't seen anything from. No screenshots, no nothing.

    Hopefully WILL posts the promised downloadlinks soon. I have tested all "available" games much, even if I was not able to finish them all (yours for example).

    All in all I have to say, you did a great job in the time we had! That's for sure. In your future work on this project, please spend some more time in responses to players action. For example give enemys a lifebar, hit sounds, explosions when hit etc. Thats the biggest thing I am missing in your game. You cannot estimate how much you already damaged your enemy.

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  9. #49

    2006 PGD Annual: Stage 6 feedback

    By the way, any progress in judgement already?

    Don't want to jostle, just asking
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  10. #50

    2006 PGD Annual: Stage 6 feedback

    First up, well done to all the competition entries for this compo, their really good.....Tanx Rox!

    Anywayz I noticed some talk on decimal points and ini files or something and was wondering if this would help....
    http://www.delphiforfun.org/Programs...zedDecimal.htm
    ..sorry if it don't relate, I'm a crappy coder really

    PS this was the first time I got to see the new Firefox spell checker in action, I like it ....funny it doesn't know the word Firefox

Page 5 of 7 FirstFirst ... 34567 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •