pkulev / xoinvader

Python space game in terminal
http://mmap.me
MIT License
12 stars 1 forks source link

Convert background format into text texture compliant format #83

Open pkulev opened 4 years ago

pkulev commented 4 years ago

Abstract

Now background has it's own format, but with texture we can unify it. It will be needed later for level description file format and also we will be able paint background with different colors.

Maybe we can even use chunks from several background files at once.

Example

[meta]
name = "small town"

[chunk.bridge]
image = """
  \      /
   |    |
   |    | 
   |    |
  /      \
"""

color = """

"""

attrs = """

"""

[chunk.something]
image = """
  ^^^^^^ ^^^^^^ ^^^^^^
 00 000 000 000 00 00 0
"""

Implementation

Replace old parser or add new one.