Jump to content
  • Advertisement
Sign in to follow this  
kubapl

XNA Level Editor

This topic is 3756 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I'm making a 2D level editor (something similar to the starcraft editor) in XNA for a game I am working on. And I was wondering what item from the toolbox should I use for the map so if I drag and drop onto it it'll update and show the object on it.

Share this post


Link to post
Share on other sites
Advertisement

For this you'll either need to create a custom control (don't know the exact terminology, but one where you override OnPaint) and paint the stuff you want yourself using GDI. Another option which takes a bit more work to set up, but is probably more useful in the long run, would be to host an XNA game on a Control. For more information on that, go here.

I'd go with the 2nd option, since you'll likely can reuse a lot of XNA code then which you'll already have to draw the level in the first place. It also allows for a bit of WYSIWYG editing, meaning the user will see the world in the editor as it will appear in the game, which is a nice convenience.

Hope this is the info you were looking for :)

Share this post


Link to post
Share on other sites
What you'll probably want to do is have a class that derives from Control that will serve as the "view" for your map, which you can embed in your main Form. If you want this control to be able to handle drag and drop, you'll need to handle the DragDrop event (along with a few others).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!