This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes game movemtn Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "game movemtn" Watch "game movemtn" New topic

game movemtn

sudde gameeef

Joined: Mar 21, 2013
Posts: 19
i had a question but i am not sure what the problem is.
if user keep right key down. than camera should move left.and my player should fall down bc there are two empty(sky,'0') under player.

move camera.

now to move level iam doing doing this in paint method in level class.

above code will move the bottom floor when user moves left and right.

than i am setting a collision box around every where i see '1'(ground)

not to check for collision i am doing:

if i print the this.rect.get(i) in if statment: i get

now if i move to right block: output is

should that be?

also my player jump method:

I agree. Here's the link:
subject: game movemtn
It's not a secret anymore!