Yesterday I fought with Windows programming some more. After a lot x 500 of hair pulling, I decided I should at least make an Export function to make it save stuff into a file my game could use, even if the editor program itself was still limited and crappy.
I tried it out, and my map-loading code in the game had a bug in it. Fixing it, I was greeted with this!
With some more light tweaking, I got it to be a little better, so I tried to make a complete room:
Then, after a lot of work and venting, I finally got the editor to use tile graphics properly, resulting in this:
But all is not well in the kingdom of Map Editor. For when every tile on the world map is filled, it takes the program over 15 minutes (I stopped counting after that) to load in the editor. And since ideally the editor should start with everything loaded and initialized to a blank tile, that’s way too long to be acceptable 🙁
So, I asked for help on Facebook and e-mail and got a variety of responses! Thank you, friends and compatriots, it means a lot to me 🙂 The overwhelming consensus so far is that I probably shouldn’t use WPF’s built-in Canvas functions and that I should handle the pixel data manually. Which is fine with me, I’ve always been a low-level programmer, I guess that’s why Windows programming hurts my noggin. The problem now is finding out what to use and how to use it to be able to manually mess with pixel data.
I have it so that the world map is currently 16×16 screens, akin to the early Zelda games. I want to be able to display the entire map at once, which is probably shocking for some, but I’ve seen many editors that handle maps of this size or larger (EarthBound has multiple map editors, for example). So I know it can be done, the question is just how. Tis a mystery to me.
Source Code & Demo
Since a couple nice folks have asked for it, here’s the current source code. It contains the .exe version too somewhere in there if you feel like messing with it for fun.
(Note: the 15-minute thing has been commented out of this current version)