gelstudios / gitfiti

abusing github commit history for the lulz
MIT License
8.07k stars 1.12k forks source link

Added multi-line ASCII to sprite support #5

Closed twolfson closed 11 years ago

twolfson commented 11 years ago

I have added in a function to convert ASCII strings into numeric sprites. It should make it easier to draw out sprites in the program.

The characters still need more thought but the general concept/implementation is there.

"""
 ------- 
-:.._..:-
-..___..-
-:-----:-
--_-_-_--
 -_____- 
  -----  
"""

[
[0,4,4,4,4,4,4,4,0],
[4,3,2,2,1,2,2,3,4],
[4,2,2,1,1,1,2,2,4],
[4,3,4,4,4,4,4,3,4],
[4,4,1,4,1,4,1,4,4],
[0,4,1,1,1,1,1,4,0],
[0,0,4,4,4,4,4,0,0]
]
twolfson commented 11 years ago

Trying out different character sets. This one looks pretty good.

http://plnkr.co/edit/tKswRL?p=preview

 ******* 
*=~~-~~=*
*~~---~~*
*=*****=*
**-*-*-**
 *-----* 
  *****   
gelstudios commented 11 years ago

The new character set does look nice, do you want to change your pull request?

twolfson commented 11 years ago

Sure thing. I will do that in a second =)

twolfson commented 11 years ago

:boom: Updated.

twolfson commented 11 years ago

By the way, Uber is hiring Python devs if you are interested.