Collisions & Winforms

June 20th, 2009 by Boon

It's a window. And it's way more exciting than you think it is.

It's a window. And it's way more exciting than you think it is.

It’s been a while since I’ve posted. Been busy with project wrap up at work, but now I have some spare time I intend to hammer away on PixelPoet – the editor for SagaEngine, which we’ll be using to put together our first game. Until recently I’d been building the editor entirely within XNA, but then I came to the problem of trying to design a usable interface without access to any of the Winform controls, and realised I’d have no choice but to go, yet again, back to attempting to build an editor that worked within a windows form.

Luckily, I found a site that explained it all much better, and in a way that was much easier to understand for a nub like me, than the Winforms samples on the Creator’s Club site. So thanks Roecode for being generous enough to share!

Here’s the result of 20 minutes of work (which is laughable after the hours I wasted with the Winforms sample). It shows the editor running inside an XNA panel, attached to a windows form. Collision drawing works, the grid is toggleable… There’s just a minor problem – for some reason, my InputManager class is reading an offset to the mouse position. And it varies, depending on the size of the window. So I need to figure out what’s causing that offset and compensate for it.

But for now, I’m pretty happy to get something working inside a form. It’s going to make things WAY easier.

2 Responses to “Collisions & Winforms”

  1. Iain Says:

    This is the best thing ever :) Such a huge step for PixelPoet to take towards being a really easy program for a dumb artist like me to use :) I can’t wait.. especially now that I’m designing the levels too :p

  2. Boon Says:

    HAHA Yeah, I’m more excited about this than I was when I got collisions and parallax layers working :/ HAHA

Leave a Reply