This week had our weekly class meeting and we all decided it was time to get a working version of the iPad application we have all been working on. Even if it was the basic framework, it was just something that we could deploy and for Tim and others at the Worcester Art Museum to view.
That was one of our goals this week was to get the puzzle demo up on GitHub for the development branch. A working demo is now deployed on the development branch as of this morning. We where having difficulty this week trying to get the puzzle activity application to work. We before had a demo that would allow the user to move puzzle pieces as the shape of squares around, but Tim was looking for the actual jigsaw piece type. So we had to go back to the drawing board and figure out how this could be done. I found online there was a tool called kinetic.js which allowed you to move pieces around by creating kinetic.shapes, objects, etc. I thought it was a very cool tool. If any of you want to look at it for future projects down the road or just for fun to learn here is the link:
http://www.html5canvastutorials.com/kineticjs/html5-canvas-drag-and-drop-tutorial/
We then found someone had an open source code that allowed the user to give it a image and it would separate them into many puzzle pieces that you could move. Unforutnatly we tried giving this a shot and every time the image would come out black. We asked another student in the class and they looked at it over night and still had no luck to get that to work. So this was then when we said we cannot use Kinetic.js any longer. Jason who looked at our puzzle activity code, pointed us to another open source code from Google that had everything we where exactly looking for. The link that he had sent out to us, I actually came across along my way at the beginning of researching how to create puzzles with HTML, JavaScript, and CSS. This one was using all of theses languages along with the jQuery UI tool. I think that was the key feature that we where missing. I had a feeling we where going to need to use jQuery at some point for this.
So after looking at the link for the open source code again, we had a working puzzle activity that can now be viewed by everyone on the CS401 Repository Development branch. Here is an screenshot of the layout:
It allows the user to move pieces all around on the screen, has a timer which I wanted to implement into the original first Demo we showed and tells you the number of movements. Along with bringing a nice frame around the puzzle. It has the snap feature so when the piece is in the correct location the frame lights up green and then snaps the piece there and you can move on to the next one.
That is all for this week. Looking forward to seeing this first deployment with everyone’s work together.
From the blog rwilliams5262 » cs-wsu by rwilliams5262 and used with permission of the author. All other rights reserved by the author.