Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jordan Peterson
5,134 PointsHow to make a side scrolling android app?
Does anyone know how to do a SideScroller app or know where to find a tutorial? I want to make a game similar to Flappy Bird.
2 Answers
Daniel Hartin
18,106 PointsHi Jordan
I'm currently doing the same process making a similar app for work. The way I've approached it is to draw the character and objects to the canvas separately, applying a constant speed for decreasing the value of X across all objects while keeping the character's X value constant (Only allowing movement up and down the Y axis) this gives the illusion of moving forward, once the object leaves the screen apply a new higher value to the X axis for that object to again make it appear in front of your character.
This helped me keep programming collision detection limited to 7 variables the position of the character and 6 other objects (maximum for me).
It is too technical to explain every aspect within this question but hope you understand my method. The way I learnt drawing to a canvas was to watch a series of youtube videos which can be found here
https://www.youtube.com/watch?v=IUGRQqfHb8k
Hope this helps
Daniel
Dennis Mayo
13,508 PointsYou may be able to find some useful stuff from this article: http://stackoverflow.com/questions/3058868/java-side-scrolling-game-on-android
There is a link to an Open Source side scrolling game called Replica Island. https://code.google.com/p/replicaisland/
Good luck!