Jump to content


Photo

Process Runner


  • Please log in to reply
16 replies to this topic

#1 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 26 February 2008 - 01:53 AM

Process Runner
Create GML Processes to Execute Regularly

GM Version: 7.0
Extension Version: 1.30
File Type: .zip containing extension and .pdf help file
File Size: 174-176kb (178,204 - 180,224 bytes)

DOWNLOAD:
Ripway - v1.30
64Digits - v1.30
Help File (.pdf, 64digits)

Desciption: Create, modify and delete processes. Processes are piece of GML code that execute on a regular basis, in a user chosen event. There is a help file with a tutorial in the .zip file.

What are some uses for "Process Runner"?
Well, it can be used for simple things but for the most part, that is a waste. It was created with AI in mind. In stead of trying to keep track of a huge switch statement or a bunch of different object for different AI states, you can create a process for each state and just switch between them.

Functions:
process_init();
Requires no functions. Must be called before any other process_ functions will work.

process_step();
Calls all processes code. Put this into the event in which you want all the code executed in, I advise the draw event so that it is executed as though in the step event, but allows the use of drawing function.

process_create(name, code);
Creates a new process with the given name and code. The code argument must be a string.

process_create_ext(name, code, object, initial state);
An extended version of process_create. Using this you can set what object the code is executed by (in process_create the code is executed by the object that created the process) and weather the process should start paused (0) or not (1).

process_delete(name);
Deletes the given process. Obviously, the process must exist for this to work.

process_start(name);
Starts a paused process.

process_stop(name);
Stops a running process. Stop processes won't run.

process_toggle(name);
Stops a running process and starts a paused one.

process_get_code(name);
Returns the code of the given process.

process_get_obj(name);
Returns the object of the given process.

process_get_state(name);
Returns the state of the given process.

process_local_init();
Requires no functions. Must be called before any other process_local_ functions will work.

process_local_step();
Calls all local processes code. Put this into the event in which you want all the code executed in, I advise the draw event so that it is executed as though in the step event, but allows the use of drawing function.

process_local_create(name, code);
Creates a new local process with the given name and code. The code argument must be a string.

process_local_create_ext(name, code, object, initial state);
An extended version of process_local_create. Using this you can set what object the code is executed by and weather the process should start paused (0) or not (1).

process_local_delete(name);
Deletes the given local process. Obviously, the local process must exist for this to work.

process_local_start(name);
Starts a paused local process.

process_local_stop(name);
Stops a running local process. Stop local processes won't run.

process_local_toggle(name);
Stops a running local process and starts a local paused one.

process_local_get_code(name);
Returns the code of the given local process.

process_local_get_obj(name);
Returns the object of the given local process.

process_local_get_state(name);
Returns the state of the given local process.

string_encrypt(string, key);
Encrypts string using the password key. Credit to xDanielx.

string_decrypt(string, key);
Decrypts string using the password key. Credit to xDanielx.

Changes in v1.10:
Bug fix - Fixed a bug preventing the extensions use due to a mis-spelling. - liverol

Changes in v1.20:
Bug fix - Fixed the helpline for process_init. - Kyle_Solo
Detailing - Removed the ; from the end of functions so it blends better with default GML commands. - Kyle_Solo
New Feature - Added support for local processes, so that you can have processes with the same name.

Changes in v1.30:
Bug fix - Fixed another fatal error cause a typo.
New Feature - Added encryption to tighten security hole. - Kyle_Solo

Edited by Timmeh, 27 February 2008 - 10:47 PM.

  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#2 liverol

liverol

    GMC Member

  • GMC Member
  • 179 posts

Posted 26 February 2008 - 05:04 AM

got error:
-----------------------------------------------------------------------------
COMPILATION ERROR in extension package Process Extension
Error in code at line 8:
temp=implode_string("~", "array", 3)

at position 7: Unknown function or script: implode_string
----------------------------------------------------------------------
and when i input implode_string,the gm code editor show that the funcion :impload_string....,so i think you spell the words wrong in
the extension. !:)
  • 0

#3 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 26 February 2008 - 02:09 PM

Thank you! I will fix asap!

[EDIT]: It should work now. Ripway appears to be down, so I've only been able to update the 64digits link. I will update the Ripway one as soon as I find it up. Thanks again!

Tim

Edited by Timmeh, 26 February 2008 - 02:15 PM.

  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#4 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 26 February 2008 - 10:43 PM

hmm, i don't understand what this can do :\
  • 0

#5 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 27 February 2008 - 12:46 AM

The new version has been uploaded to both sites.

hmm, i don't understand what this can do :\

<{POST_SNAPBACK}>

It allows you to create, delete and run processes, which are pieces of GML code. For example, you could create a process with the code "x+=4" and then it would execute it at whatever interval you choose. While this is not the most efficiant use, it gives a basic example. I believe I wrote a better description in the help file if you don't mind the download.
  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#6 Kyle_Solo

Kyle_Solo

    GMC Member

  • GMC Member
  • 1071 posts
  • Version:Unknown

Posted 27 February 2008 - 01:08 AM

Using execute_string opens a huge security hole, allowing resources to be stolen from your game. It is also rather slow, and should not be called every step.

Clever idea though.
  • 0

#7 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 27 February 2008 - 01:37 AM

execute_string only adds a security hole if there is some way for the player to set the code used by it. If the user has no way of injecting code I don't see any security hole. As to the speed. It doesn't have to be every step, it can be on an alarm, a manually triggered user event, anything.

While I will admit it has it's flaws, I think it was as well made as possible without a DLL, which if I ever get better with C++ I may do.
  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#8 Kyle_Solo

Kyle_Solo

    GMC Member

  • GMC Member
  • 1071 posts
  • Version:Unknown

Posted 27 February 2008 - 04:10 AM

execute_string doesn't require code injection. All you need to do is change the value of the "code" variable and you can do whatever you want. Anyone can do it using a program like Cheat Engine.

I was playing around with it and noticed some of your helpline stuff is inaccurate. "init_process" should be "process_init". (If you want to look more like GM's helpline, leave out the ";") The rest of them look good.
  • 0

#9 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 27 February 2008 - 06:48 AM

The new version has been uploaded to both sites.

hmm, i don't understand what this can do :\

<{POST_SNAPBACK}>

It allows you to create, delete and run processes, which are pieces of GML code. For example, you could create a process with the code "x+=4" and then it would execute it at whatever interval you choose. While this is not the most efficiant use, it gives a basic example. I believe I wrote a better description in the help file if you don't mind the download.

<{POST_SNAPBACK}>

So i can make gml for example, sprite_count() or something? :blink:

Using execute_string opens a huge security hole, allowing resources to be stolen from your game.  It is also rather slow, and should not be called every step.

Clever idea though.

<{POST_SNAPBACK}>

how can they acces my resources with this?
  • 0

#10 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 27 February 2008 - 02:08 PM

execute_string doesn't require code injection.  All you need to do is change the value of the "code" variable and you can do whatever you want.  Anyone can do it using a program like Cheat Engine.

I was playing around with it and noticed some of your helpline stuff is inaccurate.  "init_process" should be "process_init".  (If you want to look more like GM's helpline, leave out the ";")  The rest of them look good.

<{POST_SNAPBACK}>

That is true. However, it is harder to do since most of the time it is stored in temporary variables which only exist for less than a second, typically less than 1/30th of a second. But yes, I see your point now, thank you for pointing that out. I will look into using some type of encryption to make it harder to exploit.

Thank you, I will fix that as soon as I finish school.

So i can make gml for example, sprite_count() or something? tongue.gif

No. To make your own functions you would have to use the extension maker. What this does is allows you to add code which is executed at a regular interval that can be stopped, restarted, etc. Things like drawing the FPS. In stead of making a load of if statements in an objects step event, you can just add a process and turn it on and off whenever you need to enable/disable the effect of the code. Basicly, if you added a process with the code "draw_text(0,0,string(fps))" it would constantly draw the fps in the top left. Yes, this could be done by putting the same code in the draw event, but, if it's in the draw event and you want it to be toggleable you have to create a variable and set up and if/else statement to handle drawing the FPS.

how can they acces my resources with this?

GML scripts can be used to export sprites and sounds. If they injected a piece of code that did this then they could export the sprites used in the game, even from the .exe. I am working on patching up this hole right now.

@Kyle_Solo You do realize there is already a way to extract resources from GM games. I forget who made it and I'm not allowed to link from here but it opened the de-bugger in gm6 or gm7 and from there you could execute scripts, you wouldn't even have to find a hole in the security.

New version! See first post for details.
Another new version, fixed fatal error.

Edited by Timmeh, 27 February 2008 - 10:43 PM.

  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#11 Conflustered22

Conflustered22

    Oddly Confused

  • New Member
  • 184 posts

Posted 11 March 2008 - 05:19 PM

All I can say is wowwww. After playing around this for awhile, it is evident that it provides many shortcuts for otherwise complex scripts. It seems to be very strong for creating an A.I. system, and I wouldn't doubt that I will use it in any of my games that include artificial intelligence. Thanks for making my game design process a lot easier. Keep it up!

-Conflustered22
  • 0
Don't know what you got 'till it's gone...

#12 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 12 March 2008 - 02:17 AM

Thanks Conflustered! Anyone else found a use for it?

Timothy Sassone
  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#13 sithlord6

sithlord6

    GMC Member

  • New Member
  • 193 posts

Posted 19 March 2008 - 05:19 PM

I may very well use it for your "simple" use, doing certain things at certain times.
  • 0

#14 tdmgames

tdmgames

    GMC Member

  • New Member
  • 1641 posts

Posted 19 March 2008 - 05:44 PM

Is it possible to get a list of just running applications (Control-Shift-Escape under Running Applications) and return their Window Handle, if so this will be so useful to me!

Thanks
-TDM
  • 0
OH Balls!

Domain change: If any of my links do you not, please PM me and I will send you a working link :)

t3mp3st+Me+BMG = t3mp3st's edited avatar with changing colour effect.

#15 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 30 March 2008 - 12:12 AM

Is it possible to get a list of just running applications (Control-Shift-Escape under Running Applications) and return their Window Handle, if so this will be so useful to me!

Thanks

Unfortunately, not with this extenstion. However, I have seen extensions that do this. Look/ask around and I'm sure you can find what you're looking for ;)

I may very well use it for your "simple" use, doing certain things at certain times.

Glad you found a use for it! I wasn't trying to make using for such sound like a bad thing, I was just trying to point out that it can be used for much more.

Thanks for the replies, and sorry fr my inactivity, my life is... interesting... right now.

Timothy Sassone
  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial

#16 tdmgames

tdmgames

    GMC Member

  • New Member
  • 1641 posts

Posted 30 March 2008 - 10:34 AM

I have searched around found nothing
  • 0
OH Balls!

Domain change: If any of my links do you not, please PM me and I will send you a working link :)

t3mp3st+Me+BMG = t3mp3st's edited avatar with changing colour effect.

#17 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 30 March 2008 - 12:18 PM

Okay, I did a little (meaning a lot) of searching myself and found the one I was talking about. However, I can see where you didn't find it, I had to try to remember the name.......

Anyways, GNET has some process functions, I believe it may have the functions you are looking for. If not, I would try asking around for some of the API Extension, they have those sometimes (although I've never used one personaly)

If you find one that works, please tell me!

Tim

Edited by Timmeh, 30 March 2008 - 12:20 PM.

  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial