My "Senior Slide" Block Puzzle
4/30/2019The solver works correctly in that it has the correct paths for every puzzle to be solved, but it doesn't always animate correctly. I think this has to do with the underlying GridView setup and how the x and y values are laid out. For example, Button 0 in the GridView has odd x and y values that put blocks into the upper left hand of the screen if not dealt with. Perhaps this issue with how the GridView and inner buttons are laid out effect my animation process.
4/23/2019I'm trying to finalize my solver. I got it to pause correctly, but it doesn't work on every puzzle. I'm thinking that even though the data is correctly updated, the views are having issues animating. Hopefully I can solve this before I present on Thursday.
4/18/2019I made some great breakthroughs on the animations for the puzzle. I was able to get the correct puzzle pieces to start moving on the board but now I need to pause in between each animation, which is proving a little more difficult than expected. I'm going to try and research methods on getting my application to take a brief "rest" before it continues solving the puzzle.
4/16/2019My BFS of the puzzles is now extremely fast, typically only a few seconds per puzzle. I am at the point where I need to record the order in which I solved the puzzle and then animate the puzzle based on this order. I am struggling to properly record it right now, but if I can get that down I should be able to animate it.
4/9/2019I made some good progress on my BFS. I am able to solve puzzles successfully, but it takes a large chunk of time to do so (20 seconds to 1 minute). Now I need to work on making it faster by moving multiple spaces at a time and recording the number of steps I took to get there. After I do this, its time to work on actually making the blocks animate to reflect this.
4/4/2019I fixed my problems with indexes and dynamically placing blocks onto the grid and now have a total of 10 puzzles that the user can play through. I still have the database parts of the project to do but I am shifting my focus towards the solver. My current plan is to use a BFS to find the shortest, most optimal path for solving the puzzle. I'm going to implement a queue to solve the problem. I'm struggling a little bit with the concept but I'm hoping after a little research and time spent on it I'll have a breakthrough.
3/27/2019I was able to read my puzzle text files and start dynamically placing the blocks onto the grid. I'm having some troubles with my indexes being out of bounds and blocks being placed in the wrong spots, so I have some kinks to work out. After I finish up creating dynamic puzzles, I can add more and set up storing/viewing puzzle and user information in my database. If I get that done in time I can focus on the solver portion of the project.
3/22/2019Spring break! I made a lot of good progress. I was successful in making the Grid size dynamic as well as making the block positions dynamic. I added the timer for the user as well as the number of steps they have taken so far on the puzzle, a more obvious exit point, and an animation for finishing the puzzle. I have a dialogue box to either continue onto the next puzzle or exit back out to the puzzle select. I was also able to make a login page and a puzzle select page. Now I'm working on reading in a text file, and based on the grid coordinates, place proper blocks throughout the grid. I also need to make sure I can have a ton of blocks on the grid because right now I'm only working with two.
3/12/2019I started working largely on the logic behind the grid. I was able to get the horizontal blocks to update correctly on the grid but I am having some issues with the vertical snapping and logic updating. I created a BlockButton class that extends the ImageButton class and I added coordinates and a type to the BlockButton class. That way I always know the grid location of the BlockButton and what kind of BlockButton it is. I'm hoping to finish the logic and get more pieces on over spring break.
3/7/2019I made some decent progress this week. I was able to get collision detection mostly complete for my sliding blocks. The only problem is that if I slide a block too far and too fast, then it isn't detected and the blocks get stuck. Also I will need to update the logic behind functions when I get a chance.
2/28/2019I made a lot of progress. I created a Board class for the logic behind the game with functions to update the positions of the blocks on the 5x5 grid, a valid move checker, and a game over checker. In addition to this, I was able to make it so the blocks are bound to the grid and aren't able to move off of it. I was able to do this by snapping them back into place if they move off and stopping the animation as soon as it exits the "legal" bounds of the grid. I was also able to make the blocks "snap" into place so it is clear which spots need to be updated by me. Now that I have the snapping part down, I need to figure out how I can know what direction I just came from, maybe through velocity, not sure on this yet.
2/21/2019I had a healthy setback after mini-grease board sessions where we talked about our projects with peers and Dr. Pankratz and Dr. McVey. I realized that my animation performing smoothly is a huge part of my project because if it looks bad, people will brush it off as outdated and poorly designed. I got the animations of the blocks looking very smooth and the art looks a lot better. Horizontal blocks only move left and right and vertical blocks only move up and down. Now I need to handle collision by creating a grid class of a 2D array and simply marking the places in which are covered (0 for blank, 1 for any block, and 2 for the trapped block). I will check these coordinates in the gesture detection portion of my code and move accordingly. I also want to make the blocks "snap" to a set location after the user lifts their finger from dragging the block.
2/12/2019I worked on building my Shape class so I know which piece I'm moving on the grid. I set up the class with three variables. Two ints for position on the grid as well as a string to keep track of what kind of shape it is. I was going to create subclasses for each type, but it's not worth it when I can be just as effective by assigning a type to each instead. I'm going to try and create the shapes when the grid is created and assign the types based on the draw resource I use.
2/7/2019I had a bunch of great breakthroughs on my project. I found a guide on YouTube by Dave Parker for 2D puzzle building. I was able to adapt a lot of what he taught me about GridViews, custom GridView adapters, and a custom gesture detector, and apply it to my game. So far I have smooth moving tiles that easily detect swiping gestures. I need to start creating a Shape class with Square and Rectangle subclasses so I can properly identify correct or incorrect moves. For example, right now every piece moves in any direction but really they should only be able to move in blank spaces indicated by white space (see below). In addition to this, the red rectangle moves as two separate squares but really should move as one unit as this is the piece you are trying to correctly free from the puzzle.
2/5/2019I began developing my app today. I messed around with my old CS350 Connect Four application to get an idea of how I could correctly create and move the shapes around that I needed. I realized I can just create a drawable similar to the Connect Four app but just make it rectangle shape instead of circle. Now I have to try and create a layout for the main activity and then come up with logic for the game. I ended up going with a GridView (5x5) of buttons and this is what I created so far! Hopefully I can add the rectangle piece soon and start working on sliding the buttons around
1/26/2019I began today by updating Android Studio to its most recent version as well as the SDK and mobile emulator. I also researched the minimum API required for a new app to be put onto the Google Play store and found that it is API level 26 (as of August 1st 2018). In addition to this, I looked at some sliding block puzzle games and apps to get different ideas on what I might want to do. There are a large amount of differences between the apps so I have a lot of choice with what I want to pursue in terms of game design.
|