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 have spent two weeks on this task and its to no avail,i hope your expertise can help me.

I want to create a simple set of activities that allow the shortest path to be calculated between two points on a tile based map.The ANDROID game /project should allow:

User to select there starting position i.e tile (x,y) and their ending position i.e tile(x,y)

The path should then be drawn and I want the path drawn to have clickable tiles(which i will assign) so that i can display a popup to the user i.e (you just walked over a golden coin)-i require no score or any of that functionality.

I want the ability to navigate between floors somehow.

I want blockages to be in place(which i set) and which the algorithm understands and recalculates

Lastly i want the user to have the choice of selecting the shortest path or not.

Can anyone help me on this with tutorials or even provide me with a short example.Its relatively simple I just don't have the skills you guys do to put it in action.I have found JAVA based examples but I don't know how to convert these to android.

Thanks in advance

share|improve this question
1  
Frist try to get Astar working by understanding it. Try to make it as generic in the sense that you can pass any uniform grid in there( 2d array ). Once you have that try to work up adding rules/aspects which dictates where your character can and cannot walk. Do it in steps rather than all in one go. one at the time. –  Sidar Apr 22 '13 at 12:52
    
@sidar excellent advice thank you ...I have the basic understanding for JAVA but im just unsure how to convert it to Android especially with intents etc. –  Mark Gaber Apr 22 '13 at 12:53
    
Android development is pretty much done in Java. I suggest you take a look at libgdx: libgdx.badlogicgames.com It's free and comes with tons of bells and whistles. It abstracts a lot of concepts on top of the Android API for you so that you can concentrate on your game rather than make most of it from scratch. It can get a bit complex, but in the long run it's completely worth it. On top of that you can export to HTML5 and desktop( Linux, mac and windows ) –  Sidar Apr 22 '13 at 18:04
add comment

closed as not constructive by Byte56, bummzack, Josh Petrie, Anko, msell Apr 26 '13 at 11:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

If you're having trouble with A*, I suggest the following. It talks about the very basics and is applicable for any language/platform: A* for beginners.

For how to handle click events in Android, please review this: Input Events

There are many ways to render graphics. Here are two links which talk about it indepth. Canvas and Drawables. Animation and Graphics.

share|improve this answer
1  
You should learn how to use comments! ;) –  Savlon Apr 22 '13 at 12:40
    
@jay soyer ok i am having problems rendering the graphics on screen .I have made a plan which will sit on top of a tile but i just cannot get my head around the a star algorithm more so how to manipulate it so when it shows shortest path i can click on scren –  Mark Gaber Apr 22 '13 at 12:51
    
@Savlon I overhauled answer to be less comment like. Please remove downvote. –  Jay Soyer Apr 22 '13 at 15:12
2  
@MarkGaber I gave a general answer to your general question. If you specifically are having issues with your attempt (IE handling clicks), then post code and say I'm trying this XYZ but ABC is happening instead. If you are simply having issues forming your logic, then review the above. If you are still having trouble, you need to backup and try learning Android basics before delving directly into game making. –  Jay Soyer Apr 22 '13 at 15:14
    
@jaysoyer it wasn't me who down voted you lol... –  Savlon Apr 22 '13 at 19:44
add comment

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