And if you don't know, now you know, midgaaa

by midge 22. September 2014 02:15

I'll try to keep this update short. The level editor is in pretty good shape.

I had to go home for some family stuff this weekend, so I didn't get as much time as I wanted to work on all this stuff.

I fixed a mildly annoying bug where when you were drawing on the level editor, it would clear the last tile you set. So if you're dragging the mouse with the left button down, it would draw draw draw, and then when you finished it would quickly delete the last block.

I refactored a little bit and cleaned up some code. I updated some of the labels on the form also to show info about the level.

The biggest single thing I added today was the feature of scrolling around in the level to edit different parts. That was surprisingly easy. Worked like a charm.

I added controls for adjusting the length of the level when you're editing it, but didn't actually make it do anything yet. Making those actually work should be pretty easy.

So all that's really left for the level editor is allowing the user (me) to adjust the level size while editing. And then after that it's reading and writing the files of level data. That's it!

One annoying thing when I was trying to wrap up tonight... I got the scrolling and all that other stuff working, then I went to add the adjust level length stuff and BOOM, the scrolling stops working. That perplexed me briefly because I didn't think I was doing anything that would affect the scrolling.

It turned out some of the new controls I added were intercepting the events that were intended to be handled by the form. "Oh Imma just intercept these events and then do nothing with them.. deal with it". Jerk move, controls. Fortunately, stack overflow was helpful and the fix was pretty simple. I could just set a property on the parent form that would force the main form to get the keypress events.

Here's a pig in boots.


Add comment

  Country flag

  • Comment
  • Preview

About the author

Hi, I'm Midge.

Month List

Page List