Benefits of GML?

I

Ivan.

Guest
I am interested in learning how to code and i want to know some benefits GML offers vs other languages.
 
Z

zendraw

Guest
its most easy language to learn which also gives you alot of freedom to be creative in your coding. id say you wont find a better first stepping stone then this.
 
I

Ivan.

Guest
its most easy language to learn which also gives you alot of freedom to be creative in your coding. id say you wont find a better first stepping stone then this.
Ok ill give it a shot. Thank you.
 

Cpaz

Member
its most easy language to learn which also gives you alot of freedom to be creative in your coding. id say you wont find a better first stepping stone then this.
I'd say while I agree it's a fantastic stepping stone, it almost allows too much freedom. Just keep in mind proper syntax habits if you decide this is something you want to stick with.
 

GMWolf

aka fel666
GML in itself isn't that competitive with other languages.
However, the real advantage is the underlying engine, and API.
All the drawing, audio, and main loop is all handled for you.
It's much easier to get started with that as you can really visually see the impact your code has.
 
L

LuminousNutria

Guest
Firstly, there is no best language. They are all better at different things.

GML is fine, but it has some weird features because it is purely for use with gamemaker.

I know python and C++. GML is surprisingly similar to C++.

Other popular languages for beginners are python, Javascript, and C#.

I would suggest you start with something other than GML just because the gamemaker interface can add some complexity you don't need when you're just learning to code. It can also make it harder to check your work.

Check out the languages I mentioned and find the one best for you.

GML is mostly useful because of the gamemaker software it comes with. This can make game creation much easier, but IMO it's probably easier to learn to code in a simpler environment.

Once you know one language it is MUCH MUCH easier to learn others. Depending on how simple the language is, it may just take a couple hours.
 
Last edited by a moderator:

Kenshiro

Member
GML in itself isn't that competitive with other languages.
However, the real advantage is the underlying engine, and API.
All the drawing, audio, and main loop is all handled for you.
It's much easier to get started with that as you can really visually see the impact your code has.
This, plus the fact that GML has a very lax syntax which makes it very easy to use.
Imo it's a very good language in its purpose. Combined with GM's engine It makes everything very easy to prototype.
 

samspade

Member
I am interested in learning how to code and i want to know some benefits GML offers vs other languages.
It all depends on your goals. If you want to make 2d games, and don't have any coding experience, GML is probably the best language to start in. Probably has the lowest barrier to entry while still requiring you to learn code.
 

Pfap

Member
I never thought I would get into coding, but it's strange how one thing leads to another.... My personal story with Gamemaker is that it almost started out casual, nothing serious just having fun with code and sprites, but quickly spiraled into an obsession. Gamemaker is fun and as long as you keep learning you will be surprised at where it will lead you. Once, you have a decent simple game you might start to think, hey a leaderboard would be cool and next thing you know you're learning a server side language and interfacing it with GML and all of a sudden which language you work with doesn't matter... because there will be 10 of them. Besides, it all really comes down to problem solving and working with abstraction. Pick a language that excites you and you can have fun with and see where it goes. Gamemaker is really easy to write some code in put it in a room and then press play and see what happens.

Lua is good, but you have to handle all your own "math" GML has a lot of built in trigonometry and vector math functions that handle a lot of the thinking for you. You can also just find your own solution too as it is pretty open.

I think the biggest benefit of GML is that it is all contained in the Gamemaker IDE. If you want to write some GML code you open Gamemaker create an object write your code in it put it in the first room and press play. Other languages become a hassle to set up an environment I feel... I still don't know where I would write C++ code and press "play"... maybe visual studio? A lot of the other languages have environments that are harder to pin down. For instance, xcode is Apples' native environment and you can build applications with the objective c language, but what about python? JavaScript seems like an interesting choice that I have no experience with, but it is generally thought of as a language that you use to develop websites with. So a good place to start may be to determine what you want to do first. If that is to build a complete game then GML or rather Game Maker Language may be a strong choice.
 

The-any-Key

Member
The question itself is a bit strange.
GML have the benefits that you can use it in Game maker IDE.
If you try write other languages in the IDE you will get a surprise. Sure you can create extensions in other languages, but you don't do that in the IDE. And you still need GML to call and handle the extensions.

But if your question is about how the language behave and speed or how object oriented the language is.
I would say nodejs is the best language... for me, that will say. Others may love it less. I like more object oriented languages where you can very simple create an object with {} and add properties to it. You can very easy create variables that hold a script and put it in the object and execute it whenever you want... you can do complex things with speed and simplicity.
Sure, you can do that in GML too. But there is more steps to achieve similar structure.
 

Warspite2

Member
If anything it will get you used to working with code. I was surprised when I realized gml is a bit similar to c#. When I started messing around in unity it was like I already understood how a lot of the c# code works. I been using gml for years now.
 
D

Drago Supremo

Guest
I am interested in learning how to code and i want to know some benefits GML offers vs other languages.
I think that GML is very good for its own IDE because it is designed to fit it. It is also quite easy to learn especially if you are a beginner in coding because its syntax is quite flexible (for example if you write "=" in a "if" statement instead of "==" or if you miss a ";" it will still work as you want, while in C you may need an hour of debugging just to find out that you missed a "=").
 
T

Thunder Lion

Guest
I am interested in learning how to code and i want to know some benefits GML offers vs other languages.
I find it very simple and easy to read and adapt for many different coding goals within GML.

In fact I find if you are willing GML is better than using drag and drop.

Variable usage is a big deal in game maker and will allow you to really do some great things. Read the manual and try some simple projects. Save any useful systems you make. I had recently developes a multiple control setup game which allows me to switch and use keyboard or gamepad controls and even to choose custom keys/buttons to the player's liking. I have implemented it in 2 projects so far, one is conceptual the other is Quinlin.

I feel GML will really help you understand the rigures of coding and typing and troubleshooting, researcha and creative and critical thinking as at times you will likely make errors (but luckily game maker is much better at helping you find errors and is even more flexible than when I first used it back in game maker 6 before it became game maker studio 1 amd 2). This program is very fun and has the capacity to make legitimate games (check out youtube videos of game maker made games, very impressive). On top of that it also provides one of the easiest ways to develope for multiple platforms (of which I mess around with Windows and Android)
 
T

Thunder Lion

Guest
I think that GML is very good for its own IDE because it is designed to fit it. It is also quite easy to learn especially if you are a beginner in coding because its syntax is quite flexible (for example if you write "=" in a "if" statement instead of "==" or if you miss a ";" it will still work as you want, while in C you may need an hour of debugging just to find out that you missed a "=").
why is that?
 
D

dannyjenn

Guest
Costs money? What?
GameMaker Studio costs money (except for the free trial which is a bit limited in what you can do). If you're interested in really mastering GML, you'll need to purchase a GMS license. (Though I suppose you could dabble with it, even in the trial version...)


But yeah, GML really doesn't have many benefits. It's a scripting language designed to be used in GameMaker and only in GameMaker. If you plan on using GameMaker you'll want to learn GML, but if you don't plan on using GameMaker then there's no real point in learning GML except possibly for the learning experience (though you're better off "learning" to code by learning a more useful language).

But GML is a very easy language to learn, which in some ways is good and in other ways is bad. It's good if you're new to programming (especially if you want to use GML as a "stepping stone" to more difficult languages), but it's bad because this easiness comes with limitations (no explicit data types, for example) and could also reinforce sloppy coding habits (it's far more forgiving on syntax than most other languages, allowing newbies to inadvertently fall into the habit of using a single equals instead of a double equals, or leaving out semicolons, or whatever).

If you just want to learn a language to learn a language, I'd say try JavaScript. It's another easy language just slightly more difficult than GML, but it's more useful. Python is also easy (or so I've heard... I haven't personally worked with it much though). But if you learn one of these other languages you'll need to write the whole engine yourself, because these other languages don't have built-in step events, draw events, etc.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
GML isn't strictly tied to GameMaker - it is made for GameMaker, but that doesn't prevent anyone from implementing syntactically alike languages for any other purposes.

For example, I had personally implemented multiple such variants,
As for benefits, compared to similar scripting languages (JS, Lua), GML successfully had avoided series of common design mistakes,
  • `self.` prefix is optional for current instance's variable access (JS requires `this.`, Lua requires `self.` or custom context name).
  • Related to above, failing to specify scope for variable write does write it into the current instance rather than global scope (Lua) or semi-arbitrary scope ranging from global to current object's prototype (JS).
  • Semicolons are optional and end of statement is detected semantically rather than at end of line (JS problem). Lua similarly does without semicolons, save for a few exotic cases.
  • Operations on mismatching types yield proper errors instead of doing series of transformations that you may only grasp if you've read the language spec (JS).
As of it's own mistakes, GML as of yet relies on indexes instead of references for a plenty of things, which can make it easier to have mysterious bugs when using mismatched values or accessing data structures long after their destruction (at which point the index might be taken by a new data structure).

All in all, even if you don't intend to do games in GM for too long, it still makes for a good stepping stone on the way of learning C-style languages easier.
 
C

CptChuckles

Guest
I'll start off by saying I didn't understand the power of GameMaker until I learned C# and took those concepts back to GM.

If you want to "be a programmer", I think you should pick up a language that isn't tied to a game engine or specific environment--a language in which you write the whole application you're building. The endeavor to learn a programming language, however, must be approached with an open-mindedness towards not-so-pretty end-results, like console applications for example. If you appreciate what goes into them, though, and have a fascination for the logic and algorithms and planning that it takes to build even something as simple as a Bulls & Cows console game, then go for it. On the other hand, if you like highly visual results, just keep working with GML in GameMaker and eventually you will find yourself manipulating data in those not-so-apparent ways behind the scenes--and at that point, you'll have formed an appreciation for the ostensibly boring side of programming that opens the door for you to start learning those other languages that can't build GUI apps without a library.

My programming journey started with Visual Basic 3.0. I always wanted to make games, though, and VB doesn't really offer the tools to do that, so I had to get pretty creative. I could barely stretch my brain around the concept of a loop, as well, being a child. I would insert buttons and images into forms and write short sub-routines to give them behaviors. I still remember the first time I stumbled upon the technique of adding gravity every frame to a velocity variable to create parabolic platformer jumping. Shortly after this time period, I discovered DarkBASIC, a games-oriented programming language with no visual editing features at all, and began learning much more advanced techniques like structs and arrays for data, loops, vectors, and collision techniques, and started designing my code towards Obect-Oriented thinking in a language that didn't even facilitate OOP. I discovered GameMaker at some point during this, and despite making a modest topdown shooter primarily with D&D I never really took off with it. I was much more fascinated with DarkBASIC which gave me full reign over the environment and architecture I would work in, because I had to program everything myself, and because of this the worlds I built made much more sense to me. Eventually I came around to using GM more and more, and exchanged D&D for GML. I then stumbled onto the Unity engine, which appeared to be the next logical step from GameMaker into 3D and C#. I learned C# online from MSDN tutorials in order to work in Unity, which went well because of all the years of bumbling around in other languages and environments. When I finally grasped polymorphism, and came back to GM, the whole environment was made clear to me: Objects were classes, Events were executed through polymorphism. This formal understanding of the OOP theory underlying GM was certainly the last piece of the puzzle of being able to use GM and GML powerfully, but I had to attain that understanding from outside of GM. I now work with GM for fun, while I grow to master C++ and the Unreal engine. I look forward to moving on to learning the Rust programming language and rolling my own engine in it just for the hell of it.

So my suggestion is not to "learn a first language". Instead, just bumble around and make anything and everything you can, use every tool in your reach and anything that sounds cool. Eventually, the pieces will come together and you'll be in a position where "learning a language" is much more trivial, and you can actually sit down with a book and see why a language was designed to be the way that it is and why architecture is good or bad, because you've been there and struggled with that and had those bugs before and came to those realizations on your own. And the whole time, you were making cool things and showing off to your mom. It really doesn't matter how or where you start, only that you continue.
 
Top