Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java side scrolling game on android

Tags:

java

android

I'm trying to make an easy side scrolling game just to learn the ropes of game programming on android. I came up with a solution of how to make it but I don't really think it is the most elegant solution. I wanted to get some different ideas on how to implement my game, as I really have no other solution right now.

Here is a quick explanation of how it works..

I basically have blocks or objects fall from the top of the screen. The blocks are defined from a pre-defined string I create using a custom 'map-editor'.

I create all the blocks at compile time, position them on or off the screen and simply increment their coordinates with each iteration of the gameloop.

It is actually done a little bit better then that, but that gives a short easy explanation on the basic idea.

I heard from a few people that instead of incrementing each block position, have the blocks stay there and simply change the viewable area. That makes sense, but I have no idea how to do it.

Can anyone share some ideas or links on how I can implement something like this? I know my current solution isn't the greatest.

Thanks!

like image 513
hanesjw Avatar asked Jun 17 '10 04:06

hanesjw


1 Answers

For learning the ropes for game programming on android I would point you at Google I/O 2009 - Writing Real-Time Games for Android I/O session from last year and this one from the 2010 sessions.

People telling you about changing the viewable area are probably assuming you're using OpenGL ES, which you might not be, but probably should consider.

like image 120
jqpubliq Avatar answered Oct 14 '22 18:10

jqpubliq