Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

no, I didn't loose anything, I was just testing ;)

Great, thanks for the quick fix :)

I don't really understand how you treat my entered file name though. Why don't just take the name exactly as the user entered it and append your suffix (e.g. _map_XX.EXT). It shouldn't matter what the user chose as a file name.

But well, it's not really that important, your fix should be sufficient :)

> no, I didn't loose anything, I was just testing ;)

that's a relief!

> I don't really understand how you treat my entered file name though.

If I coded it right, here's what it's supposed to do:

SPLIT {entered_filename} into: {filename} and {file_extension} (PNG, JPG, ETC)

IF {filename} ends with the pattern '_map_##'

      Remove '_map_##' from end of {filename}

FOREACH map

       SAVE map as {filename}_map_##.{file_extension}

  > Why don't just take the name exactly as the user entered it and append your suffix (e.g. _map_XX.EXT)

The idea is to allow you to save over an existing image sequence.

So if you've previously saved MyImage_map_01.png, MyImage_map_02.png, ...

You can select any image from that sequence in the file selector and the code will save over the existing sequence of images.

Otherwise, if you selected 'MyImage_map_02.png' from the file selector the code would end up creating a brand new sequence named: 'MyImage_map_02_map_01.png', 'MyImage_map_02_map_02.png', etc. etc.

So that's the idea.  It should generally do as you suggest, just take the filename you give it and add '_map_##' to it.  But the code does try to be smart and identify the case where you are trying to save over an existing sequence.

The problem with the way I did it before, is that instead of looking for the pattern '_map_##', the code was just stripping ANY AND ALL numbers off the end of the filename.   So when you gave it the user named file 'BeepBoop2.png' it wrongly assumed that this was part of a previously saved sequence.   My hope is that by using and specifically looking for a more unique pattern ('_map_##') the code can still be smart about guessing when you are trying to replace an existing sequence but have far less chance of getting confused by filenames that happen to contain numbers at the end of them.

ah, now I understand why this is intended behaviour, thanks for explaining :)

I still think there should be a warning before files are overwritten though. At least to me the intended behaviour wasn't intuitive. (you could also add a "don't ask again" checkbox to the warning message)

Cheers, have a nice weekend :)

Yeah, a warning message as it saves over each/any files is probably a good idea.  I'll look into implementing that.   Truth be told, a warning box like that should be easy if I was using Forms and all the other built-in GUI stuff in C#, but since the tool is written on top of my game engine, which uses SDL and OpenGL for everything, it's more  of a challenge.  But I'm sure I can get something to work.  Thanks again for all your feedback and suggestions!  I haven't forgotten your other ideas, they're all on the queue to work on when I get a chance.  :)