Python with a text-mode esque thing in Off Topic
|
|
I already know how to draw graphics and create a map in Python using pygame, but I cannot figure out how to draw a nice little map made of text on the screen for the life of me!
The closest thing I could get was:
dungeon = ["###########################################################", "#...........#.............................................#", "#...........#........#....................................#", "#.....................#...................................#", "#....####..............#..................................#", "#.......#.......................#####################.....#", "#.......#...........................................#.....#", "#.......#...........##..............................#.....#", "#####........#......##..........##################..#.....#", "#...#...........................#................#..#.....#", "#...#............#..............#................#..#.....#", "#...............................#..###############..#.....#", "#...............................#...................#.....#", "#...............................#...................#.....#", "#.....YOUJUSTLOSTTHEGAME........#####################.....#", "#.........................................................#", "#.........................................................#", "###########################################################"] for i in range(0,len(dungeon)):print dungeon[i]
|
Which obviously wouldn't work since the terminal would have to be flushed every time there was an update.
Is it possible to create something similar to BYOND's text-mode in Python? I just need to know how to draw the text on screen and be able to update it. Hopefully a tutorial or something.
You'd figure this would be easy to do, but I can't figure it out for the life of me. Especially with so many tutorials going around for creating graphics with Pygame!
|