<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <h1>TameGame test</h1>
        <script src="../TameGame.js" type="text/javascript"></script>
        <script type="text/javascript">
            console.log("Starting up");

            var someGame = new TameGame.StandardGame();
            console.log(someGame);

            someGame.watch(TameGame.ObjectDetails, 
                            TameGame.UpdatePass.Physics, 
                            (function (obj, newValue) { console.log("ObjectDetails changed to ", newValue.objectName)}));

            var obj = someGame.createObject();
            obj.get(TameGame.ObjectDetails).objectName = "Hello, world";

            someGame.tick(0);
            someGame.tick(1);

            obj.get(TameGame.ObjectDetails).objectName = "Goodbye, world";
            someGame.tick(2);
        </script>
    </body>
</html>

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <h1>TameGame test</h1>
        <script src="../TameGame.js" type="text/javascript"></script>
        <script type="text/javascript">
            console.log("Starting up");

            var someGame = new TameGame.StandardGame();
            console.log(someGame);

            someGame.watch(TameGame.ObjectDetails, 
                            TameGame.UpdatePass.Physics, 
                            (function (obj, newValue) { console.log("ObjectDetails changed to ", newValue.objectName)}));

            var obj = someGame.createObject();
            obj.get(TameGame.ObjectDetails).objectName = "Hello, world";

            someGame.tick(0);
            someGame.tick(1);

            obj.get(TameGame.ObjectDetails).objectName = "Goodbye, world";
            someGame.tick(2);

            var start = Date.now();
            var numItems = 1000000;
            for (var x=0; x<numItems; ++x) {
                obj.get(TameGame.ObjectDetails).objectName = "Speed test";
            }
            var end = Date.now();
            var timeMs = end - start;

            console.log(numItems + " updates in " + timeMs + "ms (" + (numItems/(timeMs/1000.0)) + "/sec)");

            var start = Date.now();
            var numItems = 1000000;
            for (var x=0; x<numItems; ++x) {
                obj.objectName = "Just properties";
            }
            var end = Date.now();
            var fastTimeMs = end - start;

            console.log(numItems + " fast updates in " + fastTimeMs + "ms (" + (numItems/(fastTimeMs/1000.0)) + "/sec)");
            console.log("Slowdown factor " + (timeMs/fastTimeMs));

            someGame.tick(3);
        </script>
    </body>
</html>

Add a speed test for the property system
Add a speed test for the property system
