开发者

Side scrolling android game developemnt

I am implementing a side scrolling android game. The player should move in a diagonal direction and the objects around him seem to move back ward.

I have structured my app like the open source project (replica island) by Chris Pruett.

I can render the obstac开发者_开发问答les and the player, but unable to move the obstacles.

Any help in this direction is greatly appreciated.


First of all: I am not familiar with the source code of "Replica Island" (I've played the game, though).

If you want to move/physically manipulate objects in your world, I'd suggest you use a 2D physics engine. A good start would be jBox2D or chipmunk for Java. Both are very similar.

It is quite easy to integrate in a game and fun to use, but the approach of character controlling is quite different to a game without a physics engine. For example, you apply forces to your character to move him around and do not set his speed/position manually.

I'm sure you'll find plenty of examples and tutorials for both physics engines out there.

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜