@@ -0,0 +1,3044 @@
+package base2DFramework;%0A%0Aimport java.awt.Color;%0Aimport java.awt.Dimension;%0Aimport java.awt.Graphics;%0Aimport java.awt.Graphics2D;%0Aimport java.awt.Point;%0Aimport java.awt.RenderingHints;%0Aimport java.awt.event.MouseEvent;%0Aimport java.awt.event.MouseListener;%0Aimport java.awt.event.MouseMotionListener;%0Aimport java.awt.geom.AffineTransform;%0Aimport java.awt.geom.NoninvertibleTransformException;%0Aimport java.awt.geom.Point2D;%0A%0Aimport javax.swing.JFrame;%0A%0Apublic class Base2DFramework extends JFrame implements MouseListener, MouseMotionListener %7B%0A%0A    public Color background = Color.decode(%22#1E1E1E%22);%0A%0A    private boolean init = true;%0A    private Point dragStartScreen;%0A    private Point dragEndScreen;%0A    private AffineTransform coordTransform = new AffineTransform();%0A%0A    public Base2DFramework() %7B%0A        setTitle(%22JHSS%22);%0A        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);%0A        setSize(1024, 768);%0A        setLocationRelativeTo(null);%0A%0A        addMouseListener(this);%0A        addMouseMotionListener(this);%0A%0A        setVisible(true);%0A    %7D%0A%0A    @Override%0A    public void paint(Graphics g1) %7B%0A        Graphics2D g = (Graphics2D) g1;%0A%0A        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);%0A%0A        // Background%0A        g.setColor(background);%0A        Dimension d = getSize();%0A        g.fillRect(0, 0, (int) d.getWidth(), (int) d.getHeight());%0A%0A        if (init) %7B%0A            init = false;%0A            coordTransform = g.getTransform();%0A        %7D%0A        else %7B%0A            g.setTransform(coordTransform);%0A        %7D%0A    %7D%0A%0A    private void moveCamera(MouseEvent e) %7B%0A        try %7B%0A            dragEndScreen = e.getPoint();%0A            Point2D.Float dragStart = transformPoint(dragStartScreen);%0A            Point2D.Float dragEnd = transformPoint(dragEndScreen);%0A            double dx = dragEnd.getX() - dragStart.getX();%0A            double dy = dragEnd.getY() - dragStart.getY();%0A            coordTransform.translate(dx, dy);%0A            dragStartScreen = dragEndScreen;%0A            dragEndScreen = null;%0A%0A            this.repaint();%0A        %7D%0A        catch (NoninvertibleTransformException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    private Point2D.Float transformPoint(Point p1) throws NoninvertibleTransformException %7B%0A        AffineTransform inverse = coordTransform.createInverse();%0A        Point2D.Float p2 = new Point2D.Float();%0A        inverse.transform(p1, p2);%0A        return p2;%0A    %7D%0A%0A    @Override%0A    public void mouseClicked(MouseEvent e) %7B%0A    %7D%0A%0A    @Override%0A    public void mousePressed(MouseEvent e) %7B%0A        dragStartScreen = e.getPoint();%0A        dragEndScreen = null;%0A    %7D%0A%0A    @Override%0A    public void mouseReleased(MouseEvent e) %7B%0A    %7D%0A%0A    @Override%0A    public void mouseEntered(MouseEvent e) %7B%0A    %7D%0A%0A    @Override%0A    public void mouseExited(MouseEvent e) %7B%0A    %7D%0A%0A    @Override%0A    public void mouseDragged(MouseEvent e) %7B%0A        moveCamera(e);%0A    %7D%0A%0A    @Override%0A    public void mouseMoved(MouseEvent e) %7B%0A    %7D%0A%7D%0A

Create Base2DFramework.java