How to export game from Ted?

Monkey Forums/Monkey Beginners/How to export game from Ted?

Impmaster(Posted 2014) [#1]
Hi all, I've finished my game. How can I export it as a single .exe file or as a single html file?


dawlane(Posted 2014) [#2]
It 's all ready done for you. Look in your .build directory glfw for a desktop target; in one of the directories in there you will find a directory call Release or Debug. You will see all inside a directory named data, external and internal, along with your executable. Which directory you find Debug or Release depends on which compiler was used. gcc_linux for gcc on a linux, gcc_winnt for MinGW on Windows, VS210 for Visual Studio on Windows or xcode for a mac.


Impmaster(Posted 2014) [#3]
Hey. I exported it to Windows and to HTML, and the HTML game seems to have a bug that the Windows game does not have. Why would this be? They both have the same code, and the code that bugs is that when the character "drowns", it is supposed to have a death screen saying that he drowned. On Windows, this works. However, on HTML, it just freezes the game. I have a similar death screen that happens when the character is "eaten", with pretty much the same code, but it changes the text slightly.

My project is here:

https://www.dropbox.com/sh/fgbijlzvmi2f3z7/bk8taWXSHZ


dawlane(Posted 2014) [#4]
Remove the image = LoadImage("diver.png") in your Die Method. You only need to load an image once for it to be used. As you only have a few images place them in the OnCreate method. An object does not need to load a image each time it is created.


Impmaster(Posted 2014) [#5]
It works. Why does that affect only the HTML client?


Capn Lee(Posted 2014) [#6]
even though you write the code once, at build time it is converted in to the language necessary for that program type.
If you have written everything the way that it's expected this will work for each but due to automatic conversion there are times when if you write in something buggy, some formats will work around your problem and others won't.

I had a problem with this same thing a while back, I wrote something incorrectly and didn't notice at first because the html output seemed to ignore the problem and work around it, but it caused a crash in glfw


Impmaster(Posted 2014) [#7]
If I compile the game on a mac, can I get a windows .exe of my game? Or do I have to move the project to another computer running windows?


Impmaster(Posted 2014) [#8]
Also, I compiled it on a PC, but everyone who tries to run it gets an OpenAL32 missing error. How to fix?


computercoder(Posted 2014) [#9]
You have to compile the game on the platform you want it for Linux, Mac and Windows. For iOS, you must also compile on a Mac, and if you want to build for Windows Mobile, you must compile on Windows. Flash / HTML5 / Android / OUYA can be built on either Mac, Windows or Linux. I have no experience with the other targets, but I assume they could be also compiled on any platform,

As for your OpenAL32 issue, perhaps you need to include OpenAL32.dll with your game? I'm not exactly sure that is the fix, but that makes sense.


dawlane(Posted 2014) [#10]
TARGETS SUPPORTED BY OS: (should be accurate)
Windows Vista/7: HTML, Desktop, Android, FLASH, OUYA, XNA (XBox/Windows/Windows Phone 7), PSM
Windows 8: HTML, Desktop, Android, FLASH, OUYA, XNA (XBox/Windows/Windows Phone 7) with a work around, PSM, Win RT, Windows Phone 8
OS X: HTML, Desktop, Android, FLASH, OUYA, iOS
Linux: HTML, Desktop, Android, FLASH (version 11.1/11.2), OUYA

It is possible to get Monkey to generate code for the other targets that cannot be install on a system, but you still need that system and it's compilers to compile the final application.

As for your OpenAL32 issue, perhaps you need to include OpenAL32.dll with your game? I'm not exactly sure that is the fix, but that makes sense
You have two choices for Windows.
1. Distribute the OpenAL installer that comes with Monkey-X
2. Copy the installed OpenAL32.dll from you Windows System32/SysWoW64 and place it inside the directory of your game. The OpenAL license as I understand it allows you to do this. You should distribute this license with Creative Labs OpenAL dynamic library.
Creative Labs, Inc. is providing you with this OpenAL32.dll installer and other OpenAL files ("Software"). You may use and freely integrate with your software applications and distribute such throughout the world at no cost or further obligation to Creative.

NO WARRANTY
ANY USE BY YOU OF THE SOFTWARE IS AT YOUR OWN RISK. THE SOFTWARE IS PROVIDED FOR USE "AS IS" WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, CREATIVE DISCLAIMS ALL WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. CREATIVE IS NOT OBLIGATED TO PROVIDE ANY UPDATES OR UPGRADES TO THE SOFTWARE.

No other entity or person is authorized to expand or alter this warranty or any other provisions herein. Creative does not warrant that the functions contained in the Software will meet your requirements or that the operation of the Software will be uninterrupted or error-free or free from malicious code. For purposes of this paragraph, "malicious code" means any program code designed to contaminate other computer programs or computer data, consume computer resources, modify, destroy, record, or transmit data, or in some other fashion usurp the normal operation of the computer, computer system, or computer network, including viruses, Trojan horses, droppers, worms, logic bombs, and the like.

You assume full responsibility for the selection of the Software to achieve your intended results, and for the downloading, use and results obtained from the Software. You also assume the entire risk as it applies to the quality and performance of the Software.

IN NO EVENT WILL CREATIVE'S LIABILITY TO YOU OR ANY OTHER PERSON EVER EXCEED THE AMOUNT PAID BY YOU TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM.
OS X already has Apples own implementation of OpenAL installed and Linux has OpenAL-Soft, a easy install from the repositories.