[casual_games] Game Authoring Language

Charles Parcell cparcell at toxictoy.com
Fri Aug 12 22:59:01 EDT 2005


Here is the Math test we did. These are the results from it being run on 
machine. specs added for point of reference.

My System Spec.
--------------
Windows XP Pro SP2
Dual 2.8 P4
2 GB RAM


Flash 8
-----------
Fastest Speed = 141
Average = 144

Director 10.1
-------------------
Fastest Speed = 42
Average = 43

Speed increase of Director over Flash
------------------------------
-------------------------
Fastest Speed = 336%
Average = 335%


Just for a clear understanding, I have added a complete copy of code.


Flash 8
------------
// Frame 1 AS
doCalc();

gotoAndPlay(1);

function doCalc() {
       var t1:Number = getTimer();
       for (var i:Number = 0; i < 10000; i++) {
               Math.sqrt(i);
               Math.cos(0.01 * i);
               Math.sin(0.01 * i);
               Math.tan(0.01 * i);
               Math.pow(i,i);
       }
       trace( getTimer() - t1 );
}


Director 10.1
----------------------
-- Frame 1 Lingo
on exitFrame me
 t1 = the milliseconds
 repeat with i = 0 to 10000
   x = sqrt(i)
   x = cos(0.01 * i)
   x = sin(0.01 * i)
   x = tan(0.01 * i)
   x = power(i, i)
 end repeat
 put the milliseconds - t1
 _movie.go(_movie.frame)
end
--------------------------------
--------------------------------

Charles P.



BRENT SILBY (def-logic) wrote:

> Hi Charles,
> Is it possible to post the results of the test function? I'm 
> interested in comparing its speed to Javascript. Just insane curiosity :)
>  
> I predict JS will be slower, yet sometimes it is surprising. I've been 
> able to run scripts with over 20 moving screen elements at 50FPS, on a 
> pretty average machine. Flash often seems to lag with that much 
> movement. Of course, JS does not have anti-aliasing, so that would 
> account for a lot of speed difference.
>  
> I understand why people stick to Flash, but I really want to put JS 
> out there. It is a lot more powerful than people give it credit. And 
> there is a certain "coolness" about being able to design games with 
> nothing more than a text editor. But that's the geek in me talking :)
>  
> Cheers,
> Brent.
>
> /DEF-LOGIC
> VIDEOGAMES
> www.def-logic.com <http://www.def-logic.com>/
>
> >
> > Flash 8 test code
> > -----------------
> > class test {
> >       public function test () {
> >               var t1:Number = getTimer();
> >               var x:Boolean = true;
> >               for (var i:Number = 0; i < 50000; i++) {
> >                       x = this.testFunction(x);
> >                       if (x) {
> >                               x = x;
> >                       } else {
> >                               x = x;
> >                       }
> >               }
> >               trace ("result = " + (getTimer() - t1) );
> >       }
> >       public function testFunction (x:Boolean):Boolean {
> >               x = not x;
> >               return x
> >       }
> > }
> >
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Casual_Games mailing list
>Casual_Games at igda.org
>http://seven.pairlist.net/mailman/listinfo/casual_games
>  
>



More information about the Casual_Games mailing list