[php] printing a chessboard-like dungeon.
Posted: Sun Oct 03, 2010 2:09 pm
I've just started working on a game similar to ChessRogue.
Both ChessRogue and my game take place in a dungeon whose inhabitants' movements are like those of chess pieces.
At http://www.apolitical.info/private/rogue/levelgen , I've got some code which creates a dungeon level, and prints it. EDIT I've changed the code so it prints plain text rather than a table with background colors.
However this appears to be very slow compared to printing plain text. This is a problem because I want the game to be browser-based. However the chessboard setup should be helpful for telling (eg) if two creatures are on the same diagonal.
Is there a faster way to get the same effect I've got here?
Both ChessRogue and my game take place in a dungeon whose inhabitants' movements are like those of chess pieces.
At http://www.apolitical.info/private/rogue/levelgen , I've got some code which creates a dungeon level, and prints it. EDIT I've changed the code so it prints plain text rather than a table with background colors.
However this appears to be very slow compared to printing plain text. This is a problem because I want the game to be browser-based. However the chessboard setup should be helpful for telling (eg) if two creatures are on the same diagonal.
Is there a faster way to get the same effect I've got here?