Falagard
05-04-2006 22:13:03
Tuan, I'm curious - Lucky's old map editor used to save deformations automatically as you modified the terrain. I assumed, without looking at the code at the time, that it was just what the PLM2 did behind the scenes.
I figured I'd have to make special workarounds by working on a temporary terrain and then copy over the real terrain when the user clicks save. However, now I've noticed that PLM2 isn't saving as you deform, and saw that it's on your list of todos. Was it ever in there? If not, Lucky must have been doing something that I can't find yet - saving the terrain somehow.
If you are going to implement it, I'd prefer if you had to call Save() manually, and that it didn't just automatically save your deformations on exit.
Also, how would you suggest doing terrain deformation undo/redo? I was thinking I could use the GetAreaHeight function to get the height of terrain for a specific area and save that in memory, then during an undo I'd restore the height values of that area. I may need a function to update a specific area with specific values if it doesn't already exist.
Painting undo/redo is going to be much harder, and is one of the reasons I'm going to have to pick a specific texture mode and only support it.
I figured I'd have to make special workarounds by working on a temporary terrain and then copy over the real terrain when the user clicks save. However, now I've noticed that PLM2 isn't saving as you deform, and saw that it's on your list of todos. Was it ever in there? If not, Lucky must have been doing something that I can't find yet - saving the terrain somehow.
If you are going to implement it, I'd prefer if you had to call Save() manually, and that it didn't just automatically save your deformations on exit.
Also, how would you suggest doing terrain deformation undo/redo? I was thinking I could use the GetAreaHeight function to get the height of terrain for a specific area and save that in memory, then during an undo I'd restore the height values of that area. I may need a function to update a specific area with specific values if it doesn't already exist.
Painting undo/redo is going to be much harder, and is one of the reasons I'm going to have to pick a specific texture mode and only support it.