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 7805707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:18:09+00:00 2026-06-02T02:18:09+00:00

I have a tile background with 2400×480 pixels.Also one more far layer for parallax

  • 0

I have a tile background with 2400×480 pixels.Also one more far layer for parallax effect.Is that drawing background with a for loop logical?

for(int i=0;i<100;i++) {
    //Drawing code like 0+2400*i ...
}
  • 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-02T02:18:11+00:00Added an answer on June 2, 2026 at 2:18 am

    I hope this gets you started, but I really don’t know…

    I assume in the following that the texture is displayed all at once. Due to the size of the texture — 2400*480 = (3*800)*480 — I think this may not be correct, but anyway.

    For each layer, you have two quads with fixed texture coordinates. Initially, one the first quad is visible; in the course of the animation, the first is moved out of the screen and the second in. The texture border must match, otherwise a crack will be visible.

    +-------------++-------------+
    |             ||             |
    |             ||             |
    +-------------++-------------+
    ^             ^
       visible
    
    ... as time progresses ...
    +-------------++-------------+
    |             ||             |
    |             ||             |
    +-------------++-------------+
          ^             ^
             visible
    

    You can do this for the bottom layer and the next layer. Use different velocities for layers of different distance. You will need blending when there is more than one layer.

    If the first assumption proves to be incorrect, you need to modify texture coordinates during the animation. There is one full-screen quad, and the texture coordinates are setup for one third of the texture. Then, linearly translate all four coordinates in the same direction until the top is hit. At this point you somehow need to begin to show the first third again — using a second quad for example.

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

Sidebar

Related Questions

I have the following CSS: body { margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px; background-image: url(../images/tile.png); background-repeat:
i have a problem. i'm using the background agend to update my live tile.
I have a a div#main that has a background image with a vignetting effect.
I have a repeating horizontal pattern in a background layer in HTML. I could
I have a 512x512 image that I need to tile for a background. I
I have Tile s which represent the tiles in a game's 2-dimensional world. The
I have a MapTile class which holds a tile sprite and the tile's attribute.
I have been following a tutorial on how to write a basic tile map
imagine that I have a Form with 9 controls (TabbedStuffControl) in a 3x3 tile,
I have a data source, containing the following columns: ID | Tile | Score

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.