I was talking to some guy. He said that my movement concept in game is bad. When left or right arrow is pressed I’m scrolling background what makes you feel that player is moving (player’s X remains same).
So… he told me something about matrix view. I should create all walls and platforms static and scroll only the camera and move player’s rectangle.
I did a little research in Google, but nothing found.
Can you tell me anything about it? How to start? Maybe links, books and resources?
My programming language is Java (2d).
Thank you!
i think you are trying to make a game where camera object moves along with player object.
Assign real world (x,y) co ordinates
according to game scenario
now use some simple 2d view-port to window transformations as follow
now if player at (100,200) and camera at (50,50), player will be displayed at (100-50,200,50) that is (50,150).
For background image begining at (0,0) it will draw from (-50,-50) . So some part will be out of screen
more on Viewport to window transformation