Well, first... I like GML for what it is. A very simple scripting language. It does what it says on the tin (as it were), and that's a great achievement in itself. What I don't like about it, is that the syntax is a little woolly, and you can't declare types or sizes upfront. This has a huge baring on performance and what you can do to optimise the engine itself. So first and foremost I'd allow types. ints, bytes, shorts, floats and doubles along with strings and fixed size arrays (I think lists should grow, arrays shouldn't; personal preference). Not only are these things which would help you develop your skills, but it also helps you track down bugs. For example, I have an array 16 elements long, but I have a bug that touches element 4000! Currently, the array simply expands and it's hard to track down. However, if I knew it was only ever supposed to be 16 entry's long, I could set that as a fixed array then I'd get an out of bounds exception and hay presto! Bug found!
Next on my list would be structures. BLOODY HELL!! I MISS STRUCTURES!!! So many times in the past few months as we've started to push game out, we've needed to fix a bug, or add a little feature, and I've though, "well, just have an array of x/y coordinates, possibly an index to an object and then a type", only to actually realise.. I'd have to have multiple arrays for this. This is crap. So... Arrays next would be awesome, particularly when merged with real types.
Next up... I'd like objects to have custom functions you could call. So rather than having a script where you pass an object in, you call the objects function directly like so...
Player.SetHealth( 100 );
This is nicer to me, and would help teach some basic skills you could use as you learn and perhaps want to move into other languages. So it's a plus to me. Not that you couldn't keep the current script method where you pass stuff into it, but I prefer this, it reads better to me, and keeps the code bound together with the object that it affects.
Another thing I'd love to add is the ability to have functions inside a single script. For now if you want a new function you have to declare it in the scripts section. Again, I think this is okay, but you lose the context in which you would probably use the function. Although using the new object function feature above would allow something like this, it still means jumping back and forth in source files for a single function. It would be much nicer if I could simply declare the thing; something like...
BaddieObject FindBaddie()
{
//Do something
return the_baddie_object;
}
bool MoreBaddies()
{
// anymore?
return answer;
}
main()
{
//Do stuff...
while( MoreBaddies() )
{
baddie = FindBaddie();
baddie.die();
}
}
Now... technically... you don't need main(), we could just detect your not in a SUB function and do all that for you... so it would look like...
BaddieObject FindBaddie()
{
}
bool MoreBaddies()
{
}
//Do stuff...
while( MoreBaddies() )
{
baddie = FindBaddie();
baddie.die();
}
Which would be okay for beginners I think. I suspect the real GOAL of GML should be to make it open to beginners, but allow for experts to excel in it.
Now what else would I add? Well...I'm a MASSIVE C# fan, so I'd love to add the ability to call .NET stuff. Not only would this open a fully functional plugin system (in both directions!), but would mean we could drop support for things like GML stacks, queues, lists etc. as .NET already has really cool ones.
But what about this plugin thing? Well. allowing plugins to see into the main program via .NET interfaces or reflection would be massive. You could suddenly get access to the entire rendering engine, the variable system, rooms, instances etc. ALL done legally via a simple C# style interface. Not only would Plugins become much simpler to do, but their power would be immeasurable! The whole of Game Maker could then be done as a series of plugins.
Yes I know... veered slightly away from GML, but it's all related. Still, all this is my little fantasy world. Not only would we have to make sure Marks vision of a learning tool is protected, and that everyone else agrees with the direction. We'd also have to make sure we had enough cash to be able to do it justice, and not a half arsed attempt that would alienating the whole community.
So... not quite yet then... Oh well. Perhaps I'll do another post soon on what I'd like the graphics engine to actually be like. We lose so much performance because of the simplistic interface, a more comprehensive one would allow proper throughput and would probably even allow real 3D stuff to be done; not that I'm a fan of turning Game Maker into a 3D tool though....




20 Smart arse replys:
This post sounds like one of my worst nightmares >.>
The reason I like to use gml is because of its simplicity.
I know in many ways GML is aimed at junior programmers, however for me it is a simple way for me to transform my ideas into a reality, without having to read a hefty programming book.
I have a rudimentary knowledge of programming, but I am also capable of generating quite complex logical operations. GML allows me to execute them.
Maybe you could introduce types as optional (as they are at the moment unless specifically declared) plus all of the other things you mentioned such as structs.
Ultimately if the user needs and desires something more complex and powerful they can try something such as XNA.
I have tried XNA and even though it is clearly very simple and well put together I found it too much of a slog to learn. You basically have to learn all the principles of OOP before you can use it effectively.
GML puts as few barriers between the user and the joy of genuine creation. If you can improve GML in terms of performance and functionality while still maintaining that ethos I would welcome it!
I do like these ideas, they would make GML much friendlier to me. However it will probably not go down so well with the community.
In any case I would like to see the optional use of types. If its possible to have them, but I doubt it is possible and I can think of many problems that could be caused. Uck, that could get messy.
Yeah... have no fear Jesse. This isn't whats happening. This is purely a personal prefrence for if the worlds was centered around me :)
I am in FULL agreement with Mark that it HAS to be geared towards learning, and be forgiving in nature. Thats vital to GML, and in some respects I think the default look and feel of the language will never really change much.
That said.... I DO think that we can have various options to allow more hard core coders (and possibly professionals) access to some very powerful features.
For example... beginners would never notice that they could have sub functions inside a single GML script if they never wrote one. To them it would look exactly as it does now, but experts could use it if they like.
So yeah... worry not! Contrary to what Russ might have told you, I'm not really that thick! ;)
But even if it's used only by select users it might show up in examples and tutorials, on the GMC etc, and it'll cause confusion. (Especially data types, some other things you mentioned could work maybe...)
Is GM a tool to learn programming or to learn game design? I think both, but in the case of programming it's only an introduction to basic computer logic. People that really want to get into programming shouldn't use GM.
You say in an ideal world we could set data types in GM, I say in an ideal world we would never have to use data types (and computers would do the optimization themselves). ;)
Mmmm... I don't think so. If your a beginner, then a lot of the stuff people will say on forums will be confusing. I bet the "with()" construct will confuse new coders, come to think about it... even simple things like stacks and queues are hard for folk just starting out.
You can't hold folk back because of new coders, and folk will only leave a platform when it can no longer do what they want. If we can strike a balance between the absolute beginner, and more advanced users, I think we get get a good mix.
Remembering back to when we were on Spectrums and C64s, you had the "basic" stuff that got you hooked, but could go as far as you wanted/needed because it was all there. This is missing on GM.
Put it this way... if the "current" method of GML was in tact, and you could simply add more, but didn't HAVE to so users could start out exactly as they are now. I think that would work. But really, it's all down to the community and how they help newbies. No matter how little features there are, if someone doesn't understand the basics, they'll not have a clue what your saying.
Particually if we enable all this as a switch in the options. So you have to CHOOSE to become an advanced user.... I'm pretty sure that would work okay.
As to data types. Theres lots of times a more advanced user would WANT to use INTs rather than floating point numbers. Floats add lots of issues when your dealing with coordinates and everything is just "slightly" out. And it's the advanced users that want and need the speed that this kind of option would give. Again.... if you don't understand or want it, then you wouldn't have to use it.
Oh... and yes. We do plan (this one IS in the yoyo plan!) to try and do SOME auto TYPE casting... But we'll have to see how well that works. You get better errors and hence it's easier to debug, if someone puts the type in and then it assigns an illegal value to it.
Again... programmer choice is key.
>As to data types. Theres lots of times a more advanced user would WANT to use INTs rather than floating point numbers.
I'd say I'm an advanced user of Game Maker, but I wouldn't ever want the things you mentioned. Being an advanced GM user does not mean you suddenly make processor heavy games.
>And it's the advanced users that want and need the speed that this kind of option would give.
I'm not sure what advanced users you're talking of but if GM can't handle their games shouldn't they move on to something more powerful? GM was never meant for big processor heavy games.
Only someone who comes from a different programming language (like you) would want these things. But if you're used to your more advanced programming, will GM ever be good enough for you?
Game Maker can do plenty and computers are fast enough for us not to have to worry about ints or floats when making games. If someone really wants to do something technically impressive they're better off using C++ or what-have-you anyway.
GM is a game design tool and as you know making good games has little to do with how advanced your programming is.
Sure, if they're just optional it won't harm right? Maybe, but in my eyes it's a step in the direction of programming tool and a step away from game design tool.
Can't you make the world revolve around you?
Would make life for us [s]lesser being[/s] users much much happier!
Really object-oriented would make code so much cleaner. Ever looked at the way gamemaker uses datastructures?
list = ds_list_create() //so far so good
ds_list_add(list,...);
Now what if I am designing my game and thinking: "wait maybe queues fit better for this application, let's test it out".
I would have to go through every single piece where I use this list and change the functions. It would be much cleaner if I could write:
list = ds_list_create()
list.add(..)
and then also the queue has a the member function "add".. So I only had to change the creation of the list (and maybe some specific code which sets lists apart from queues).
On topic of data types:
Well I never understood why it is really difficult. Even at primary school you make a difference between "decimal numbers" and "whole numbers". And in real life you can easily identify: "hey this application uses whole numbers, and this uses decimals".
Also all that "optional" is bullshit: really gamemaker should have a clear concinse coding method. Actually allowing different practices leads to confusing I learned while teaching students physics.
People who don't completely understand the subject really get confused when they see a different way to do something. And if you're not quick on it, they soon start to make up things on their own. (Like "using && is faster than and").
Really a clear language which has easy simple rules is much easier to learn.
Also a better way to incorporate pluginns (for the executable thus effecitivily the role dlls have now?) is not only usefull, it is very very much needed. This would make most external resources faster, cleaner & easier to use.
Hey, what about the ability to properly pass arrays as arguments?
Also, I understand the parenting system has it's uses, but why can't we have proper inheritance as well? I can't remember how many times I've set up a system only to realize that I have to write tons of duplicate code because I need a step event in both the parent and it's child.
I think it would be better if scripts & functions could be called for specific object or variable. For example,
{
other.instance_destroy();
}. This would help getting rid of confusion and simplify coding of events.
As for targeting a variable, it would be usefull to be able to write scripts like:
name: incpi
code:
{
argvar += pi * argument0
}, and then use them like:
{
health.incpi(0.1)
}
It would be also nice to see the number of overloads increased (at least ++ and -- to be added).
Just my opinion.
Verbose typing? That's not even useful in C, why would you want to put it in Game Maker?
There are also far better improvements that could be made to GML than different-sized data types.
Speaking of, have you read any of the GM suggestions here?
I think the big difference is that you're a designer at heart Jesse, and your quite happy with the control you have over your program. However, folk that want to be dedicated coders will always look to get more speed, more control and nicer looking code. I know from past experience that's exactly what I wanted. I started with BASIC, then moved into assembler then Pascal, C, C++ and C#. Every time I shift, I look to get more and more out of it or I don't see any reason to swap.
I also don't think that adding some of these things (like types for example) will affect you at all! We're dedicated to keeping simple for folk, so if you don't want to use them, you won't have to. Currently Game Maker uses doubles throughout, but we know this is a serious performance hit, so while your games don't suffer, others might. This gives other developers another tool to get what they need to make the game they want. We will obviously try and automate things, but I don't see any reason not to allow folk to specify things; after all it can be a GREAT debugging tool as well.
A couple of other things you said; 1st about me coming from another language and so wanting certain features. No, I don't agree with that.... I've used lots of languages and I see the benefits of certain features. The main reason I want things like this is that it cleans up code, it can speed things up, but it also means I've got less typing and code maintenance - which is always good! I would never add features simply because it's in another language, it HAS to be truly useful and thing's like structures and types are definitely useful, participially as you get more experienced as a coder. I might do a post on how this can improve code at some point, because it's pretty important.
Lastly... you said "Game Maker can do plenty and computers are...blah blah". Well, on PC's this is very true, except for 2 things.
1) Low power computing is here to stay, so while BIG CPU's are getting faster, the little ones are now starting to become important as it becomes clear that most "home" computers don't have to be supercomputers.
2) Mobile platforms show that there's still PLENTY of low power devices out there that we want to take advantage of. Also remember that while the CPU might be fast, the OS might not be and does suck a lot of the power away so you always have to push the engine as much as you can.
Inheritance...Mmmm... interesting one... I've seen plenty of games that would benefit, and since there IS a parent/child thing going on inside Game Maker, I think it would be pretty simple to add this in. I think if the child uses the same variable then it overrides it, if it doesn't, it would get the parents.
Now that's not a huge change to users, but could be massive to experienced developers.... interesting.
And yes... you should be able to pass "anything" in as an argument.
Main things I want:
-Structs
-POINTERS!!! So useful
-Data types, I don't need floating point math to do "lives+=1;"
However, I must say I hate .Net, not that I have ever used or tried to use it, but because there really are no decent open alternatives. Microsoft could essentially wield it as a weapon.
Pointers!!! Are you NUTS! :)
No... def not. Pointers are horrible horrible things. Sure you can do some neat things with them, but 99.9% of the time you just want a handle to your object so you can use it, and that's all you'll ever get here. Pointer arithmetic is nasty, messy and bug prone.
C# does really well without them. In fact the only reason I use pointers in C# is to do stuff where the bounds checking is just too much, and they could solve that with a nobounds{ } context or something.
Nope... I hate pointers... :)
As to .NET, it has some massively cool features, and the language is not open source so Microsoft don't own it. MONO is a "free" and multi-platform solution that is actually ahead of Microsoft's version in a few areas.
I LOOOOOOOOOOOVE C# and .NET :)
That should have read the language IS open source... :P
" Which would be okay for beginners I think. I suspect the real GOAL of GML should be to make it open to beginners, but allow for experts to excel in it. "
Please keep always in your mind that.
The first thought came to me after reading all this, is: Can you make GML and GM a friendly monster to work in? I mean something superior but also easy( for my little life ) to make my games as fun as I can?
I leave in my fantasy world too... maybe. Programming it doesn't always stay connected with my ideas, or vice versa.
Okay... I stop here.
Change GML drastically? NO, just no. You guys shouldn’t even be discussing that. =P It took me around 2-3 years to begin to understand GML, if you rip it from me now I will be destroyed. =( I am thankful that this isn't what is happening.
Isn't the FSF boycotting Mono because of legal issues? Also, what about UNIX platforms? Can they handle .NET? Pretty much any competent platform on the planet is UNIX based...
I'd like the idea of data types, although I don't really see the point in it when today's computers are overpowered as it is. However, if this is implented, you should add real variable declaration. That way, debugging is a lot simpler, and (hopefully), we can wipe our variables from memory once we're done with them.
Post a Comment