don't click here

Programming a level editor

Discussion in 'Technical Discussion' started by Elektro-Omega, Feb 13, 2014.

  1. Travelsonic

    Travelsonic

    Member
    827
    20
    18
    Direct/easier in which ways?

    EDIT: I feel weird asking, majoring in computer science, and programming in a variety of languages - some GUI programming, some not... just feel like the answers I am getting are vague.
     
  2. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    If you want a good chance of making your editor Windows-only, then go ahead and use C# and Windows Forms freely. Windows Forms are unlikely to be 100% supported in Mono (it supports up to WinForms 2.0, and not 100% support either) because it can be dangerous to make better support for it: it is one of the components that is not in Microsoft's (largely meaningless) community pledge.

    If you don't want to use C#, you can use wxWidgets or Qt with C++, all of which have good cross-platform support. There are some C++ wrappers for Gtk+ which allow it to be used with C++ without having to descent into C syntax in the middle of your code; Gtk-- is one I used in the past.

    If you want to use C#, you can check wxNet (wxWidgets wrapper), Gtk# (Gtk+ wrapper) or Qyoto (Qt wrapper). Be aware that, depending on which .Net assemblies you use, you can still lose cross-platform support; the safest way to guarantee it would be to develop it in a Linux box and cut anything that causes the program not to run.
     
  3. Billy

    Billy

    RIP Oderus Urungus Member
    2,118
    178
    43
    Colorado, USA
    Indie games
    Okay so I'm not very good at explaining, so I googled it. People seem to explain it just fine in this stackoverflow question. Again, this is really winforms only, as people here and online seem to have no problem using C++ with other GUI solutions.
     
  4. Cooljerk

    Cooljerk

    NotEqual Tech, Inc - VR & Game Dev Oldbie
    4,505
    201
    43
    Reminder - 2d arrays in c++ aren't arrays of arrays. They are one array, stored in sequence in memory. This is different than java where a 2d array is an array of pointers to arrays.

    I[w*y+x] is a 2d array in cpp where w is the width of your 2d array. Assuming a 2x2 array, where w is 2-1 (to keep in boundry), I[w*1+1] is functionally equivalent to I[1][1].

    This can be handy when managing references.

    Don't let people in this topic dissuade you, I did just this back inlike 2008, it's a terrific learning experience.

    Edit: people talking about gui apps cross platform - just build your gui yourself. I used sdl and designed a portable gui that was created as an object. Really, provided access to a framebuffer, you're good to go if you want to go real low level. Sdl 2.0 includes a number of improvements that'll make building an editor gui much simpler. When I built mine, I couldn't even create multiple windows!
     
  5. winterhell

    winterhell

    Member
    1,165
    7
    18
    One shouldn't even think about multiplatform support on their first product.
    As for the custom GUI, I'm all for it. On the low level for that you only need to be able to render a texture and capture the mouse input. It might sound tempting to use the GUI the development environment offers, but you never know if that would work on different systems if that is a concern.
     
  6. Cooljerk

    Cooljerk

    NotEqual Tech, Inc - VR & Game Dev Oldbie
    4,505
    201
    43
    On your first project, no, you shouldn't be about multiplatform support. But if you have experience to build a cross platform product, you need to begin designing for cross platform support at the very beginning. And I don't mean cross platform like x86 Linux and x86 Windows. Learn to love to abstract and use the shit out of malloc, lol.

    Speaking of which, you can design a multidimensional array that behaves like java using malloc. I prefer cpp 2d arrays, though, unless I need an uneven array.

    Edit: I actually built my gui as I built my 2d engine. My gui was literally made from my 2d engine and built by the tools I made. That made them all intimately connected. Building the gui built my tools, and building my tools built my gui. Really good learning exercise.
     
  7. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    2
    18
    Estonia, Rapla City
    T-04YBSC-A !
    I have made a serious music tool for windows, and I don't yet know how to make a single menu or button in windows.... I made my own GUI setup haha.
     
  8. Cooljerk

    Cooljerk

    NotEqual Tech, Inc - VR & Game Dev Oldbie
    4,505
    201
    43
    I've worked for a number of companies doing UI/UX design... never once worked with the windows UI haha. It's like a 4-letter word, it seems.