How to implement a birds eye view of 2D Grid Map using Android
Posted
by
IM_Adan
on Game Development
See other posts from Game Development
or by IM_Adan
Published on 2012-11-14T02:05:52Z
Indexed on
2012/11/14
11:20 UTC
Read the original article
Hit count: 394
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
© Game Development or respective owner