Jump to content


Photo

Game Maker Functions 2 (gmf2.dll)


  • Please log in to reply
32 replies to this topic

#1 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 06 November 2006 - 07:04 PM

I have made a new DLL called "GMF2.dll" in Visual C++ 2005 of Visual Studio 2005;
The DLL uses the .NET framwork, and it made it easy to code this DLL in C++.
(I am still working on the documentation, but a small demo is included)
[Version 1.4.1]
Here are the kind of functions of the DLL:
-Conversion
-Math
-File I/O (better than the GM File I/O)
-Console (create a console-like window for GM, and display text and enter commands)
-Dialogs (example: MessageBox, InputBox, Font Selector)
-Eventlog Function
-Storing Bytes of Data in Memory(buffering)

.NET Framework 2.0 is required
to check for it open the folder "C:\Windows\Microsoft.NET\Framework" and see if there a folder called "v2.0.50727",
if not click here to download it
Download GMF2

plans on new updates:
-XML functions
-maybe graphics stuff
-mabye Collections Support
-mabye FileInfo stuff
-etc

Posted Image

Quick Examples:
Examples of the GMF2 Scripts:

:o
GMF2_DLL_Init();
fid = GMF2_File_Open_Write("C:\poop");
GMF2_File_Write_Double(fid,398.4384);
GMF2_File_WriteIn(fid);
GMF2_File_Write_String(fid,"Hello World");
GMF2_File_Close(fid);
GMF2_File_Encrypt("C:\poop","keycode26");
GMF2_File_Decrypt("C:\poop","keycode26");
fid = GMF2_File_Open_Read("C:\poop");
show_message(string(GMF2_File_Read_Double(fid)));
GMF2_File_ReadIn(fid);
show_message(GMF2_File_Read_String(fid));
GMF2_File_Close(fid);
GMF2_DLL_Release();
game_end();


Now you can create a Console-like Window(and I made the Window), you can write to it, listen for entered commands, give the window focus.

:D
GMF2_DLL_Init();
cid = GMF2_Console_Create("I am a Console");
GMF2_Console_WriteLine(cid,"new line"):
GMF2_Console_Write(cid,"added text");
GMF2_Console_Caption_Set(cid,"I am a window");

to listen for commands entered in
step event
;)
command = GMF2_Console_Command_ListenFor(cid);
if(command == "")
{
  exit;
}
else
{
  switch(command)
  {
    case "eatfish": {GMF2_Dialog_MessageBox("you ate a fish!","oh no...",GMF2_MB_Ok,GMF2_MI_Exclamation);break;}
    default: {GMF2_Console_WriteLine(cid,"invalid command");break;}
  }
}

So I would consider trying his DLL out, it might solve a problem in yuor game or help it more. Especially the Console feature

-Omega

Edited by TheOmega, 29 December 2006 - 09:07 PM.

  • 0
Loves his girlfriend Melissa <3

#2 Ruby

Ruby

    Ruby Software

  • New Member
  • 203 posts

Posted 06 November 2006 - 07:38 PM

I like it.
EDIT: It doesn't work! ‘Error defining an external function!’

Edited by Ruby, 06 November 2006 - 07:43 PM.

  • 0
No longer active on GMC

#3 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 06 November 2006 - 07:41 PM

I like it.

<{POST_SNAPBACK}>

thanks! you must got it to work, yes!! I had this recent problem that no one could use my DLL, because of missing DLLs, so that is why there are 2 other DLLs with mine. This helps a lot. phew, that problem is truly solved.
  • 0
Loves his girlfriend Melissa <3

#4 Mauros

Mauros

    GMC Member

  • New Member
  • 122 posts

Posted 06 November 2006 - 07:56 PM

don't work
the problem is in init script
  • 0

#5 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 06 November 2006 - 07:59 PM

don't work
the problem is in init script

<{POST_SNAPBACK}>

not again!?? I know, but the reason is because the DLL is having trouble working so GM fails to define the function. I tested this on that laptop got that error you got added the required DLLs, and I am guessing you have the .NET framework 2.0, right? if so...omg! this cannot be!
  • 0
Loves his girlfriend Melissa <3

#6 Mauros

Mauros

    GMC Member

  • New Member
  • 122 posts

Posted 06 November 2006 - 08:05 PM

yes i have all.. but don't work...
  • 0

#7 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 06 November 2006 - 08:08 PM

don't work
the problem is in init script

<{POST_SNAPBACK}>

not again!?? I know, but the reason is because the DLL is having trouble working so GM fails to define the function. I tested this on that laptop got that error you got added the required DLLs, and I am guessing you have the .NET framework 2.0, right? if so...omg! this cannot be!

<{POST_SNAPBACK}>

noo! why?? why!! you have 3 DLLs in the same folder, right? and you ran the demo? I am correct? then someone tell my why the heck it won't work? It is not Game Maker, I got it to work on 2 laptops and my PC. It is something wrong with the DLL, we need other testers, just to see if it could just your PC. hmm, I coudl try in this computer...yeah I'll try that!

EDIT: opps, I didn't create an exe, and this PC does not have Game Maker

Edited by TheOmega, 06 November 2006 - 08:10 PM.

  • 0
Loves his girlfriend Melissa <3

#8 Mauros

Mauros

    GMC Member

  • New Member
  • 122 posts

Posted 07 November 2006 - 01:10 PM

i am an expert.. the dll are in folder... the beep player don't work..
mmm.. i can help you, wait minute..


ok: the problem is between
global.GMF2_f0 = .....
and
global.GMF2_f41


edit2: can you post the first part of surcecode?

Edited by Mauros, 07 November 2006 - 01:14 PM.

  • 0

#9 cardinal carnage

cardinal carnage

    GMC Member

  • New Member
  • 123 posts

Posted 07 November 2006 - 04:38 PM

Works fine for me, I'll have a good play about with it now.

C :D
  • 0

#10 Binsk

Binsk

    -Insane Kid-

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

Posted 07 November 2006 - 05:57 PM

Its not just them. It doesent work for me either. And I have the framework thing installed.
  • 0

NEWS FLASH! You can't get to heaven by your works. No chance. Hopeless. Give up now. No amount of works will get you anywhere, in fact all your efforts have been botched years ago because you already missed perfection the first time you lied, stole, or performed any of those other lovelies.

 

That said, do you want to go to heaven? Not the hellish picture given by cartoons. You know, the nightmarish one where you are renting a cloud and harp? I mean, holy crap, where did that come from? I am talking about a bonafide city, people, designed by God no less. Heck, read John's Revelation 21 if you want details. Getting to heaven is extremely simple, actually, the how and why is spelled out in Paul's letter to the Romans, summarized in Romans 10:9,10. God lived a perfect life and died in your place, covering every one of your mistakes and failures past and future. All you have to do is believe that He did what he said He did and accept the gift. Bam, you're saved. Done deal. Complicated, no? Questions? PM me.


#11 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 07 November 2006 - 06:36 PM

Doesn't work for me either - and yes, I have .NET 2........
Damn this was lookin good lol...
  • 0

Chris Matthews, Co-Leader of Digital X

#12 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 07 November 2006 - 06:51 PM

Alright, I added some features, and I change the DLL to release verison not debug, so mabye it will work for most of you guys. then I gotta finish that documentation html page. I am crossing my fingers that this release might work. :D

@Mauros: my code works, it my DLL not working causing GM to fail to define functions, if you were running Windows 2000, then you'll get more error popups, like missing DLL.

Edited by TheOmega, 07 November 2006 - 07:00 PM.

  • 0
Loves his girlfriend Melissa <3

#13 Mauros

Mauros

    GMC Member

  • New Member
  • 122 posts

Posted 07 November 2006 - 07:24 PM

XP SP2

3GHZ

1 GB RAM

256mb ati radeon 9250

200 gb hard disk..
  • 0

#14 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 07 November 2006 - 07:25 PM

XP SP2

3GHZ

1 GB RAM

256mb ati radeon 9250

200 gb hard disk..

<{POST_SNAPBACK}>

?? my PC is 1GHz, and itw orks
  • 0
Loves his girlfriend Melissa <3

#15 Binsk

Binsk

    -Insane Kid-

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

Posted 07 November 2006 - 10:04 PM

Yay! I re-downloaded and it works now! Hurra!
It is very awsome. Very nice indeed.
  • 0

NEWS FLASH! You can't get to heaven by your works. No chance. Hopeless. Give up now. No amount of works will get you anywhere, in fact all your efforts have been botched years ago because you already missed perfection the first time you lied, stole, or performed any of those other lovelies.

 

That said, do you want to go to heaven? Not the hellish picture given by cartoons. You know, the nightmarish one where you are renting a cloud and harp? I mean, holy crap, where did that come from? I am talking about a bonafide city, people, designed by God no less. Heck, read John's Revelation 21 if you want details. Getting to heaven is extremely simple, actually, the how and why is spelled out in Paul's letter to the Romans, summarized in Romans 10:9,10. God lived a perfect life and died in your place, covering every one of your mistakes and failures past and future. All you have to do is believe that He did what he said He did and accept the gift. Bam, you're saved. Done deal. Complicated, no? Questions? PM me.


#16 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 08 November 2006 - 02:32 AM

Yay! I re-downloaded and it works now! Hurra!
It is very awsome. Very nice indeed.

<{POST_SNAPBACK}>

yes!!!! it worked! cool, thanks!
  • 0
Loves his girlfriend Melissa <3

#17 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 08 November 2006 - 08:49 AM

It works now. But it has some useless function like the folder browser. (GM can do this without requiring dlls or .NET)
  • 0
GM 8.1 / GM:HTML5 User

#18 Mauros

Mauros

    GMC Member

  • New Member
  • 122 posts

Posted 08 November 2006 - 01:27 PM

Now work and is very cool! :blink:
  • 0

#19 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 08 November 2006 - 07:00 PM

It works now. But it has some useless function like the folder browser. (GM can do this without requiring dlls or .NET)

<{POST_SNAPBACK}>

yeah, I didn't knwo GM had a folder picker, or I forgot, but I prefer the Windows looking GUI than GM, plus my Input Box now can let you use a password mask.

new features[verison 1.2]:
-GMF2_Convert_Format_ValueToHex()
-GMF2_Dialog_InputBox - now use password character mask
some inner code was changed

it may be awhile till I add the XML fucntions, I still have to learn how you use the XML functions in .NET

well now it seems my DLL is doesn't have issues anymore. Now I might write some games or really mod the games to show up a console and write what is happening in the game. but more importantly the documentation file. I am still working on that. I tried to create a Form based on the GM window, got an error, I guess the GM window would have to be written in .NET.
-Omega
  • 0
Loves his girlfriend Melissa <3

#20 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 10 November 2006 - 03:23 PM

I don't mean to souble post, but this is a update announcement:

version 1.3 released! some GM scripts has bugs, like calling the wrong DLL function.
Now the documentation has been released. I recommend reading that first before use, read at least the note near top.

added:
-"busybox" feature
-GMF2_Convert_Format_HexToValue()

-Omega
  • 0
Loves his girlfriend Melissa <3

#21 kylel

kylel

    KRL Technology's

  • New Member
  • 103 posts

Posted 10 December 2006 - 06:26 AM

hi
  • 0

#22 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 10 December 2006 - 02:38 PM

This is extremely useful :D
Great for debugging games ;)
  • 0

#23 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 23 December 2006 - 05:57 PM

yeah is sure it, I love my own console feature, I guess I release the next version...hmm...I am not ready to release it.


Version 4 news
-fixed File I/O bug, and read/write to a file getting no "invalid handle" errors
-added memory buffer functions
-changed the font of the console window


Also I am planning to get started with GM7 extension for this DLL
  • 0
Loves his girlfriend Melissa <3

#24 -!MBC!- R3D R3AP3R

-!MBC!- R3D R3AP3R

    GMC Member

  • New Member
  • 196 posts

Posted 23 December 2006 - 06:27 PM

This sucks. Nothing is working at all.

I wouldnt want to use this even if you fixed it. What if it works on my computer but doesnt for anyone who downloads my game?
  • 0

#25 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 23 December 2006 - 06:31 PM

This sucks. Nothing is working at all.

I wouldnt want to use this even if you fixed it. What if it works on my computer but doesnt for anyone who downloads my game?

<{POST_SNAPBACK}>

well they need to download the .NET Framwork 2.0, but think of other programs that will be written with the .NET Framwork, like my HP software uses it. So click on the .NET F 2 link, and download it from microsoft, then it should work, also at windows update, it should of installed that framework.
  • 0
Loves his girlfriend Melissa <3

#26 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 29 December 2006 - 09:09 PM

I released version 1.4.1, the help file has been updated to this version. So far, I do not encounter any small bugs using this DLL, so download the latest version

sidenote: it is recommended to upgrade if you do have an older version of GMF2, a bug was found in the File I/O funtions. Now it is fixed.
  • 0
Loves his girlfriend Melissa <3

#27 zephroelectro

zephroelectro

    GMC Member

  • New Member
  • 265 posts

Posted 30 December 2006 - 02:30 PM

The idea of storing stuff in memory sounds nice :)
  • 0

#28 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 30 December 2006 - 04:12 PM

The idea of storing stuff in memory sounds nice :)

<{POST_SNAPBACK}>

yeah, I used it in my map system I created for this game, storing all the objects inside. Well it is good for stroing tons of data you might later in the game.
  • 0
Loves his girlfriend Melissa <3

#29 royboyjoytoy2

royboyjoytoy2

    GMC Member

  • New Member
  • 308 posts

Posted 20 May 2008 - 01:26 AM

This sucks. Nothing is working at all.

I wouldnt want to use this even if you fixed it. What if it works on my computer but doesnt for anyone who downloads my game?


I have the same concept for my dll, except I don't use the dotnet framework. It should work on all machines that GameMaker supports.

Libpyramidgm@http://gmc.yoyogames...howtopic=370160

Edited by royboyjoytoy2, 20 May 2008 - 01:29 AM.

  • 0
"The world will soon see the most successful game ever."

#30 Xantier

Xantier

    GMC Member

  • New Member
  • 362 posts

Posted 21 May 2008 - 01:12 AM

i liked it much
  • 0

#31 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 21 May 2008 - 05:57 PM

hey you say you wrote this dll with vb , is this vb6 or vb express edition. If it is written in VB 2005-2008 then could you give us a good example of the source code for a vb dll maybe one or two basic functions
  • 0

#32 zephroelectro

zephroelectro

    GMC Member

  • New Member
  • 265 posts

Posted 30 May 2008 - 09:24 PM

download doesn't work :)
  • 0

#33 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 15 March 2010 - 08:50 PM

Project pretty much canceled, and it was coded in C++ .NET, feel free to close this junk. :)
  • 0
Loves his girlfriend Melissa <3