View Single Post
  #12  
Old 02-11-2005, 12:51 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Quote:
Originally Posted by jake13jake
Copy and Paste is easy, but I would rather put it in a different script because in my opinion it would be better/easier/less confusing to separate the two abilities. I'd try to make something that would allow for predefined objects if I did that as well. All you really have to do for that is to save all of the tile code things in an array. Bucket fill would be a little more difficult, but possible. It's kindof a maze to make. The hard part would be checking for tiles that are the same and connected. Call a for loop checking each coordinate on the four borders of the tile and then checking that tiles four borders and the next tiles four borders. Maybe if I did a function that called itself... I just hope it wouldn't eat up all the memory, and doing that probably would so what might be an efficient way? Replacing the tiles wouldn't exactly be the hard part. Just using modulus from the initial coords could handle that. It would also give more control over how you want the tiles to be laid. The default editor, on the other hand, decides for itself.
You just explained pathfinding, it's also what I did for bucket fill, I removed it out of my script because people started editing all at once, and it just got confusing
Reply With Quote