Jump to content


Photo

Playgate Framework


  • Please log in to reply
17 replies to this topic

#1 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 09:29 AM

Posted Image


Title: PlayGate Framework

Species: C++ & GML Framework

Description:

PlayGate it's:
The system by which you can connect GML with C++, it's will allow for greater (and even the total) to safeguard and improve the efficiency of games operation. In this version, there is no encryption algorithm, so it is possible only partial decompilation of generated module (GML code cut into pieces, but rather unable to do so throughout the GML game only on pieces of code - the rest of a valid code, remains in the module as the active variables ;p). The license, informations and example how to use, are placed in the file "PlayGateFramework.cpp". Framework was written in Dev-C++ IDE 4.9.9.2 and I recommend it to use. It may be useful, although basic knowledge of C++.
How can we use PlayGate?
Your best way, may be to place the pursuit of individual GML code, which will behave as normal GM application, but you can also get information from GM, to collect them and then use with other C++ components (various sophisticated calculations, which will perform faster than GM would have to do this). PlayGate uses GMThreads (author: Snake) so that we can produce code GML only when you want and wait for the result and adequately perform the next command.


Download:
RAR: http://gmclan.org/up...mework_1_0.html
ZIP: http://gmclan.org/up...mework_1_0.html
File size: 1475KB

YoYoGames: http://www.yoyogames...ames/show/48572


Authors:

Programming: PsichiX (PlayGate Framework) + Snake (GMThreads)
Graphics: PsichiX

Screens:

http://xs130.xs.to/x...screen01875.jpg
http://xs130.xs.to/x...screen02955.jpg


TODO list:

^ Tools for creating encrypted resources, which will be loaded and decrypted.
^ Examples of different methods of building applications using PlayGate.


Enjoy :GM056:
ΨΧΞ

Edited by PsichiX, 14 August 2008 - 11:07 AM.

  • 0

freckles_sign.png


#2 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 14 August 2008 - 09:39 AM

I don't know what it is.
  • 0

#3 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 09:44 AM

This is the c++ dll framework and GM interface. It is intended to protect game, against decompilation.
  • 0

freckles_sign.png


#4 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 14 August 2008 - 09:49 AM

How does it work? Something awful happened to the formatting in PlayGate.h and GMThreads.h
  • 0

#5 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 09:53 AM

Open "PlayGate.dev" in DevC++ and see an example of how to use GML code. You can edit the relevant sections, and then build the DLL and running GM game written in C++, additionally protected.

Edited by PsichiX, 14 August 2008 - 09:57 AM.

  • 0

freckles_sign.png


#6 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 14 August 2008 - 10:05 AM

I still don't really understand what this is supposed to do but the code could use a lot of improvement.

It seems you've written a C program with sprinklings of C++, you're not really taking advantage of C++ features and you're clinging to deprecated C functions, like strtod where it would be better to use something like Boost's lexical_cast, and using char strings where it would be better to use STL strings. Also, the documentation in the comment at the top of PlayGateFramework doesn't match the functions.

PlayGate::ExecuteResult is a void (int, string) in the comment, but void (int, int, string) in the code.
  • 0

#7 johnie102

johnie102

    GMC Member

  • New Member
  • 1608 posts

Posted 14 August 2008 - 10:11 AM

By not looking at the code (I wouldn't understand it anyway) I think that this is supposed to execute GML code from inside a C++ source, so that that source code can't be decompiled.
  • 0
Have I helped you? Thank me by playing my game


note that these graphics aren't in game... yet!

GENERATION 22: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

#8 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 10:16 AM

For now, only a part of GML code can be decompile.
The next version will contain the encryption and decription algorithm.
  • 0

freckles_sign.png


#9 fire_soul453

fire_soul453

    aarons video games

  • GMC Member
  • 542 posts

Posted 14 August 2008 - 11:19 AM

So, this lets us hide some gml code in the dll making it very hard to get to? Sounds useful.
  • 0
Game maker Top sites
I'm sick of paypal. From now on I'm not buying indie games unless I can use something else...

#10 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 11:31 AM

PlayGate also makes the game written in c++ is faster than the game written in GM

Edited by PsichiX, 14 August 2008 - 11:32 AM.

  • 0

freckles_sign.png


#11 johnie102

johnie102

    GMC Member

  • New Member
  • 1608 posts

Posted 14 August 2008 - 01:27 PM

PlayGate also makes the game written in c++ is faster than the game written in GM


Have you tested this? How would you make GML written in C++? It all needs to be parsed, right?
  • 0
Have I helped you? Thank me by playing my game


note that these graphics aren't in game... yet!

GENERATION 22: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

#12 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 14 August 2008 - 04:24 PM

Its actually slower, as it uses execute_string (as far as I know). Also, it lags if your PC is stressed, but that could be changed in priority argument in gm threads. With lags I mean, that in your example a lot of times the buttons didn't work because my cpu used.
  • 0

#13 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 14 August 2008 - 04:46 PM

Strange .. but it does not use execute_string()
  • 0

freckles_sign.png


#14 fire_soul453

fire_soul453

    aarons video games

  • GMC Member
  • 542 posts

Posted 14 August 2008 - 08:27 PM

I try to compile and get
[Build Error] exe: *** No rule to make target `PlayGate_private.rc', needed by `PlayGate_private.res'. Stop.

Have no idea why.

All I did was add
PlayGate.Execute(3,0,"PlayGateReturnDouble(show_message('hello world');)");
(just seeing if I could get it to work)


Anyway a tutorial would be nice

Edited by fire_soul453, 14 August 2008 - 08:31 PM.

  • 0
Game maker Top sites
I'm sick of paypal. From now on I'm not buying indie games unless I can use something else...

#15 fire_soul453

fire_soul453

    aarons video games

  • GMC Member
  • 542 posts

Posted 17 August 2008 - 02:13 AM

Ok I got it to work.
First of all I had spaces in the directory (you cant have those)
It still didn't work for me so I tried compiling with wxDev-C++ 6.10.2.

So I finally got it to work. I go the message Hello world to pop up (to bad GMThreads has a bug that prevents you from being able to press ok, but then I dont have to use them).

So I would like to say thanks!
This is simply amazing.
I plan on using this.
  • 0
Game maker Top sites
I'm sick of paypal. From now on I'm not buying indie games unless I can use something else...

#16 grumpymonkey

grumpymonkey

    GMC Member

  • GMC Member
  • 1011 posts

Posted 18 August 2008 - 04:35 PM

so..this turns GML into C++ coding so it cant be decompiled? or does it turn ur game into a c++ game? OR is it something that makes sense? (unlike what i said :lol:)

Edited by grumpymonkey, 18 August 2008 - 04:35 PM.

  • 0

Posted Image


#17 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 18 August 2008 - 05:03 PM

Strange .. but it does not use execute_string()

GMThreads uses execute_string. It uses a little hack to get to GM functions. The only function needed is execute_string.
  • 0

#18 fire_soul453

fire_soul453

    aarons video games

  • GMC Member
  • 542 posts

Posted 18 August 2008 - 08:02 PM

so..this turns GML into C++ coding so it cant be decompiled? or does it turn ur game into a c++ game? OR is it something that makes sense? (unlike what i said :lol:)

No but you can hide some gml in it. It will use gmthreads to run your gml. You can also use c++.
Like you could get some variables from game maker and run the equations though c++ (Faster, but it takes away some speed because it has to be put back in game maker). If your gm program had to do some advanced math (or just a lot of math). It would be faster to do it in c++.

It is slower to run gml in this because it has to get it from the dll and then put it in game maker, but you can hide some of your gml in this. (like maybe your file encryption's for resource files or something)
  • 0
Game maker Top sites
I'm sick of paypal. From now on I'm not buying indie games unless I can use something else...