CS 491 Lecture 13 – Text-based Level Editor
Agenda
- what ?s
- program this
- generating levels in TankTank
TODO
- For Friday’s 1/4 sheet, post a level in the comments of this post. Design it in a typewriter front, using # for walls, . for passages, and 1 and 2 for tank placement. It won’t line up neatly, but I’ll copy and paste it into the games assets and we’ll release our crowdsourced tank game to the world.
Program This
You have a level described in a plain text file in this format, with walls represented by #, passages by ., and tanks by 1 and 2:
###.#####.### ...........2. #.....#.....# #..#####....# #....#####..# #.....#.....# .1........... ###.#####.###
We plan on generating a cube for each wall. Where will each cube be positioned? How big will it be? You want the level to fill the viewport when the game is played.
Let’s complete this in two steps:
- What do we need to know? (1 minute)
- In pseudocode, how do we compute the sizes and positions? (more than 1 minute)
Code
…
Haiku
Text is liquid thought
Poured from brain A to brain B
Want some? Just ASCII
Poured from brain A to brain B
Want some? Just ASCII