XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Question about XNA vs Windows Forms

Last post 8/20/2009 1:36 PM by Danthekilla. 3 replies.
  • 8/19/2009 4:01 PM

    Question about XNA vs Windows Forms

    So first, I'm very new to OOP. I've done Procedural in PHP and done some web development, so I understand a lot of the concepts and will learn fast, but at the moment I have very little actual experience. Forgive me if I say / assume something stupid, gentle correction would be much appreciated.

    Starting out with some background -- I'm currently in my senior year in High School. In order to graduate, we have to do a senior project. My friends and I thought it would be fun to make a basic Mario / Megaman styled game, a simple sidescroller 2d platformer. I'm planning on making a map editor with a small interface for my teammates to use as a tool. I can then learn more about actual animation and other topics needed in order to actually program this game while they work on the gameplay.

    I don't want to use a pre-made editor because I'd like to get the programming experience. While they're making the art, I'm learning C#. I understand my program won't be that great and will probably be very buggy, and could potentially take a large chunk of time to finish, but I'd still like to make it. If worst comes to worst and it takes much much longer than anticipated, we can pass it off as our senior project even if it isn't finished (the requirements state the senior project is more about the journey than the finished product),

    Some features that I would really like to have -- an icon bar at the top, that allows the user to do various tasks (save, new map, edit properties, switch layers), a treeview pane on the side for selecting the map to edit, a pane on the bottom that displays each tile as a square and allows the user to select it, and then the main drawing screen where the user would then paint to the map.

    So my real question is -- even though the game will be done in XNA, should the Map Editor be done in XNA as well, or Windows Forms?
  • 8/19/2009 4:15 PM In reply to

    Re: Question about XNA vs Windows Forms

    Use Paint. And I'm not even joking. For my new game Pixel Man (granted much simpler than even Mario) I'm using Paint.net as my level editor, though any app that saves PNGs would work. Basically just set up color keys. So maybe a color of (128, 128, 128) is a particular brick and (255, 0, 0) is where a certain enemy type spawns. You can just key up whole levels into colors and then just plot the pixels. Then your game just loads in that image and uses GetData to extract the information and process it much like you would any other file describing your level data.

    The benefit of this is A) anyone can make levels, so your partners don't need a tool at all and B) you don't have to write an editor at all and you get all the nice things like Undo/Redo, Copy/Paste, layers, etc. For something like Mario or Megaman it might be a great way to save some time.

    That said, it is good fun to work on a level editor. I would suggest you look at the WinForms samples on this site and use the XNA Framework to do the rendering, but use WinForms for the rest of the editor's UI.
  • 8/19/2009 4:47 PM In reply to

    Re: Question about XNA vs Windows Forms

    Hmm, hadn't thought of that... pretty cool idea. I would really like the OOP experience though, I think I need it, but maybe for a future project. And I didn't know it was possible to combine the two, so I'll probably end up doing that. Thanks a lot for the advice!
  • 8/20/2009 1:36 PM In reply to

    Re: Question about XNA vs Windows Forms

    I have used both windows forms and xna to make level editors.

    All i can say is if you know anything about windows forms (i didnt) then xna will be harder but if you dont know anything about winforms then you could do eather but i think that the xna one would take a little bit longer (from my experiance) but the winforms one would be more limited too.

    So in all i would say winforms expesially if you are dealing with strings and words in anyway at all...
    Lead Programmer At 2.0 Studios

    Play Project Alpha Today
Page 1 of 1 (4 items) Previous Next