Jump to content
  • Advertisement
Sign in to follow this  
hoogie

Backgrounf for a 2D platformer in D3D9

This topic is 4993 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have been working on an engine for a 2D platform game lately and currently have sprite entities displayed to the screen using the LPDIRECT3DDEVICE9->Draw function. I was just wandering what the correct method for displaying a background? As backgrounds usually move separately to the other sprites I assumed there was either a different way of loading or displaying the background image, does anyone have any knowledge of these techniques? PS I am currently utilizing Direct3D and not DirectDraw Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
Well I think there is no "correct" method for displaying a background.
Maybe you can use a quad and put the background texture onto it.

What you mean with "as backgrounds usually move separately" ?
Do you mean animated backgrounds ?

Share this post


Link to post
Share on other sites
I think he might mean parallax scrolling. Textured quads are good, but do make sure you turn off the Z-buffer before rendering. Filling the whole screen and depth checking will cripple your fps.

Share this post


Link to post
Share on other sites
what I meen by "as backgrounds usually move seperately" is that all player/enemy/object entities appear to be close by and interactive and move as expected however the backround image behind it all doesnt always move and when it does it usually have a distinctive effect to it.

So generally everyone thinks having a textured quad for the backround and then standard sprite displays for the player and enemies etc?

Thanks

Share this post


Link to post
Share on other sites
use ID3DXSprite it does all the job for you, and also, is it one big image which covers the entire screen or your background is made up of tiles?

Share this post


Link to post
Share on other sites
Well basically I am trying to make a scrolling game like Super Metroid or Turrican, so as the player aproaches the edge of the creen it will move along. So in theory if I display a background the size of the screen I cant just keep displaying the same background over and over again can I?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!