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 looking at creating a tower-defence-style game on Android, developed in Java. I'm spending a lot of time trying to just get a background image (drawn onto a canvas) that pans/zooms within the bounds of the screen etc. that I will eventually draw my game onto.

It seems to be a lot of work just to get theses basics working correctly. Is there a simple barebones project that has this stuff taken care of that I can build my game on top of?

share|improve this question
1  
Look at canvas.drawBitmap(), canvas.scale(), and canvas.translate(). Use these methods in your view's onDraw(). –  Amplify91 Aug 16 '11 at 13:46
    
@Amplify I get that, I've got offset and scale variable which are updated by the relevant touch actions, but it's just quite a lot of faff to get to the point where I can actually start making my game. I'm just surprised no one's made a barebones starter kit. –  fredley Aug 16 '11 at 14:20
    
+1 because I'd like a "barebones starter kit" too (I haven't been able to find one either). In fact, I'd really like one that also doesn't depend on any particular editor and has the very minimum number of files (I've seen editors that start out by creating a handful of sub-directories with files scattered all over the place, which essentially looks like a big mess that could be confusingly difficult to manage, but I suspect this is mostly a function of the editor rather than a requirement of Android). –  Randolf Richardson Aug 16 '11 at 15:03
1  
Well there are lots of "barebones starter" tutorials online. Just do a quick Google search. I feel like if you aren't familiar enough with Android to get started, you aren't going to be able to continue on to more advanced functionality after borrowing "starter" code from somewhere else. Practice is learning. I would suggest asking a more specific question (ie, How to draw a background image?) and going from there. That's the way I learned! –  Amplify91 Aug 16 '11 at 20:23
    
If you asked another question detailing exactly what you're trying to do, I would be glad to try to help you out with that. I can't really suggest the kind of project you are looking for, though. –  Amplify91 Aug 16 '11 at 20:26

1 Answer 1

up vote 1 down vote accepted

What you may be looking for is an engine. In that case, refer to this question: http://stackoverflow.com/questions/5206089/game-engine-for-android. I would recommend AndEngine or LibGDX. However, the best way to learn, in my opinion, is to power through the beginning things, learning along the way. Ask questions here and on StackOverflow and you'll be able to make your own "barebones" project in no time!

share|improve this answer
    
I've got this, but I'm having a hell of a time trying to get the example project to compile, Eclipse seems to have got into a complete tizz over it. I may post another question if I don't make any further progress... –  fredley Aug 16 '11 at 20:47

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.