Thankfully, after posting a few messages to the Blitz forums, and jiggling some code around, I finally managed to get the problem sorted out, and the Editor now happily refuses to process certain functions if the mouse isn't in the right place. This initial bout of joy was tempered with an intermittent bug (my favourite!), but a few extra checks soon sorted it out. Haha! Take that, puny bug. Ahem.
Flushed with this small morsel of success, I took to tidying up a few bits and pieces; the first task was to sort out the keyboard shortcuts for various functions. I then tweaked my Grid routine to adjust automatically to the current tile size, and also allowed the user to adjust the grid size (in multiples of the current tile size, of course). This will come in handy when combined with the Snap facility, which I spent a bit of time tinkering with to no avail (needs a little more thought).
I also added a Shift modifier to Brush Mode; currently, the entire Brush is pasted to the map, even if half of it is off-screen - after a couple of simple tweaks, holding Shift now clips the brush to the screen.
* * *
I'm always amazed by the way these projects grow, the inclusion of seemingly basic features inspiring further embellishments and modifications that in turn make the toolset more and more powerful; one minute I have a very simple Map Editor, the next I have a full-blown Windows application with dozens of tools. Blimey. :)
Though the transition to Windows hasn't been too painful, and despite my grumbles concerning the documentation and lack of tutorials, do owe a debt of gratitude to the Forum communities who have helped out along the way (the documentation might be lacking, but their willingness to help isn't). Plus, considering how far I've progressed in just a couple of weeks, I really shouldn't bewail my lot.
However, the fact remains that I'm itching to get started on the game, so once my current To-Do list has been completed and the Editor Load/Save/Export functions are sorted, and barring any tweaks that need to be made in light of game features that may present themselves, I shall be putting the Editor project to bed. I had hoped initially to produce an open-source editor which anyone could use or modify, but there remains the issue of support (which I'd have precious little time to do), and the fact that Blitz is fairly limited in some areas (so I'd never be able to produce precisely the tool I envisaged, merely one that gets the job done).
What's important here, I suppose, is that writing the Editor has taken me on a very steep learning curve but has introduced me to the vast majority of working practises, techniques, and language commands that I'll need to get the game up and running. Therefore, my advice to anyone wanting to write games in Blitz would be, write your Editor first. ;)
