Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:53:08+00:00 2026-06-10T10:53:08+00:00

I was talking to some guy. He said that my movement concept in game

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:53:09+00:00Added an answer on June 10, 2026 at 10:53 am

    i think you are trying to make a game where camera object moves along with player object.
    Assign real world (x,y) co ordinates

    1. camera position (camx,camy)
    2. plater position (px,py)
    3. left top corner of background image (bgx,bgy)

    according to game scenario

    now use some simple 2d view-port to window transformations as follow

    1. draw player object at (px-camx,py-camy)
    2. draw background object at (bgx-camx,bgy-camy)
    3. change both (camx,camy) , (px,py) when keypress

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am talking about some sort of function that can combine an array of
I have a Silverlight client that has some problems talking to the server it
I noticed that some article talking about crushed PNG images and how to uncrush
First off, I will be talking about some legacy code and we are trying
I'm talking about ivy 2, not some newer version.
What are some situations where languages should be mixed? I'm not talking about using
I've got a struts2 action that responds to an AJAX request by taking some
So I had a thread that was taking care of some network stuff for
Let me just say right off the bat that i'm not a programmer. I'm
Some friends of mine and I were talking recently about version control, and how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.