pygame sharing pyhug

2,785 views

Published on

What I share in pyhug about pygame. it is suitable for beginer

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,785
On SlideShare
0
From Embeds
0
Number of Embeds
1,639
Actions
Shares
0
Downloads
40
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • input gamepad, keyboard, mouse\ncollision. overlap\ndrawing of surface, coordinate system, fonts\ntimer, sounds...\n
  • input gamepad, keyboard, mouse\ncollision. overlap\ndrawing of surface, coordinate system, fonts\ntimer, sounds...\n
  • input gamepad, keyboard, mouse\ncollision. overlap\ndrawing of surface, coordinate system, fonts\ntimer, sounds...\n
  • input gamepad, keyboard, mouse\ncollision. overlap\ndrawing of surface, coordinate system, fonts\ntimer, sounds...\n
  • input gamepad, keyboard, mouse\ncollision. overlap\ndrawing of surface, coordinate system, fonts\ntimer, sounds...\n
  • \n
  • \n
  • all the facilities is in pygame module. \nexplicitly, \n
  • \n
  • \n
  • pygame 的event model, \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • pygame sharing pyhug

    1. 1. Email tim.yellow@gmail.com tim hsu
    2. 2. Game in my mindn 機械工業強的地方,才有 汽車工業n 資 工業強的地方,才有 遊戲工業
    3. 3. Examples n http://goo.gl/2qNU2
    4. 4. Introduction PyGamen Game Engine!!n All we love feature of python
    5. 5. 跨平台!
    6. 6. PyGame 為你做什麼
    7. 7. PyGame 為你做什麼
    8. 8. PyGame 為你做什麼
    9. 9. PyGame 為你做什麼
    10. 10. PyGame 為你做什麼
    11. 11. PyGame 為你做什麼
    12. 12. Main Flow of Game Main Loopinitial prepare input simulate draw end
    13. 13. pygame_base_template na static ball on the screen
    14. 14. Initial Pygamenimport pygamenpygame.init()nclock=pygame.time.Clock()
    15. 15. Prepare Screen, Ballscreen=pygame.display.set_mode([700,500])ball = pygame.image.load("ball.gif")ballrect = ball.get_rect()ballrect.left, ballrect.top = 300,300
    16. 16. Main Loopdone=Falsewhile done==False: input Draw
    17. 17. Input for event in pygame.event.get(): if event.type == pygame.QUIT: done=True
    18. 18. Draw screen 是代表整個畫布screen.fill(black)screen.blit(ball, ballrect) ball 是圖像clock.tick(20) ball rect 是座標
    19. 19. Simulate IF you don’t drawscreen.fill(black) background first....screen.blit(ball, ballrect)clock.tick(20)
    20. 20. Simulatescreen.fill(black)screen.blit(ball, ballrect)clock.tick(20)
    21. 21. A Moving Balln ball_move.pyn ball = pygame.image.load("ball.gif")n ballrect = ball.get_rect()n ballrect = ballrect.move(speed)
    22. 22. pygame_input.py
    23. 23. Dive In!!n Screen, Font, Pictures are all called Surface.n Rect represent a coordination of a surfacen Sprite, ( combination of Picture and Rectn Group !! control a lot of Sprite together!
    24. 24. Distribute Your Gamen Py2Exe !!n
    25. 25. Referencen 特訓99 https://bitbucket.org/timtan/my99n PyGame http://www.pygame.orgn PGU http://www.imitationpickles.org/pgun PyGame for Android http://pygame.renpy.org/ android-packaging.html

    ×