asciisprites - 4
Converts an ascii image to a polychrome pygame.Surface or a list of asciis to an animation.
miezebieze
(mieze)
Some time ago, I examined a game, where the data was completely plain text. All the images were stored in ascii strings and converted to an (monochrome) image.
I really dislike binary data, so I tried to make polychromatic images from a string and a dict with the colours. I didn't succeed at first...
Then, a week ago, I began with making a new game - And I really want to finish it; just to actually have something done! (My first try at a real game was not so successful.) So I dusted off this here (It was only a whole lot of None before.) and extended it. But then I wanted to make easy to control animations. So I made that and also classified the Image stuff, to have better control and easily recompile the image.
Examples are included. Just download and execute it.
Keys: Space, Left, Down, Right
Also the example has some more comments than needed, to be compatible with bloodier beginners than me.
I really dislike binary data, so I tried to make polychromatic images from a string and a dict with the colours. I didn't succeed at first...
Then, a week ago, I began with making a new game - And I really want to finish it; just to actually have something done! (My first try at a real game was not so successful.) So I dusted off this here (It was only a whole lot of None before.) and extended it. But then I wanted to make easy to control animations. So I made that and also classified the Image stuff, to have better control and easily recompile the image.
Examples are included. Just download and execute it.
Keys: Space, Left, Down, Right
Also the example has some more comments than needed, to be compatible with bloodier beginners than me.
Changes
The file was broken... And now the description was removed? I really kinda hate this site. Okay. I figured it out now.
Links
- Home Page
- http://www.pygame.org/
- Source
- http://pastebin.com/Ec483A6d