ThePythonGameBook

learn Python. Create Games

User Tools

Site Tools


en:part2:pygame:step008

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:part2:pygame:step008 [2011/06/18 09:57]
Horst JENS [step 008 - animation]
en:part2:pygame:step008 [2011/11/04 06:43]
imapiekindaguy
Line 5: Line 5:
  
 {{ :​en:​part2:​spritesheet008.jpg?​300|}} {{ :​en:​part2:​spritesheet008.jpg?​300|}}
-Instead of painting all the single pictures of an animation cycle myself I prefer to use ready-made sprite sheets.+Instead of painting all the single pictures of an animation cycle myselfI prefer to use ready-made sprite sheets.
  
-In the data folder, you will find a spritesheet((a graphic file with lots of sprites)) from Ari Feldmann Spritelib ( http://​www.flyingyogi.com ) showing several pictures of an animal. If you use Ari's sprite'​s,​ make sure to include his [[:​en:​resources:​glossary:​s:​spritelib_license|license information]] in your program.+In the data folder, you will find a spritesheet((a graphic file with lots of sprites)) from Ari Feldmann'​s ​Spritelib ( http://​www.flyingyogi.com ) showing several pictures of an animal. If you use Ari's sprite'​s,​ make sure to include his [[:​en:​resources:​glossary:​s:​spritelib_license|license information]] in your program.
  
 With the help of pygame'​s subsurface command, I will show you how to extract single images from the sprite sheet and use them. With the help of pygame'​s subsurface command, I will show you how to extract single images from the sprite sheet and use them.
  
  
-==== code discussion ​====+==== Code Discussion ​====
  
  
Line 20: Line 20:
  
  
-===== source code on github ​=====+===== Source Code on Github ​=====
  
 To run this example you need: To run this example you need:
Line 37: Line 37:
  
  
-====== ​comment ​this page ======+====== ​Comment ​this Page ======
 ~~DISQUS~~ ~~DISQUS~~
  
 ^ [[:​en:​part2:​pygame:​step007| ← previous]] ^ [[en:​part2:​pygame:​start| ↑ Overview]] ^ [[:​en:​part2:​pygame:​step009| → next ]] ^ ^ [[:​en:​part2:​pygame:​step007| ← previous]] ^ [[en:​part2:​pygame:​start| ↑ Overview]] ^ [[:​en:​part2:​pygame:​step009| → next ]] ^