Working on a Zelda Clone, Part 18

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.

Map Size
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)

Both comments and pings are currently closed.

5 Responses to “Working on a Zelda Clone, Part 18”

  1. SomeUser says:

    Wow, that’s cool how you got the map editor. But over 15 minutes for each tile?! That’s…wow. Hope you get it fixed soon, or you’d go crazy!

  2. Rox64 says:

    Can it be compiled on Linux?

    • Mato says:

      I don’t know, probably not, but maybe. I know there’s a way to compile C# stuff on Linux, but I don’t know if that extends to XNA too.

  3. tapi says:

    you can embed an xna frame into a wpf too, could even maybe make your game interactively edited that way.

    • Mato says:

      Yeah, I tried that at one point too, but it had its own weird issues that I didn’t know how to get around. Luckily, today I finally managed to progress past the major sticking point I had here.

Subscribe to RSS Feed Follow me on Twitter!