public void render() {
        System.out.println("RenderLoopBegin");
        try {
            g = bi.createGraphics();
            g.setColor(background);
            g.fillRect(0, 0, frameW, frameH);
            /************/
            
            for (int i = 0; i < tasks.size(); ) {
                tmpTask = tasks.get(i);
                tmpTask.executeTask();

                if (tmpTask.getTaskDone() ) {
                    tasks.remove(tmpTask);
                    //System.out.println("TASK DONE");
                }
                else {
                    i++;
                }
            }

            for (Layer L : gameLayers) {
                for (Entity e : L.getEntList() ) {
                    e.draw(g);
                }
            }
            
            for (LayerConnection lc : collisionConnections) {
                lc.processConnection();
            }
            
            /************/
            graphics = strategy.getDrawGraphics();
            graphics.drawImage(bi, 0, 0, null);
            
            if (!strategy.contentsLost() )
                strategy.show();
            
            System.out.println("RenderLoopStop");
        }
        finally {
            if (graphics != null) {
                graphics.dispose();
            }
            if (g != null) {
                g.dispose();
            }
        }
    }