Feedback Why did YoYo Games remove DnD/GML mixing?

Discussion in 'GameMaker Studio 2 Community Tech Support' started by NeonSpectre, Nov 10, 2016.

  1. NeonSpectre

    NeonSpectre Member

    Joined:
    Oct 9, 2016
    Posts:
    2
    Seriously, I cannot reason with myself why they would do this. What if I want both in a single project? Why even separate the two in the first place? Honestly, using Studio 2 for a bit, there is no reason for me to migrate, having the full version of Studio 1. I am not paying an extra 200+ dollars just for a few new cool features, but the removal of integral ones!
     
  2. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    631
    You can mix DnD and GML if you create a DnD project. There is a new GML only project option, which I think is very nice since I never use DnD.
     
    Blackened, hdarren and Dark like this.
  3. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    5,940
    Most people want one or the other, but you can interchange at any time between them. The base project is set to one or the other but then you can use the RMB menu in the code/DnD editor to switch.
     
    hdarren and Aviox like this.
  4. Juju

    Juju Member

    Joined:
    Jun 20, 2016
    Posts:
    372
    DnD mode in GMS2 functions the same as GMS1. GML mode is a fully new feature designed to make coding more streamlined.
     
  5. Mike

    Mike Evil YoYo Games Employee Forum Staff Admin YYG Staff

    Joined:
    Apr 12, 2016
    Posts:
    2,287
    DnD mode in GameMaker Studio 2 is the same as DnD in 1.x, you have the same execute a function etc and you will the same look with multiple execute blocks per event.

    The "new" GML only mode is a single script per event - as was requested by huge numbers of people. They didn't want to have to continually add in the execute a script thing, and just wanted a single text window - which is what we've now done.

    If you want multiple blocks, you can keep using DnD mode to achieve this. Having been out in beta for just a couple of weeks, we are still adjusting the look and feel of it, and this will continue to improve. We ARE looking to add code folding based around a #region tag (like C# has), which will allow you to organise your code into something very similar to what your looking for, but we won't be adding in multiple script blocks for GML only mode, this would require extra clicks for everyone else who was so desperate for this mode in the first place.
     
    Michael Bateman, Binsk, xot and 4 others like this.
  6. JeffJ

    JeffJ Member

    Joined:
    Jun 20, 2016
    Posts:
    181
    ... And by the way, I can't wait for that #region tag! That is going to be so sweet.

    Also, huge thumbs up for listening to all the feedback.
     
    Binsk, xot, hdarren and 1 other person like this.
  7. csanyk

    csanyk Member

    Joined:
    Jun 20, 2016
    Posts:
    784
    I thought this at first as well. The New Project interface seems to suggest, and creates a strong impression that at project creation time you have to choose between making your project a DnD project or a GML project.

    I found after a few minutes of playing around with my new project that this just isn't so.

    For one, there's still a DnD action for "execute GML code". This is how DnD and GML have always co-existed in GM projects.

    A great new feature is converting DnD into GML. This is a one-way operation, but it's awesome that beginners who start out with the drag and drop actions can convert their projects without having to do extensive re-writing.

    It's even possible to convert GML to DnD, although what this amounts to is the block of GML code is wrapped up in a DnD "execute GML code" action.

    However, the Create New Project UI is pretty misleading on this count. It really does make it seem like GMS projects are one or the other.
     
  8. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    2,860
    Why not just allow us to fold all code between { }?

    Also, having this:
    Code:
    If (expr) {
     aSingleLineStatement();
    }
    Fold into
    Code:
    if (expr) { aSingleLineStatement();}
    Rather than
    Code:
    if (expr) {...};
    Similar to jetbrains IDE would be nice.
    Its a small thing, but it does allow you to keep code folded for switch statements, etc without compromising your formatting, and not have to constantly open and close it to see the one statement.
     
    csanyk likes this.
  9. JeffJ

    JeffJ Member

    Joined:
    Jun 20, 2016
    Posts:
    181
    I would much rather have the #region like in Visual Studio. I use way too many { for it to be in any way useful (I would end up having the "+" icon all over the place, it would be an utter cluster****).
    With the #region, we would be able to manually define the places we'd want collapsable.
     
  10. Mike

    Mike Evil YoYo Games Employee Forum Staff Admin YYG Staff

    Joined:
    Apr 12, 2016
    Posts:
    2,287
    Because i hate this with a passion. Allowing folds on a one line section of a nested "for"..nuts. Folds should be foe "chunks" of code, whole areas that do a specific task, not that one line you want to hide and forget about.

    #region can be nested, and thats fine, but allowing folding on every single { } is stupid, and doesn't even include everything I want anyway... for example...

    Code:
    var xx = argument0;
    var yy = argument1;
    var zz = argument2;
    var ww = argument3;
    var hh = argument4;
    
    for(...){
       for( ){ 
        }
    }
    
    
    if( ... ){
    
    }
    
    So in this, I can onlyt fold around the fort and the if... I can't hide the argument stuff which is just setup to me - unless I add { } around it - that's nasty.

    So.. #regions it is, then I have total control over what and how it folds, outside of the language itself.
     
    JeffJ and renex like this.
  11. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    2,860
    Could you not write
    Code:
    {
     var xx = argument0;
     var yy = argument1;
     var zz = argument2;
     var ww = argument3;
     var hh = argument4;
    }
    {
    for(...){
       for( ){
        }
    }
    if( ... ){
    }
    }
    This way you can fold between the outermost brackets.

    Well, I guess #region works just as well. Just something to get used to :)
     
  12. Mike

    Mike Evil YoYo Games Employee Forum Staff Admin YYG Staff

    Joined:
    Apr 12, 2016
    Posts:
    2,287
    That's what I was saying is just downright ugly... having to put { } around things is just nasty
     
    makas, JeffJ and renex like this.
  13. csanyk

    csanyk Member

    Joined:
    Jun 20, 2016
    Posts:
    784
    It does have the advantage of being fewer keystrokes. Maybe {} has some semantic meaning that I'm not aware of that makes this approach "nasty" but if so I'm not sure what it is.

    To me, #region looks uglier, where on the other hand I can "tune out" brackets. Unless -- are you saying "#region" as in literally that exact string, #region, or would we be able to use #name_of_region to give our regions names that have meaning? In that case, I like that better. Something like this:

    #params_declaration
    var xx = argument0;
    var yy = argument1;
    var zz = argument2;
    var ww = argument3;
    var hh = argument4;
    #params_declaration

    Still, it'd also be nice if {} blocks could also be collapsed, and if block comments /* */ could also be collapsed. This would allow people who do want that feature to use it; if you don't like them, you don't have to use them, after all. Just leave them expanded and ignore the +/- buttons at the left margin in the code editor, right?
     
  14. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    2,860
    # marks a preprocessor command. So, i think itl have to be #region.
     
  15. MontyDrake

    MontyDrake Member

    Joined:
    Sep 18, 2016
    Posts:
    25
    No, just no.
    I said this before but I'll keep saying it each time somebody argues that. Right now coding any big chunk of code in those tiny little toy code windows its like making an oil painting through a cat flap. Really, really bad design choice. I'm a designer, in case you wonder.

    This. This a googloplex^googol times, please. It's fine if you don't want to put multiple different code blocks per event, but just give us something to keep our code neat. Because otherwise, any big project made through GML gets awfully long, impossible-to-navigate chunks of code. It's not nice to take a barely good feature out, and not putting something to fullfil its place, even in a barely better way.

    Please guys, please. You code, you can't possibly not miss something like this when you work and think your customers won't.
     
  16. Mike

    Mike Evil YoYo Games Employee Forum Staff Admin YYG Staff

    Joined:
    Apr 12, 2016
    Posts:
    2,287
    We will increase the window size inside the DnD, however, it'll never be really as big as you need for coding as it's a window inside a frame, inside a window. Really, it's meant for small code snippets...

    As I said, code folding is what we will be adding, we won't be adding in multiple scripts on one event time, that's just not what the GML only mode is about - but I do think code folding will suit everyone that was after this.
     
  17. LifeJumb

    LifeJumb Member

    Joined:
    Nov 6, 2016
    Posts:
    18
    upload_2016-11-10_22-12-34.png

    In GMS2 need alternative to such admission. Code in one event can be a lot. OR....
    The ability to create regions or to hide blocks of code.

    upload_2016-11-10_22-21-43.png
     
  18. MontyDrake

    MontyDrake Member

    Joined:
    Sep 18, 2016
    Posts:
    25
    It's clear the execute code DnD action is designed for small codes, that's its intrinsic nature, and I totally understand you not adding multiple blocks of code in the GML mode. People like me just need something to take the place of the former, just to make coding feasible in the long run. I can't talk for others, but that's enough for me.

    I'm just really upset by many answers I've been given around here, such as "just call scripts", "you can still make that in DnD mode". None of those are real solutions to this.

    Thank you.
     
  19. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    2,860
    Yes, code in DnD is not convenient. hence there is the code only mode :)
    and Mike already ssaid they are looking into adding #region like c#.
    (too lazy to add a link). [Edit] oh wait. Its the same post! :)
     
    Last edited: Nov 10, 2016
    LifeJumb likes this.
  20. makas

    makas Member

    Joined:
    Oct 15, 2016
    Posts:
    216
    please dont fold with { } I would kill myself if you do this :(

    I usually do a lot of nesting because in the manual says that is faster... by the way I have yet to seen someone who uses the { } in the same way I do
    Code:
    if(....
           {
           if (.....
                  {
                  code;
                  code;
                   }
            }
    
    I cant live visually not having the { in the right position just down of the comparision with his correspondet space, is like very confusing for me seeing next to it in the same row
     
    Mike likes this.
  21. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    2,860
    Not with short circuit evaluation. Besides, don't compromise code logic and flow for performance...
     
  22. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    5,940
    It's been stated in several other topics that user defined regions will be implemented. :)

    Also, I think some people are missing the point of GMS2.. it's not an update, it's a NEW product and you should expect old paradigms to be broken. Doesn't mean that things won't be brought back, but you should give the new way of working a while to get used to it before deciding what is better or worse.
     
    makas likes this.
  23. Hyomoto

    Hyomoto Member

    Joined:
    Jul 7, 2016
    Posts:
    997
    Quit putting coal in my hype train!
     
    Nocturne likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice