Game maker pacman sprites1/13/2024 ![]() When we start using images to draw Pacman and the ghosts, we need to remember this so we can make adjustments. That's why Pacman and the ghosts appear off-center in the image above, whereas before they were positioned correctly. For now we just need to remember that images aren't positioned on the screen using the center of the image, but rather the top left corner of the image. It doesn't matter if you have an image of a circle, the computer will just see it as a rectangle. This is because all images are rectangles. For all of the images we're going to use, the position of the image is measured from the top left corner of the image as shown in the red square where it's position is (x2, y2). ![]() The position of a circle is measured from the center of the circle as shown in the blue circle where it's position is (x1, y1). We were using pygame's circle to draw most of our graphics before. The first thing we need to understand when we're drawing images to the screen is how they are positioned. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |