public void render(Graphics g) {
        if (image != null) {
            int xPos = backgroundManager.mapToPanelX((int) mapX);
            int yPos = backgroundManager.mapToPanelY((int) mapY);
            if(initialYPos == -99999999) {
                initialYPos = yPos;
            }
            if(registry.getGameController().getKey(84)) {
//                int pWidth = registry.getGameController().getPWidth();
//                int pHeight = registry.getGameController().getPHeight();
//                if(currentCamX > pWidth || currentCamY - initialCamY > pHeight || currentCamY - initialCamY < -pHeight) {
//                    xPos = (int)((pWidth - initialCamX) * moveSpeed + initialMapX + velocityOffset);
//                    yPos = initialYPos;
//                }
                mapX = initialMapX + velocityOffset;
                mapY = initialMapY;
            }

            //flip the yPos since drawing happens top down versus bottom up
            yPos = backgroundManager.getPHeight() - yPos;

            //subtract the height since points are bottom left and drawing starts from top left
            yPos -= height;

            g.drawImage(image, xPos, yPos, null);
        }
    }