very simple 2d side scrolling collision data

hey everyone, I have a pretty simple question. I am making a very very simple game for my (highschool) programming class for my final project and I need some help with the collision data.

I know for a fact that I barely know enough to even begin a simple game, but I have to learn sometime. The game that I want is just a simple 2D side scroller where you control a character and he can shoot a gun or something of that sort at an enemy or two(haven't decided completely yet). What I have so far is a frame that has a background image on it of a simple level map. For now, I am using a ninja gaiden sprite from the NES just to test my manipulation of the sprite. I got it to move in the proper x,y coordinates using the arrow keys on the keyboard, but I need to know collision data. I want my sprite to stay on the 2D plain. I also need it so that if the character hits another enemy then it will detect some sort of collision. Character collision data and map collision data seems to be all that I need.

So far everything is very basic but I need to know this so that I can actually make my character shoot something and actually destroy it. Does anybody know any sort of method or anything that could help me with this? I just need a simple explanation or something because I don't even know where to start on this.

thank you for your time.

[1369 byte] By [Wolfsenshia] at [2007-10-1 11:54:33]
# 1

Try using a tile system. Where you have images for a bunch of things like bricks, sky, and whatever. When they are tiled they look like a full level. Use a multi dimensional array to store the locations of each tile, then make sure each tile that is a brick is checked for collision against your player by seeing if the players box hits the brick box using the Rectangles method called intersects(rectangle 1, rectangle 2).

Atleast thats how I would try to do it.

EvolvedAnta at 2007-7-10 13:41:23 > top of Java-index,Other Topics,Java Game Development...
# 2
Actualy I think that method is part of the Rectangle2d class.
EvolvedAnta at 2007-7-10 13:41:23 > top of Java-index,Other Topics,Java Game Development...
# 3
Interesting, I might try that. The only problem is I have another 3 weeks to do it and I need to have something decent to show, so I don't know if I will have the time to go thru and make all these tiles. I will see, it sounds like a decent approach.
Wolfsenshia at 2007-7-10 13:41:23 > top of Java-index,Other Topics,Java Game Development...