Collision detection in 2D game

Hello,

I have created an image (world.png) of a 2D world in which the player will walk through.

There are houses in this world that I want the player to not be able to walk through.

In order to implement this should I simply define the x and y cordinates of each house and then not let the player cross these - if statements basicly. Seems a bit tedious to code maybe.

Or are there any other ways of doing this please?

Cheers anyone

[469 byte] By [John4938a] at [2007-11-27 8:01:14]
# 1
check out using a TiledLayer for your background and a Sprite for your player and look at the Sprite.collidesWith() method.
rhu6ar6a at 2007-7-12 19:43:18 > top of Java-index,Java Mobility Forums,Java ME Technologies...