I had a crazy idea last night: what if you could use GML statements in C++? Let me explain it better:
I figured that you could make a .cpp file that contains functions named same as statements in GML. Then you could simply include this file in the same manner you include your normal C++ libs. Offcourse, this is really simplyfied explanation.
So, when you write draw_text(0,0,"Hello World") it would acctualy call function that looks like this:
void draw_text(int x, int y, string text)
{
cout << text
}
Here the x and y acctualy do nothing but you get the picture. So, programming in C++ would be like creating a "one script game" with all code written in room creation event. Just imagine it: simplicity of GML with power of C++!
I didn't say it will be easy. I didn't say I can do it right now, I'm starting college soon and I'll probably take C++ there. As I allready know a bit of C I belive I won't have much troubles learning it. And good ol' GM gave me idea of how OOP works. I plan to gain egnouh skill to make a pong game in C++ and then try to tackle this thing (probably adding egnouh functions so you can make a pong game).
So, do you think it's possible? Do you even think it would be usefull?
Comence commentig!
Well you cud do it but it would be kind of pointless i don't see the point in making it.
Or just learn C++
That sounds great, and would be a great learning project for you. I'd rather code in DX though.
It'd function like the Dark Game SDK then?
Also, there is a way to get the x and the y to work. I'm not sure how, but I know there is, since using the Dark Game SDK you have to be able to use set_cursor… but whatever.@Eternal - offcourse it's possible. I just whiped out this one fast. And, as I allready said, I don't know much C++ right now, but that will soon change.
I'd start by making a C++ to GML converter that way it takes a step out of the work for them, easier than library programming, and you could mess with C++ code after.
GameHawk is dumb.
Why am I dumb?
ChIkEn is tasty.