Hi GD gurus.
My game has different levels (one “relatively” small XML file per level - Each XML file is 56 Kbytes).
I would like to give the gamer the possibility to send a level he has built to another guy.
So it “should be” extremely simple. He has just to send (ideally by mail) this small level/XML file. But how to do that using a GD Action ?
I have tried using a GD “Open URL” action and use a “Mailto” syntax (e.g. "mailto:foo@hotmail.com?subject=Game level&attachment=“C:\tmp\Level1.xml”). It would be soooo simple… BUT UNFORTUNATELY (although the mailto &attachment parameter seems to exist !) ‘mailto’ implementations doe NOT support file attachment (I “guess” for a security reason…). So the above method does not work… And I cannot use either a Mailto ?Body=A BIG STRING of 56 KBytes !!!
So… Is there a clever/right method (from a windows native GD game) to send a small file to another user/gamer?
You could try just making a file on their computer. So if they open your game then it will create that file. Or if you mean to automatically email that person then I would suggest maybe allowing third party app acces for your gmail account. Sign in - Google Accounts
Thank you for your fast reply.
I’m affraid this may be to complex for young “end users/gamers”… that are not used to dealing with app access rights, etc.
The “problem” comes from the fact it is not that easy to locate an XML file created by GD. The created XML/game level file is not in the directory where the game is installed (e.g. C:\Program Files (x86)<GDProgramName>) BUT in a windows user directory ("C:\Users<UserName>\AppData\Local\VirtualStore\Program Files (x86)<GDProgramName>)
I think I will introduce a new Import/Export directory (with a fixed directory… simpler to find compared to this user dependant location) and let the user deal with its favorite mail interface.
To send a created game level to his friend, a player will:
click on an “Export” icon. That will copy the game level/file to this fixed game ‘Import/Export’ directory)
use his favorite mail to send that xml file (as mail attachment) to his friend
To play a game level received as a mail attachment, a player will
Save the mail attachment in this fixed game ‘Import/Export’ directory
Click on an “Import” icon… that will copy the XML file/game level to this “relatively complex” (user dependant) directory location
Is there a way to disable the GD “Virtual Store” feature… and therefore to define where an XML file is actually created?
I use the “Charger le fichier structuré ‘FileName’ en mémoire” GD Action (I guess the english version of this GD Action is “Load a structured file ‘FileName’ in memory”)
If ‘FileName’ is “GameLevel1.xml”, this file is created in the directory “C:\Users<UserName>\AppData\Local\VirtualStore\Program Files (x86)<GDProgramName>”.
OK… Why not…
if ‘FileName’ is made of a full path (C:\Temp\GameLevel2.xml) I would have assumed this XML file to be created in the C:\Temp directory…
BUT NO!!! Apparently GD strips/ignore the file path (C:\Temp) and creates ALSO GameLevel2.xml in the same directory (“C:\Users<UserName>\AppData\Local\VirtualStore\Program Files (x86)<GDProgramName>”)
So is there a way/trick to define/control where a file is created ???
As mentionned in the former replies I would like to copy/export the game levels to a fixed directory (easy to locate/type => easy for a user/gamer to send by mail those exported game levels)
Thanks Bouh.
The GD file system extension is EXACTLY what I’m looking for
Another reason for me to move from GD4 (my game is using currently) to GD5.
Have a great day…
Damien.