Jump to content


Photo

Create Exes With Gml (tut+gml+sample Program)


  • Please log in to reply
90 replies to this topic

#41 microbot

microbot

    Rating: Mostly Harmless

  • New Member
  • 151 posts

Posted 04 April 2008 - 02:24 AM

Im usually ok with programming but I must not be understanding this correctly ?
This technique allows the adding extra GML code to your compiled GML code ? that cant be right because whats the point of that ?

Im sorry to ask this but can someone explain what this is for ?
  • 0

#42 Doogie_Forever

Doogie_Forever

    Dog Warrior

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

Posted 04 April 2008 - 02:34 AM

Im usually ok with programming but I must not be understanding this correctly ?
This technique allows the adding extra GML code to your compiled GML code ? that cant be right because whats the point of that ?

Im sorry to ask this but can someone explain what this is for ?


MMORPG's, people could update the EXEs.

Game Creators, allow people to "compile" their games.

EDIT: Wow this method is very clever, I wonder if I could store a file at the end and rewrite it out of the exe. Hmmm this method is very good.

Edited by Doogie_Forever, 04 April 2008 - 02:42 AM.

  • 0

#43 microbot

microbot

    Rating: Mostly Harmless

  • New Member
  • 151 posts

Posted 04 April 2008 - 03:09 AM

My GM5.3a allows me to compile my GML source code to .exe

I still dont understand what this post is for ??? sorry could you explain again

Thank You

Edited by microbot, 04 April 2008 - 03:09 AM.

  • 0

#44 Doogie_Forever

Doogie_Forever

    Dog Warrior

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

Posted 06 April 2008 - 12:17 PM

Ok here is the deal.

Imagine you are making a platform maker in Game Maker. You want YOUR program to make EXE's, so this script allows you to add code to the end of the file, allowing for the player to be able to make their own EXE files.

In short, imagine you compile your Game Maker game, this allows you to add code to the END of your compiled game maker game (EXE) and run it.

Edited by Doogie_Forever, 06 April 2008 - 12:19 PM.

  • 0

#45 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 06 April 2008 - 04:29 PM

Hmm... what do we do once GM 8 has been released? How can we add new code to that EXE then? (IF possible, of course)

- Fede-lasse
  • 0

#46 cbruno (brazil)

cbruno (brazil)

    GMC Member

  • New Member
  • 56 posts

Posted 06 April 2008 - 08:47 PM

I am creating my program to create games, which for now only creates files. Xg4 (X - Gamer 4 Games), tell me, how do I save the game on file. Exe?
  • 0

#47 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 10 April 2008 - 08:28 PM

I didn't notice this was replied to so sorry for me being late!

I'll start from the start:
@ microbot - As said this could create varieties of the same program made be GM. The basic difference between each variety is that it has some extra code/text/data. Then when that 'new' exe runs, it does things according to the extra piece of code. Making it run differently then it was supposed to when created by GM.

@Doogie_Forever - Thanks for helping out <_<

@Fede-lasse - As far as I remember, there isn't any code dependent on gm6/7 or lowwer so theoretically it should still work. The interpreter even in gm8 should still use GM exe's as right now I believe, so that doesn't present a problem of corruption either.

@cbruno - Sorry I can't explain it any further: I wrote both tutorial and the sources, so please read them carefully and those should get you going after a while.
  • 0

#48 microbot

microbot

    Rating: Mostly Harmless

  • New Member
  • 151 posts

Posted 15 April 2008 - 01:05 AM

Thanks for explaining (I must have been having a dumb day)

I was thinking why not include the extra script in a .txt file and have the game open that file and execute the code from there but this would mean that anybody could edit the script file that was supplied with the .exe so I see that by including the customization script into the .exe you can prevent this (non-advanced users)
  • 0

#49 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 16 April 2008 - 05:06 PM

@ Nanobot - Yes. This also means the exe is more portable. There are some disadvantages though. The exe can't change itself while it is running. But there is a very easy way to do so. You could somehow instruct another exe (which might have been extracted from the main exe) to change the main exe after the main exe is closed. Still I'm sure there are some Windows API which could also do the trick.
  • 0

#50 Pie Person!

Pie Person!

    GM 6+ Lover

  • GMC Member
  • 1973 posts

Posted 23 May 2008 - 11:15 PM

This is pretty awesome. Thanks!
  • 0

#51 acrog2

acrog2

    average user

  • GMC Member
  • 1118 posts

Posted 24 May 2008 - 08:37 PM

could this not be made WAY faster by using
obj = object_add()
object_event_add(obj,ev_create,0,createcode)
object_event_add(obj,ev_step,ev_step_normal)
object_event_add(obj,ev_draw,0)
instance_create(x,y,obj)
that gets around execute_string() every step/draw event. I havent tested it with you example, but I see no reason this won't work

edit- here is my example. It doesn't use your tutorial , but uses the same idea.
-acrog2

Edited by acrog2, 24 May 2008 - 09:28 PM.

  • 0

#52 Samuka97

Samuka97

    GMC Member

  • GMC Member
  • 465 posts
  • Version:Unknown

Posted 25 May 2008 - 12:06 PM

Hes Brazilian, much like me.
He wants a gm6 because its not working at his gm6.
  • 0

#53 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 25 May 2008 - 05:44 PM

acrog2 - It's been said all over that that is not what was intended by this demo.
Still it is nice of you to give us some examples.
  • 0

#54 Craig Davidson

Craig Davidson

    GMC Member

  • GMC Member
  • 120 posts

Posted 24 July 2008 - 05:00 AM

How can you allow the program to read filenames, like BMP or JPEG or WAV, in the same way as a string and as well as strings? :P :) :)
  • 0

#55 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 26 July 2008 - 06:01 AM

I can't get what you exactly mean.
Do you want to save a file name / extension into the exe and load it back?
  • 0

#56 posva

posva

    GMC Member

  • New Member
  • 610 posts

Posted 09 August 2008 - 09:55 AM

and it's there any way to modify the included files by creating the exe or tha's not possible?
  • 0

#57 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 09 August 2008 - 06:08 PM

You can change that by changing the gm source code.
  • 0

#58 posva

posva

    GMC Member

  • New Member
  • 610 posts

Posted 09 August 2008 - 06:38 PM

what do you mean ? i don't understand it
  • 0

#59 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 29 August 2008 - 08:11 PM

@ Posva - Yes you can. That's why the with the included exes there is also the gm source.
  • 0

#60 posva

posva

    GMC Member

  • New Member
  • 610 posts

Posted 29 August 2008 - 09:14 PM

i know that i can edit the included files on the GM source and create a new exe but what i want is to modify that exe witha n other exe (the same with what you set the create , step and game end events, thanks for replying
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users