Sign in to follow this  
gatorkea

moving shapes and knowing pixel location?

Recommended Posts

Hello im new to gamedev.net , i have been trying to learn how to program , using python, im following the Bucky tutorials on youtube. http://www.youtube.com/watch?v=M1BAlDufqao&feature=SeriesPlayList&p=EA1FEF17E1E5C0DA He didnt go very far with the pygame tutorials, and what im trying to figure out is how to get a shape that u draw on the screen using the rect or draw methods. and be able to use it as an object to move it around on the screen. I understand how to call a png file to use in this way, but not using a shape that i have drawn. Second question, is there a way to know exactly where im placing shapes/lines when i make them? im basically plugging in random numbers for my parameters to draw my shapes. this is the code for which im working with at the moment. import pygame, sys from pygame.locals import * pygame.init() screen=pygame.display.set_mode((640,360),0,32) color=(230,170,0) position=(300,176) radius=(60) while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() screen.lock() pygame.draw.circle(screen,color, position,radius) screen.unlock() pygame.display.update()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this