Monday, May 3, 2010

Day 7

ok so I fixed the invalid syntaxs, at least for now. Now, I have set the image but then I realized that the beams I am making are not being in full length of the screen. They were just drawing toward the character. It looked quite odd, so I fixed this by making the y of the end-point of the beam 0 and the x of the end-point of the beam a certain ratio that I figured out when I was making my images. When I started the game, only some beams were being drawn from the cannons x and y to the special coordinates of the end-points x and y. Some of the beams would not go full screen, and others would just start at a different y than told to. This is a problem that is strange. I think that parts of these lines are not being blitted due to to some program confusion. I feel pretty confident about this program I wrote for the beams.

Im thinking I can just draw a line from to the topleft or topright corner of the image. WOW, I think this might work, I just figured this out by writing this to you!

Ok so I just tried that and it did not work. I am not sure if it was suppose to or not?

1 comment:

  1. It's an interesting idea, Ankush.

    Perhaps you could have your updateScreen function blit all the shapes on the screen (except for the beams). Then, after that, you could go through the list of beams and draw the beams using pygame.draw.line - the beams would still be objects, but instead of having an image and a rect, they would just have a topPoint and a bottomPoint.
    ----
    "Are you pondering what I'm pondering, Pinky?"
    "I think so, Brain, but why would anybody want a depressed tongue?"

    ReplyDelete