[quote] The Game Maker Language (GML)
Game Maker contains a built-in programming language. This programming language gives you much more flexibility and control than the standard actions. This language we will refer to as GML (the Game Maker Language). In this section we describe the language GML and we give an overview of all the (close to 1000) functions and variables available to control all aspects of your game. [/quote]
I'll say that one of the best ones I have come across has to be GM Newton, specifically the Gmn_Init under World Interface.
[code]// GMNewton
//Call this script to initialize the DLL functions.
//Must be called before the DLL is used.
/* Initialize gm_newton.dll functions */
dll=working_directory+"\GMN.dll";
//show_message(string(file_exists(dll)))
//Newton World interface
global.__GmnCreateWorld__=external_define(dll,"GmnCreateWorld",dll_stdcall,ty_real,0);
global.__GmnDestroyWorld__=external_define(dll,"GmnDestroyWorld",dll_stdcall,ty_real,1,ty_real);
global.__GmnUpdateWorld__=external_define(dll,"GmnUpdateWorld",dll_stdcall,ty_real,1,ty_real);
global.__GmnSetSolverModel__=external_define(dll,"GmnSetSolverModel",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnSetWorldSize__=external_define(dll,"GmnSetWorldSize",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnVertBufferAdd__=external_define(dll,"GmnVertBufferAdd",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnVertBufferClear__=external_define(dll,"GmnVertBufferClear",dll_stdcall,ty_real,0);
global.__GmnWorldFreezeBody__=external_define(dll,"GmnWorldFreezeBody",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnWorldUnfreezeBody__=external_define(dll,"GmnWorldUnfreezeBody",dll_stdcall,ty_real,2,ty_real,ty_real);
//Newton Convex collision primitives interface
global.__GmnReleaseCollision__=external_define(dll,"GmnReleaseCollision",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnCreateNull__=external_define(dll,"GmnCreateNull",dll_stdcall,ty_real,1,ty_real);
global.__GmnCreateBox__=external_define(dll,"GmnCreateBox",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateSphere__=external_define(dll,"GmnCreateSphere",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateCone__=external_define(dll,"GmnCreateCone",dll_stdcall,ty_real,6,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateCylinder__=external_define(dll,"GmnCreateCylinder",dll_stdcall,ty_real,6,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateConvexHull__=external_define(dll,"GmnCreateConvexHull",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
//Newton Complex collision primitives interface
global.__GmnCreateTreeCollision__=external_define(dll,"GmnCreateTreeCollision",dll_stdcall,ty_real,1,ty_real);
global.__GmnTreeCollisionBeginBuild__=external_define(dll,"GmnTreeCollisionBeginBuild",dll_stdcall,ty_real,1,ty_real);
global.__GmnTreeCollisionAddFace__=external_define(dll,"GmnTreeCollisionAddFace",dll_stdcall,ty_real,11,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnTreeCollisionEndBuild__=external_define(dll,"GmnTreeCollisionEndBuild",dll_stdcall,ty_real,2,ty_real,ty_real);
//Newton Material groupID interface
global.__GmnMaterialGetDefaultGroupID__=external_define(dll,"GmnMaterialGetDefaultGroupID",dll_stdcall,ty_real,1,ty_real);
global.__GmnMaterialCreateGroupID__=external_define(dll,"GmnMaterialCreateGroupID",dll_stdcall,ty_real,1,ty_real);
global.__GmnMaterialDestroyAllGroupID__=external_define(dll,"GmnMaterialDestroyAllGroupID",dll_stdcall,ty_real,1,ty_real);
//Newton Material setup interface
global.__GmnMaterialSetDefaultCollidable__=external_define(dll,"GmnMaterialSetDefaultCollidable",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetContinuousCollisionMode__=external_define(dll,"GmnMaterialSetContinuousCollisionMode",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultFriction__=external_define(dll,"GmnMaterialSetDefaultFriction",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultElasticity__=external_define(dll,"GmnMaterialSetDefaultElasticity",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultSoftness__=external_define(dll,"GmnMaterialSetDefaultSoftness",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
//Newton Rigid body interface
global.__GmnCreateBody__=external_define(dll,"GmnCreateBody",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnDestroyBody__=external_define(dll,"GmnDestroyBody",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnBodyGetPosition__=external_define(dll,"GmnBodyGetPosition",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodyGetRotation__=external_define(dll,"GmnBodyGetRotation",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodySetPosition__=external_define(dll,"GmnBodySetPosition",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetRotation__=external_define(dll,"GmnBodySetRotation",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetMass__=external_define(dll,"GmnBodySetMass",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodyAddForce__=external_define(dll,"GmnBodyAddForce",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodyAddTorque__=external_define(dll,"GmnBodyAddTorque",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetMaterialGroupID__=external_define(dll,"GmnBodySetMaterialGroupID",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodySetAutoFreeze__=external_define(dll,"GmnBodySetAutoFreeze",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
//collision events
global.__GmnCollisionEventCount__=external_define(dll,"GmnCollisionEventCount",dll_stdcall,ty_real,0);
global.__GmnCollisionEventGet__=external_define(dll,"GmnCollisionEventGet",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnCollisionEventClear__=external_define(dll,"GmnCollisionEventClear",dll_stdcall,ty_real,0);
[/code]
Rage of real programmers comes below.
That doesn't do anything other than binding to the newton dll.
[QUOTE=windwakr;20764369]I remember Gamemaker, I played around with it when I was like 13. Got bored of it, so I moved onto coding Assembly.
Wow, it's been around 6 years since I started learning Assembly....where does the time go?[/QUOTE]
You learned assembly at 13?
:patriot:
[QUOTE=windwakr;20764369]I remember Gamemaker, I played around with it when I was like 13. Got bored of it, so I moved onto coding Assembly.
Wow, it's been around 6 years since I started learning Assembly....where does the time go?[/QUOTE]
cool guy alert
haha. why assembly though?
having knowledge in only assembly will get you nowhere.
It can, you can for example program microcontrollers and stuff with it.
But anyway, lets go back on topic.
[QUOTE=Mataata;20764169]I'll say that one of the best ones I have come across has to be GM Newton, specifically the Gmn_Init under World Interface.
[code]// GMNewton
//Call this script to initialize the DLL functions.
//Must be called before the DLL is used.
/* Initialize gm_newton.dll functions */
dll=working_directory+"\GMN.dll";
//show_message(string(file_exists(dll)))
//Newton World interface
global.__GmnCreateWorld__=external_define(dll,"GmnCreateWorld",dll_stdcall,ty_real,0);
global.__GmnDestroyWorld__=external_define(dll,"GmnDestroyWorld",dll_stdcall,ty_real,1,ty_real);
global.__GmnUpdateWorld__=external_define(dll,"GmnUpdateWorld",dll_stdcall,ty_real,1,ty_real);
global.__GmnSetSolverModel__=external_define(dll,"GmnSetSolverModel",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnSetWorldSize__=external_define(dll,"GmnSetWorldSize",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnVertBufferAdd__=external_define(dll,"GmnVertBufferAdd",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnVertBufferClear__=external_define(dll,"GmnVertBufferClear",dll_stdcall,ty_real,0);
global.__GmnWorldFreezeBody__=external_define(dll,"GmnWorldFreezeBody",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnWorldUnfreezeBody__=external_define(dll,"GmnWorldUnfreezeBody",dll_stdcall,ty_real,2,ty_real,ty_real);
//Newton Convex collision primitives interface
global.__GmnReleaseCollision__=external_define(dll,"GmnReleaseCollision",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnCreateNull__=external_define(dll,"GmnCreateNull",dll_stdcall,ty_real,1,ty_real);
global.__GmnCreateBox__=external_define(dll,"GmnCreateBox",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateSphere__=external_define(dll,"GmnCreateSphere",dll_stdcall,ty_real,7,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateCone__=external_define(dll,"GmnCreateCone",dll_stdcall,ty_real,6,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateCylinder__=external_define(dll,"GmnCreateCylinder",dll_stdcall,ty_real,6,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnCreateConvexHull__=external_define(dll,"GmnCreateConvexHull",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
//Newton Complex collision primitives interface
global.__GmnCreateTreeCollision__=external_define(dll,"GmnCreateTreeCollision",dll_stdcall,ty_real,1,ty_real);
global.__GmnTreeCollisionBeginBuild__=external_define(dll,"GmnTreeCollisionBeginBuild",dll_stdcall,ty_real,1,ty_real);
global.__GmnTreeCollisionAddFace__=external_define(dll,"GmnTreeCollisionAddFace",dll_stdcall,ty_real,11,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnTreeCollisionEndBuild__=external_define(dll,"GmnTreeCollisionEndBuild",dll_stdcall,ty_real,2,ty_real,ty_real);
//Newton Material groupID interface
global.__GmnMaterialGetDefaultGroupID__=external_define(dll,"GmnMaterialGetDefaultGroupID",dll_stdcall,ty_real,1,ty_real);
global.__GmnMaterialCreateGroupID__=external_define(dll,"GmnMaterialCreateGroupID",dll_stdcall,ty_real,1,ty_real);
global.__GmnMaterialDestroyAllGroupID__=external_define(dll,"GmnMaterialDestroyAllGroupID",dll_stdcall,ty_real,1,ty_real);
//Newton Material setup interface
global.__GmnMaterialSetDefaultCollidable__=external_define(dll,"GmnMaterialSetDefaultCollidable",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetContinuousCollisionMode__=external_define(dll,"GmnMaterialSetContinuousCollisionMode",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultFriction__=external_define(dll,"GmnMaterialSetDefaultFriction",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultElasticity__=external_define(dll,"GmnMaterialSetDefaultElasticity",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
global.__GmnMaterialSetDefaultSoftness__=external_define(dll,"GmnMaterialSetDefaultSoftness",dll_stdcall,ty_real,4,ty_real,ty_real,ty_real,ty_real);
//Newton Rigid body interface
global.__GmnCreateBody__=external_define(dll,"GmnCreateBody",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnDestroyBody__=external_define(dll,"GmnDestroyBody",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnBodyGetPosition__=external_define(dll,"GmnBodyGetPosition",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodyGetRotation__=external_define(dll,"GmnBodyGetRotation",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodySetPosition__=external_define(dll,"GmnBodySetPosition",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetRotation__=external_define(dll,"GmnBodySetRotation",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetMass__=external_define(dll,"GmnBodySetMass",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodyAddForce__=external_define(dll,"GmnBodyAddForce",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodyAddTorque__=external_define(dll,"GmnBodyAddTorque",dll_stdcall,ty_real,5,ty_real,ty_real,ty_real,ty_real,ty_real);
global.__GmnBodySetMaterialGroupID__=external_define(dll,"GmnBodySetMaterialGroupID",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
global.__GmnBodySetAutoFreeze__=external_define(dll,"GmnBodySetAutoFreeze",dll_stdcall,ty_real,3,ty_real,ty_real,ty_real);
//collision events
global.__GmnCollisionEventCount__=external_define(dll,"GmnCollisionEventCount",dll_stdcall,ty_real,0);
global.__GmnCollisionEventGet__=external_define(dll,"GmnCollisionEventGet",dll_stdcall,ty_real,2,ty_real,ty_real);
global.__GmnCollisionEventClear__=external_define(dll,"GmnCollisionEventClear",dll_stdcall,ty_real,0);
[/code][/QUOTE]
I hope you're being sarcastic, since that script is just forwarding a bunch of DLL functions. How is this 'genius' in even a remote way.
I remember playing around with Game Maker a lot. It taught me the basics of OOP. Even won a national contest with it.
[QUOTE=Ortzinator;20773329]You learned assembly at 13?
:patriot:[/QUOTE]
Assembly languages are extremely simple. if you already know something like GML, moving to some assembly flavour isn't hard, especially not x86 assembly. Assembly is arguably a lot easier to learn than higher level languages like C; you're always right next to the machine, there are fewer abstract concepts to learn. Understanding macros is a matter of understanding copy-paste.
(Unfortunately, the same lack of complexity makes assembly code largely unscalable, unmaintainable, unproductive (although mitigated by macros) and difficult to debug (also mitigated by advanced macro support).)
Assembly is good fun, although i've only worked with 16 bit real mode assembly, none of this fancy newfangled 32 bit business
This thread made me laugh.
[QUOTE=majorlazer;20773975]having knowledge in only assembly will get you nowhere.[/QUOTE]
You are so ignorant of the job market that it's ridiculous.
Seriously.
He's right though, assembly is a niche market and havin knowledge in ONLY it will probably get you nowhere. However, if you can take those skills and that type of thinking and take them to a more
common language, you're in business.
Don't think there's a large market for Assembly programmers. You're more productive in C/C++, and I read that the compilers don't perform any worse than writing it all in Assembly yourself.
I love how a Game Maker thread turned into a professional programming discussion.
I get so sick of head-up-the-ass programmers wanting everyone to become professionals.
Sometimes people want to write their own logic, but they want to do so quickly and easily. Scripting languages are fine. C++ is overkill.
Hobby projects and professional programming projects have totally different needs, and anyone that recommends C++ to a curious hobbyist is probably more interested in tooting their own horn than in actually helping anyone.
[QUOTE=Clavus;20777864]Don't think there's a large market for Assembly programmers. You're more productive in C/C++, and I read that the compilers don't perform any worse than writing it all in Assembly yourself.[/QUOTE]There are optimizations that compilers will overlook, but spending much more time to write it in Assembly isn't cost-effective, and the resulting code is harder to debug.
In the end, the benefits of writing in high-level languages far outweigh the cons. Assembly is fun and all, but it isn't practical for professional usage.
[QUOTE=windwakr;20764369]I remember Gamemaker, I played around with it when I was like 13. Got bored of it, so I moved onto coding Assembly.
Wow, it's been around 6 years since I started learning Assembly....where does the time go?[/QUOTE]
Oh neat, you learned ASM the same age as I did.
...Wanna touch dicks? :3:
[QUOTE=jA_cOp;20776465]Assembly languages are extremely simple. if you already know something like GML, moving to some assembly flavour isn't hard, especially not x86 assembly. Assembly is arguably a lot easier to learn than higher level languages like C; you're always right next to the machine, there are fewer abstract concepts to learn. Understanding macros is a matter of understanding copy-paste.
(Unfortunately, the same lack of complexity makes assembly code largely unscalable, unmaintainable, unproductive (although mitigated by macros) and difficult to debug (also mitigated by advanced macro support).)[/QUOTE]
I wasn't saying it was hard, I was commenting on the attention span required. Even as much as I love computers, I didn't have the patience to learn a programming language until I was 16-17. Not sure what the dumbs were for.
[QUOTE=Ortzinator;20778993]I wasn't saying it was hard, I was commenting on the attention span required. Even as much as I love computers, I didn't have the patience to learn a programming language until I was 16-17.[/QUOTE]
But that means... I thought you were younger! :v:
[QUOTE=Ortzinator;20778993]Not sure what the dumbs were for.[/QUOTE]
Don't know, maybe the flag thing? Seemed pretty random. Wasn't me, iirc :ninja:
[QUOTE=windwakr;20778444]
It may be somewhat simple to learn what each of the instructions do, but let me see you take a large section of assembly code and tell me what it does. It's not always clear when compared to something like C/C++, especially when specific optimizations are used.[/QUOTE]
Compare to the same optimized C code and you'll see that it's of comparable complexity. Assembly often gives you access to more specialized instructions and the simplicity of the syntax means that you typically need more source code to do the same task, but apart from that, C is pretty much just "portable assembly".
[QUOTE=windwakr;20778444]I'd say in the long run, C/C++ would be miles easier to master than assembly.[/QUOTE]
It's obvious that you don't actually know them very well though, as the mastery of either is completely unrelated to the mastery of the other. They are two widely different programming languages.
[QUOTE=-SC-Lakitu;20778556]Assembly is fun and all, but it isn't practical for professional usage.[/QUOTE]
It's extremely practical in low-level code though, often as inline assembly in higher level languages. It's also practical for super-optimizing bottlenecks in performance-critical code. But yeah, you probably meant that it isn't practical for application layer code, in which case I agree.
[QUOTE=Metanoia;20778154]I love how a Game Maker thread turned into a professional programming discussion.
[/QUOTE]
It always does.
I like Game Maker, but I used it less and less after it practically stopped updating (the new company in charge of its development, YoYo Games, isn't exactly rolling out new Game Maker versions each month). Tools like LÖVE provide a decent physics engine and better graphics system.
[QUOTE=Clavus;20777864]Don't think there's a large market for Assembly programmers. You're more productive in C/C++, and I read that the compilers don't perform any worse than writing it all in Assembly yourself.[/QUOTE]
In some M$ libraries, theres some ASM code in the files themselves. And the C++ std library.
[QUOTE=jA_cOp;20788075]
It's extremely practical in low-level code though, often as inline assembly in higher level languages. It's also practical for super-optimizing bottlenecks in performance-critical code. But yeah, you probably meant that it isn't practical for application layer code, in which case I agree.[/QUOTE]
Yeah, that's what I meant. And super-optimization doesn't always have to be written in Assembly. C is sufficient in many cases, and translates well to ASM anyway.
[QUOTE=-SC-Lakitu;20789607]C is sufficient in many cases, and translates well to ASM anyway.[/QUOTE]
Of course, it only makes sense to use inline assembly when strictly necessary to improve performance where needed. Often, it's even better to leave it to the compiler after writing the improvement in C, after all, the code optimizer is written by people who know a lot better than most how to best optimize a piece of code.
-wtf, this wasn't supposed to go here-
Sorry, you need to Log In to post a reply to this thread.