public Main() {
        e = new Engine("Test", 640, 480);
        
        e.teleportEntity(e.findEntityGlobal(1),  new Node(350, 60) );
        e.moveEntity( e.findEntityGlobal(2), new Node(350, 350) );
        //e.moveEntity( e.findEntityGlobal(1), new Node(250, 250) );
        //e.translateEntity( e.findEntityGlobal(1), new Node(100,100) );
        
        e.getCanvas().addKeyListener(new KeyInputHandler() );
        e.getCanvas().requestFocus();
        
        e.makeCollisionConnection("player", "enemy", this);
        
        int fps = 0;
        long totalTime = 0;
        long curTime = System.currentTimeMillis();
        long lastTime = curTime;
        
        long lastTime2 = System.currentTimeMillis();
        //long totalLastTime2 = 0;
        
        int loops = 0;
        while (true) {
            //totalLastTime2 += (System.currentTimeMillis() - lastTime2);
            //System.out.println( (System.currentTimeMillis() - lastTime2) );
            e.setLastTic( (System.currentTimeMillis() - lastTime2) );
            lastTime2 = System.currentTimeMillis();
            //System.out.println("Diff: " + (System.currentTimeMillis() - lastTime) );
            
            lastTime = curTime;
            curTime = System.currentTimeMillis();
            totalTime += curTime - lastTime;

            if( totalTime > 1000 ) {
                //System.out.println("TotalTime: " + totalLastTime2 );
                //totalLastTime2 = 0;
                totalTime -= 1000;
                fps = frames;
                frames = 0;
            }
            ++frames;

            e.render();
            
            loops++;
            
            /*if (loops == 50) {
                e.removeTask(2);
            }*/
            
            if (loops == 10000) {
                System.exit(0);
            }
            
            Thread.yield();
            
            try {
                Thread.sleep(20);
            }
            catch (InterruptedException ie) { }
        }
    }