Pages

Subscribe:

Labels

Sunday, August 19, 2012

FYP meeting 10: 15/8/2012


Location: SIM

Members attended: Octa, Wilson, Jennisa, Sebastian

- Finalize the game and editor features, focusing on documents updates
- Decided not to put the game options as well as time scoring features
- Editor and game to be in debugging phase
- Work on publicity materials like poster and trailer
- Updating of website to show current game version

Wednesday, August 15, 2012

Development : Zoom (3)

Leader has fixed the slow zoom!!!! XD
Finally, I know that the real problem lies in the setting of rendering hints when drawing the pieces.
Seb has changed :
gg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 
            RenderingHints.VALUE_INTERPOLATION_BICUBIC);
to
gg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 
            RenderingHints.VALUE_INTERPOLATION_BILINEAR); 
gg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_OFF); 
gg.setRenderingHint(RenderingHints.KEY_RENDERING, 
            RenderingHints.VALUE_RENDER_SPEED); 
gg.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, 
            RenderingHints.VALUE_COLOR_RENDER_SPEED);
gg.setRenderingHint(RenderingHints.KEY_DITHERING, 
            RenderingHints.VALUE_DITHER_DISABLE);

and it works.... well~
XD

And as an alternative of the scroll bar problem, Seb has added the function to move all the pieces, so, even the size of the scroll pane does not grow, the pieces will still be shifted to position that can be seen.

private void dragAll (MouseEvent e)
    {
        Iterator iter = zOrder.iterator();
        Iterator xIter = offsetX.iterator();
        Iterator yIter = offsetY.iterator();
        while (iter.hasNext())
        {
            Piece piece = (Piece) iter.next();
            Integer ox = (Integer) xIter.next();
            Integer oy = (Integer) yIter.next();
           
            int prevX = piece.getPuzzleX();
            int prevY = piece.getPuzzleY();
            int prevW = piece.getCurrentWidth();
            int prevH = piece.getCurrentHeight();
           
            piece.moveTo (e.getX()- ox.intValue(), e.getY()- oy.intValue());
            repaint(0, prevX, prevY, prevW, prevH);
            repaint(0, piece.getPuzzleX(), piece.getPuzzleY(),
                    piece.getCurrentWidth(), piece.getCurrentHeight());
        }
    }

The ghost image will be scaled according to the zoom as well.


Thursday, August 9, 2012

Development : Puzzled Editor Applet


The screenshot above shown that the Puzzled Editor can be run on Applet Viewer (built in Eclipse).
Some changes already been made in order to create the applet.

Images above shown that the images resource can be access within the class itself without creating another "game resource" folder.



Trial running applet on Web Browser (*buttons are not fixed yet*)


Problem arises:
However, since the editor need to generate a new jar called "game.jar", applet must be able to access bin folder and create changes on "setup.txt" which cannot be done in this state because we can't change a file in a JAR without recanning the JAR.

Thus our plan to converting the apps into applet may not be feasible.

Thursday, August 2, 2012

FYP meeting 9: 2/8/2012


Location: SIM

Members attended: Octa, Wilson, Sebastian, Santy, Jennisa

-        Everyone discussed of their current progress on the respective task
-        Understood that the applet version of the editor might be difficult. Having issues with detecting mouse input as well as handling of game class files
-        Game to be fixed as soon as possible. We have to limit the amount of new tasks we need to add to the editor.
-        Outstanding task
·        Editor need to add background image placement, piece count, cutter style. (compiled version)
·        Editor password for each level, as well as story, level description (add-on after compiled version)
·        Help text for editor and game
·        Game need to add “double temp (hi and low version of jigsaw)” with zoom
·        Docs need to show test case and version control

Tuesday, July 31, 2012

Development : Image Shifting, Delete Location



 ------------------------------------------------------------------------------------------------------------ 
Changes :
1. 2 frames added, menushiftsettingframe and locselectshiftsettingframe. This is where the user can shift the background images. (Picture 1 and Picture 2)
2. DraggableComponent.java and DraggableImageComponent.java added. These are needed to enable the image to be moved using mouse-click.
3. The images being used for main menu and location setting background are saved into JPEG file,
because mbg_str and lbg_str cannot be used.

Progress & its' problems :
1. Instead of saving the image location, the background image is cropped based on the panel size, currently 600 x 340 for both frame.
Clipping algorithm has not been applied, therefore, the codes can only clip the image on the same location.
Clipping algorithm will be applied later on.

2. If the user want to change the image for main menu background and location background after he loaded one, the menushiftsettingframe and locselectshiftsettingframe will not show the new selected image.
It will show the first image being chosen instead, but the shown image will take the new selected image size.
This part can work properly when a JOptionPane is being used. Still trying to find out on how to solve this matter.

3. 'Delete Location' button is added to Location Setting.
Works properly, but after the user delete the location for the second time (and more), the deleted location
is not removed from the screen and it cannot be selected. (Picture 3)

4. 'Location Shifting' have not done, still doing research.
------------------------------------------------------------------------------------------------------------


Picture 1

Picture 2


Picture 3

Monday, July 30, 2012

Development : Zoom (2)

Zooming is added in. The repositioning, joining of pieces, and rotating multipiece when scaling have been corrected. 
Zoom Out

However, it is not working well with high resolution image or big number of pieces. It...is...too...slow... ~>.<~
This may be caused by the excessive call of repaint function, since it is called every time a piece is moved. Recalculation for every scaling done may be another cause.

Another problem is the scroll bar does not change according to the puzzle size. I have tried setting the maximum and minimum size of the scroll bar, setting model of the scroll bar, set viewport of the scrollpane, override the setpreferredsize of the the scrollpane, but none seems to work.
The scroll bar just shrink once and goes back to the original size. Some articles and forum discussions categorize this as a bug. Some concluded with the solution to this matter, for example : https://forums.oracle.com/forums/thread.jspa?threadID=1361016 or http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4297009. However, it did not work in this application. Is this really a bug? Or is it a bug that I created?
Is it the time to give up on the zoom? I...do...not...know............

HWAITING MM12/2C!

Development : Click Sound + Fixed Mosaic Option Integrated with Ghost Image


Snapping and clicking sound are added! It has been integrated with the fixed mosaic option and the ghost image option.

Fixed Photomosaic Option
The fixed mosaic option is done so that in the final image, the tile size will be big enough to see the individual tile image clearly. Still finding the best combination of tile size and minimum percentage needed to get a good quality of the photomosaic.



Currently, the sound is available only when pieces are joining, when main menu button is clicked, and when in game panel button is clicked.
These functions have been integrated with sebastian's ghost image function and the instruction on the bottom side.
Ghost Image and Instruction