This part is not a real part 3 but it is an enhanced implementation of Part II by Dave ( drbixler [at] gmail [dot] com ) who wrote this part as a guest author. Thank you Dave!
While reading the post, you should already look at the code so first download it: Cell Map Enhanced
I’ve been working on my first Android application for a few months now (evening work so it’s taking me a little longer than I had hoped). My game requires a 2D map of cells that can scroll in any direction. Having looked around for examples I stumbled across this series and went to work. I tend to be the type of person that “adopts, changes, and enhances” when I use code I find on the internet. I’m very particular about what my code looks like, how it’s commented, etc. What I ended up with was a reusable 2D map scrolling framework that could smoothly scroll in any direction and also supported “fling” scrolling. I’ve also put in the basics of zooming, though didn’t take the plunge into pinch zoom. Again, I completely redid a lot of the code from the 2nd part of this series but there are still some similarities.
I’m going to only really focus on one or two specific classes because most of the code provided is very short and self-explanatory. I make it a point to comment verbosely so that should help as well.
continue reading…