public void drawGame(Graphics2D a) {
        a.translate(200,0); //shifts game 200 pixels to make room for UI
        a.translate(400,400); //shifts anchor point to the center in orderfor accurate transformation
        a.scale(scaler,scaler); //applies zoom(scaler)
        a.translate((offsetx),(offsety)); // applies offset

        if (developer) {
            a.setColor(Color.GRAY);
            a.drawRect(0, -mapsize / 2, mapsize, mapsize); //draws map
            a.drawRect(0, -mapsize / 2 - mapsize / 4, mapsize + mapsize / 4, mapsize + mapsize / 2); // draws meteor spawn area
            a.drawRect(0, -mapsize / 2 - mapsize / 4 - mapsize / 8, mapsize + mapsize / 4 + mapsize / 8, mapsize + mapsize / 2 + mapsize / 4); // draws spawn area
            a.setColor(Color.WHITE);
        }


        for(int x=0;x<objects.size();x++){
            objects.get(x).draw(a);
        }
        for(int x=0;x<lasers.size();x++){
            lasers.get(x).draw(a);
        }
        for(int x=0;x<fx.size();x++){
            fx.get(x).draw(a);
        }

        ///beacon
        if(beacon&&User.beaconing&&running) {
            a.setColor(new Color(255, 255, 0, 15));
            a.fillOval(User.userx-150, User.userY-150, 300, 300);

        }

        if(selection!=0&&selection!=5){
            Spawner.drawdefaut(user.userx,user.userY,a);
        }

        //undoes the transformation
        //a.translate(-(offsetx),-(offsety));
        //a.scale(1.0/scaler,1.0/scaler);
        //a.translate(-400,-400);
        //a.translate(-200, 0);
    }