[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] I have had a bg but...



 

 Pete Shinners <shredwheat@attbi.com> wrote:

black wrote:
> kitten=pygame.image.load("cat01.jpg")
> doggie=pygame.image.load("dog01.jpg")
> how to display them then ?

heya black. there is a tutorial online that sounds like it might be right
up your alley. it is called

Help! How Do I Make An Image Move?
http://pygame.org/docs/tut/MoveIt.html

it is written for people new to doing any programming with graphics. i
think it will give you a good start. there is a related pygame example
named "MoveIt" that comes with pygame.

You can find several other tutorials you can find from the starting
documentation page. look for futility's "newbie guide" among others ;]
http://pygame.org/docs/index.html


thanx Pete, in fact I programmed with ActionScript provided by Flash for over 1 year, what confused me exactly the different format of Pygame. in old days when I want to move my images I just draw or import it then programmed with it by its instance name. So pygame's ways puzzled me alot, I think I need the idea how to display and move the surface already loaded images, because the turorial told me by pygam.display.set_mode() I could only have one image displays. then how to display other surface loaded images besides background one ? for example I have 2 surfaces loaded, then how to display them ?(bg pic is already there)  this is my code below :

bgpic=pygame.image.load("background.jpg") 

bg=pygame.display.set_mode(bgpic.get_size())

bg.blit(bgpic, (0, 0))

kitten=pygame.image.load("cat01.jpg")

doggie=pygame.image.load("dog01.jpg")

 

hope anyone could support a clue, thanx~



Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com