   breakout
  well I am still working on my breakout game using c++ and direct x. I am trying to get the ball to bounce off a brick. Here is some of my code.d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(0,0,0));//copy the surface to the backbufferRECT recta;//blankrecta.left = x3=x3+20;//370recta.right = x4=x4+20;//390recta.top = y1=y1-20;//310recta.bottom = y2=y2-20;//330d3ddev->StretchRect(surface, NULL, backbuffer, &recta, D3DTEXF_NONE);d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(255,255,255));//copy the surface to the backbufferRECT rectb;//coloredrectb.left = x1=x1+20;//390rectb.right = x2=x2+20;//410rectb.top = y3=y3-20;//290rectb.bottom = y4=y4-20;//310d3ddev->StretchRect(surface, NULL, backbuffer, &rectb, D3DTEXF_NONE);if(rectb.top <= 150) {d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(0,0,0));rect12.left = 400;rect12.right = 600;rect12.top = 100;rect12.bottom = 150;d3ddev->StretchRect(surface, NULL, backbuffer, &rect12, D3DTEXF_NONE);}if (rectb.top <= 150){d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(0,0,0));//copy the surface to the backbufferRECT rectw;//blankrectw.left = x3+=20;//370rectw.right = x4+=20;//390rectw.top = y1+=20;//310rectw.bottom = y2+=20;//330d3ddev->StretchRect(surface, NULL, backbuffer, &rectw, D3DTEXF_NONE);d3ddev->ColorFill(surface, NULL, D3DCOLOR_XRGB(255,255,255));//copy the surface to the backbufferRECT rectx;//coloredrectx.left = x1+=20;//390rectx.right = x2+=20;//410rectx.top = y3+=20;//290rectx.bottom = y4+=20;//310d3ddev->StretchRect(surface, NULL, backbuffer, &rectx, D3DTEXF_NONE);}
  Did you not get the answers you were looking for here?   ;  sorry but I am still stuck.   ;Quote:sorry but I am still stuck.Hm. Well, I've noticed that your posts here on GDNet kind of follow a pattern. We're certainly happy to help, but it's a lot easier to help when there's an actual question to answer :)Anyway, let's just take it one step at a time. I'd be happy to look at your code, but personally I find it very hard to read due to the lack of indentation.I'm going to guess that it's indented in your code editor, and that the indentations disappear when you paste it into the forums. Is that correct? If so, you might try converting the tabs to spaces first; I've found that this tends to work better for posting code to the forums.If you're not sure how to convert tabs to spaces, tell us what text editor you're using and we can help you with that.If you could repost your code with correct indentation, from my perspective at least, it would make it easier to provide useful feedback.   ;  The problem here is that you are honestly treating this forum as though it were a wishing well! I feel as though I can hear a dime going *clink* as I read that last sentence: "here is some of my earningscode".You seem to be too lazy to give any details about what is wrong, or even ask an actual question. That is why you're not getting much help, and I'd be surprised if your rating does anything but decline rapidly.If you wish to continue posting here, then you first need to read How to ask questions the smart way.   ;  It's not about wrong questions, some people are just lazy, arrogant, incompetent. He won't benefit from that topic, he won't give a shit about it.It's very annoying for me, because I'm still unemployed, mainly because these lazy, arrogant, incompetent people flood the labor market.But hopefully, he is simply just too young (12-13).   