Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

breakout using directx

This topic is 3939 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

I am programming a breakout game. This is the code to move a paddle from left to right. I am trying to move a paddle from the left side of the screen to the right side of the screen. j++; //fill the surface with color d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(0,0,0)); //copy the surface to the backbuffer rect.left = j+180; rect.right = j+260; rect.top = 580; rect.bottom = 600; d3ddev->StretchRect(surface, NULL, backbuffer, &rect, D3DTEXF_NONE); i++; //fill the surface with color d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(255,0,0)); //copy the surface to the backbuffer rect.left = i+260; rect.right = i+340; rect.top = 580; rect.bottom = 600; d3ddev->StretchRect(surface, NULL, backbuffer, &rect, D3DTEXF_NONE);

Share this post


Link to post
Share on other sites
Advertisement
What exactly is the problem you're running into? Also I should probably suggest that you look into using the ID3DXSprite interface for doing 2D work. It will probably be easier for you and should perform better.

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!