• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 Why did YoYo Games remove DnD/GML mixing?

N

NeonSpectre

Guest
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!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
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.
 

Mike

nobody important
GMC Elder
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.
 

csanyk

Member
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!
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.
 

GMWolf

aka fel666
We ARE looking to add code folding based around a #region tag (like C# has)
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.
 

JeffJ

Member
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.
 

Mike

nobody important
GMC Elder
Why not just allow us to fold all code between { }?
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.
 

GMWolf

aka fel666
#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.
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 :)
 

csanyk

Member
That's what I was saying is just downright ugly... having to put { } around things is just nasty
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?
 

GMWolf

aka fel666
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?
# marks a preprocessor command. So, i think itl have to be #region.
 

MontyDrake

Member
If you want multiple blocks, you can keep using DnD mode to achieve this.
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.

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.
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.
 

Mike

nobody important
GMC Elder
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.
 

LifeJumb

Member
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
 

MontyDrake

Member
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.
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.
 

GMWolf

aka fel666
View attachment 4308

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.

View attachment 4310
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:

makas

Member
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
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
please dont fold with { } I would kill myself if you do this :(
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.
 

Hyomoto

Member
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.
Quit putting coal in my hype train!
 
Top