DirectX - Displaying sprite as moving background image

Posted on 2005-04-22
Last Modified: 2007-12-19
Hi all,

I'm making a 3d-Submarine game in C++/DirectX9c and im having trouble with the background imagery. All I have is a colour.

I would like to load in an image ie. 'back.jpg' that moves to represent the floor moving as the submarine travels through the water.

does anybody have any insight? i think im looking for something to do with LPD3DXSPRITE, that as far as it goes. Please make answers quite basic as I have exp. in C++, but not as much in D3D


Question by:s34n
    1 Comment
    LVL 4

    Accepted Solution

    Well, one method that comes to mind is to make a bunch of rectangles(one more than the screen can fit), testure each of them and line them up.

    move all of them to the left or right. then when one of the rectangles is offscreen, move it's position to the opisite side and have scroll it to the left or right as need be.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    A short article about problems I had with the new location API and permissions in Marshmallow
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now