Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to draw a hexagon grid in my Android application. I don't want to reinvent the wheel here so I'm looking for some frameworks/libraries or just some basic ideas about how should one do this. Do you have some ideas?

What I found so far:

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The math applies to any platform, of course. Since you asked for basic ideas on how to do this: just use the code from the first link you provided. The java code for implementing all the required formulas is present and could be used as-is. Then you have an excellent example of how to tie that class into your existing code. Use the source from the simple java test applet as a guide to help you integrate this into your code.

share|improve this answer
    
I'm thinking of using libgdx for this. What do you think about that? –  Adam Arold May 23 '12 at 8:48
    
It seems to be a popular one. I've not done any Android development myself, so I can't say with certainty. Give it a try, since you have to start somewhere, might as well be with something that's popular and therefore likely has lots of tutorials/help available. –  Byte56 May 23 '12 at 13:44
    
I've been researching what options I have and decided to go with the Canvas-based approach without OpenGL since I don't really need it. –  Adam Arold May 23 '12 at 15:36
    
Nice, I hope that works out. It'll probably save you plenty of hassle. Good luck! –  Byte56 May 23 '12 at 15:43
    
Yeah, I think so. I will write down my experiences here. –  Adam Arold May 29 '12 at 9:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.