How to implement a birds eye view of 2D Grid Map using Android
- by IM_Adan
I'm a true beginner with using the android platform and I'm having difficulties on implementing a 2D grid system for a tower defense type game. Where I can place towers on a specific tile and enemies will be able to traverse through tiles etc.
What I would like is a practical explanation of how I could tackle this. A step by step guide for dummies.
This is what I believe are the necessary steps to take, I think I might be wrong but I hope someone could help me out.
Calculate the Width and Height of the view I'm working with.
Based on that, determine the number of tiles required and their dimensions, (Still not sure how I would do this)
Create each tile as a Rectangle object and draw these rectangle on a canvas
I would really be grateful if someone could steer me in the right direction on how to implement a 2D Grid Map using android. I hope the answer to this questions helps the TRUE beginners out there like me.
I have looked at the following links below yet I still feel that I don't trully understand what's going on.
For XNA: 2D Grid based game - how should I draw grid lines?
How to Create a Grid for a 2D Game?
Also a quick note: All my previous game development has been in Java, mostly using Java SE and Swing. I also have good understanding of the game development process, it is only android thats confusing me :S