Post #4961 · Mon 130114 034316
Originally posted by interdpth
Originally posted by Rena
...how the tiles are stored in the game shouldn't be any reason you can't improve the UI, and generate maps based on the room layout.
Just drawing the tiles a few pixels apart from eachother in the tile list with a gray background would be a huge improvement already.
Design the code that will find all the save rooms, all the map rooms, any bosses. Design for me the code that will detect hot rooms, regular rooms and hidden rooms....Then sure.
Edit:
Actually, I can have it generate a outline...
WHAT DID YOU DO TO ME?
That's an annoyingly lazy response, but sure. How to generate the map:
Start at the current room
Plot a room on the map there. Use the room's settings and contents to determine what kind (is there a save point? lava? doors? bosses? etc)
e.g. if there's a door on the left of the room, then draw a tile with a door on the left.
What's to the left?
Is it more of the same large room? Then draw a "partial room" tile
Is it another room? Then move there and repeat this process
Repeat for the other three directions (think recursion)
Let the user touch up anything they like, such as erasing tiles to make hidden rooms.
How to make drawing the map by hand sane:
Draw a room tile where the user clicked
Is there a room tile to the left? Then replace these two tiles with ones that "connect" to eachother (i.e. change this one to one with a door on the left, the other to one with a door on the right).
Repeat for each direction for each tile the user drags over.
Or, if the user clicks on a room tile and drags over another room tile, connect them using similar logic.
Have an erase mode that does the opposite (draw blank tiles, change neighbouring tiles to ones that don't connect to this one).
If the user holds, say, shift and drags between two tiles, draw a large rectangular room between those two points, and connect the neighbouring tiles as described. (You can even be clever here and see if there are doors leading into the neighbouring rooms!)
How to make the tile selector sane:
Instead of doing:
for y = 0 to 16
for x = 0 to 16
draw tile #(y*16+x) at position (x*8, y*8)
end
end
Do:
fill the tile area with a background
colour easily distinguished from
the tiles, such as gray
for y = 0 to 16
for x = 0 to 16
draw tile #(y*16+x) at position (x*10, y*10)
end
end
or some other number, to leave a nice gap between them, so you can actually tell them apart.
Anything else you need done for you?
____________________