[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] new tutorials
On Sun, 16 Dec 2001 10:40, Pete Shinners wrote:
> Help! How Do I Move An Image?
> http://www.pygame.org/docs/tut/MoveIt.html
The formatting of some of the interactive stuff is a little off for me
(Konqeuror 2.2.1)... I think it's because you've used leading tabs... if you
just whacked the <pre> in a <blockquote> you'd get the indentation you want.
Or you could CSS the indentation. Don't know if anyone else has a problem
with the indentation. For example, the section Smooth Movement has an example:
>>> screen = create_screen()
>>> player = load_player_image()
>>> background = load_background_image()
>>> screen.blit(background, (0, 0)) #draw the background
>>> position = player.get_rect()
>>> screen.blit(player, position) #draw the player
>>> pygame.display.update() #and show it all
>>> for x in range(100): #animate 100 frames
... screen.blit(background, position, position) #erase
... position = position.move(2, 0) #move player
... screen.blit(player, position) #draw new player
... pygame.display.update() #and show it all
... pygame.time.delay(100) #stop the program for 1/10
Otherwise, it's a _great_ tutorial - I think it'll help the ultra-newbies
_heaps_ :)
Richard
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org