DarkBasic Developers Can Step Up With AppUp

DarkBasic Developers Can Step Up With AppUp

The Game Creators's picture
Unless you have been living in a deep dark cave, you will have noticed the recent surge in the number of app stores gracing the digital highway. You can't turn a virtual page without learning of another application outlet popping into existence. Most of these stores are mobile based, so why mention them to a PC centric developer audience? Well thanks to those clever boffins at Intel developers who are focused on PC based games can now develop and distribute their handywork in a new app store called AppUp.

A great many coders set out with the intention of someday selling their creations and striking gold, and some of those have discovered the road to riches was getting longer, narrower and steeper. Publishers intent on making projects larger and more expensive moved the goal posts into orbit for the indie and hobby developer, but no longer. With the success of self-publishing and now through application stores, bedroom and basement programmers once again have a genuine commercial opportunity to create and sell games in a relatively new and unexplored market. For applications and games that currently run on Windows XP, or 7, you can get your title into one of the bigger app stores right now! Before I rant on too much, why not check out the store: http://www.intel.com/appup/ From this humble portal, your application will be advertised to millions of netbook users around the world from which you will receive a very generous royalty for every copy sold. The store is being pre-installed onto millions of netbooks, which means your game will reach a LOT of people in a very short time. So how do you get your app into the store? Fortunately this question is answered in detail when you register to get the AppUp SDK, together with a huge collection of support material and an active and helpful forum. The SDK was designed for C and C++ programmers, which made the implementation of the AppUp authorization code a little tricky for Dark Basic Professional coders. For that reason, I have prepared a simple tutorial and module to help you get your application ready for a netbook and the AppUp store. If you are still asking yourself why you should bother, consider that this store is brand new and the first applications and games on there will do amazingly well. To put my money where my mouth is, I made sure that Dark Basic Professional and First Person Shooter Creator where available through the AppUp store as soon as I could get my hands on the SDK, it's a great opportunity. Briefly, there are three stages to getting your DarkBasic application on AppUp: 1. Ensure the app runs well on a netbook (I suggest testing on a low specification netbook) 2. Implement and test the authorization system (part of the AppUp SDK) 3. Create an MSI installer that incorporates all required pre-requisites The danger here is that I could easily launch into a catch-all article how these three stages break-down but my aim is not to bore you but to get you excited and tooled up to get your software selling. To that end, I will give you my own experiences on these stages so you get an idea how smoothly it can go. Stage 1 To ensure your application works on all netbooks, the only issue I found that warranted new code was not to assume a fixed or minimum desktop resolution. Instead, use GET DESKTOP WIDTH and GET DESKTOP HEIGHT right at the start of your application, and then SET DISPLAY MODE to that resolution at 32 bit. This will ensure you get a full screen experience, and you can use the width and height to proportionally space your on-screen assets accordingly. Also be aware that netbooks are not desktops, so scale any performance hungry features right back and add them back in as optional extras in a menu or setup file. From my experience, those are the only two issues I had to think about and solving them completes stage one. Stage 2 After going through various iterations of implementing the AppUp SDK, I realised it would be a nightmare for a DBP coder to go through the same process as me. So instead of leaving you to the mercy of the SDK, I wrote a module and example project for all DBP users called APPUPPLUGIN.DLL which made the process a whole lot simpler. 1. Download and install the Intel Atom Developer Program SDK 2. Download the DLL from this location; files.thegamecreators.com/AppUpForDarkBasicPro.rar 3. Then place the appupplugin.dll in the Compiler\plugins-user folder 4. Load the example project 'AppUpExample' 5. Change the line mypassword$="anythingiwanthere" to your own unique password string 6. Launch runATDS.bat found in Intel Atom Developer Program SDK\0.91\bin 7. Insert the line 'PRINT myuniquevalue : WAIT KEY' before the line 'if myuniquevalue=929' 8. Run the AppUpExample. It will display a value 9. Delete the line you just added and replace the number 929 with the value you just saw on screen 10. Now run the application again, it should say 'application is approved' 11. At this point you have successfully integrated a DEBUG version of the AppUp security system into your Dark Basic Pro application 12. The next step is to obtain the GUID that uniquely identifies your application. For this you need to register on the Atom Developer website and create a new product entry on that system. Once complete, it will give you a GUID value which you will need for step 12 13. Your GUID will resemble something like 0x32423432,0x32423432,0x32423432,0x32423432 14. To change your DEBUG session to a RELEASE session, you need to change the line 'myuniquevalue=approve app(0,0,0,0,mypassword$)' and replace the 0,0,0,0 with the four parts of the GUID you have from step 12 15. For example, the line should now look like 'myuniquevalue=approve app(0x32423432,0x32423432,0x32423432,0x32423432,mypassword$)' 16. Now when you run your application, it should fail with an authentication message. This is because your application is not running inside the AppUp client. It is this version of your application that you must submit through the Atom Developer site to get approved Stage 3 Once you have finished your application and the release version of your AppUp authentication code has been integrated, you are ready to create your installer. As the application will be served through the AppUp client, it needs to be packaged as an MSI installer. You need to wrap your application and media in this MSI installer ready for the Atom Developer website. Below are some tips to creating a good MSI installer for AppUp: 1. Use an off-the-shelf MSI installer maker such as Wise. These kind of products are reliable and sturdy, and will allow you to focus on application development instead of installer creation and tweaking. 2. Remember that the AppUp authentication code is dependent on some external system files, and the best way to assure that the target system has these files is to use Merge Modules inside your MSI installer. For example you will need to include merge modules for: policy_9_0_Microsoft_VC90_MFC_x86 policy_9_0_Microsoft_VC90_CRT_x86 Microsoft_VC90_MFC_x86 Microsoft_VC90_CRT_x86 3. As DBP applications are DirectX based (October 2006) you will also require your MSI Installer to silently install the above version of DirectX system files to the target PC. To do this, you can obtain the October 2006 REDIST files direct from the Microsoft website and copy the REDIST folder into your final installation files. From within your MSI installer, you can provide a command after the files have been installed to the target system to launch the "DXSETUP.EXE /silent" which will install DirectX silently. 4. Finally, it is highly recommended that you test your final MSI installer on a NetBook before submitting to the AppUp store for approval. Issues of resolution, performance, missing system files and other issues may arise and finding them early will save you weeks within the approval process. Each stage might look a little overwhelming at first, but these are the simple steps to getting your application selling on the store. For help with the details of these steps, and specifically about registering, obtaining a GUID, submitting your application and observing the guidelines the Atom Developer site has all the information you need plus a great forum. There has never been a better time to be an indie or hobby developer, with so many technologies to hand and a myriad of distribution points, we're small enough to take big risks and agile enough to change direction without losing momentum. Now go forth and create wonderful things! Lee Bamber CEO, The Game Creators Ltd www.thegamecreators.com
23 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
steve-vink's picture

An important update to the approval process:

1. Download and install the Intel Atom Developer Program SDK
This is now the AppUp Developer SDK

5. Launch runATDS.bat found in Intel Atom Developer Program SDK\0.91\bin
In the Intel\IntelAppUpSDK\Tools\Debugger folder you will find run.bat. Run this and you'll see the debug window open up. You're ready to carry on with the validation...good luck!

Bob Duffy (Intel)'s picture

Thanks Lee and team at The Game Creators. So glad to see that you guys are helping folks get their games into market this way. Keep the innovative work coming. Currently I don't see the APPUPPLUGIN.DLL and sample file posted. Let me know if you need Intel to host those.

Bob Duffy (Intel)'s picture

Here's a link to the RAR file which includes the AppUp Plug-In as well as a sample file

http://files.thegamecreators.com/AppUpForDarkBasicPro.rar

BrianDevArch's picture

Thanks Bob, nice work.

If TGC want to put it into the product catalogue they can do, so long as it remains free for everybody to get.

The Game Creators's picture

I will have a closer look at the component system, as although the DLL will always remain a free module to help DBP and GDK users, the mechanism for using it through the component system is certainly worth investigating :) I think the component system idea is very cool for developers!

The Game Creators's picture

To keep in line with the release of the V1.0 SDK for Windows, we have updated our DBP and GDK DLL module to match, and you can download it from the links below:

I have updated the DBP and GDK DLL to match the latest version of the AppUp SDK (V1.0). You should use this when submitting to the AppUp center from now on, though you should have no problems if you submitted your application before the new V1 of the AppUp Centre was released. I have copied the links below for those who don't want to scroll back up this thread:

Your Guide
http://files.thegamecreators.com/appup/TGCAppUpGuide.rtf

DBP and GDK DLL Files
http://files.thegamecreators.com/appup/AppUpForDarkBasicPro.rar
http://files.thegamecreators.com/appup/AppUpForDarkBasicPro.zip
http://files.thegamecreators.com/appup/AppUpForDarkGDK.rar
http://files.thegamecreators.com/appup/AppUpForDarkGDK.zip

P.S. We have also prepared a small template for those users who own Wise(r) for making their MSI installers, which contain the DirectX and VC90 merge module references you will need to produce an MSI that can sail through the validation process unhindered:

http://files.thegamecreators.com/appup/APPUP-MyCoolGame.rar
http://files.thegamecreators.com/appup/APPUP-MyCoolGame.zip

P.P.S. And for those who want their MSI installers for free, check out these links:

http://www.youtube.com/watch?v=qMkMJwrqd-8
http://files.thegamecreators.com/appup/APPUP-MyFreeInstaller.rar
http://files.thegamecreators.com/appup/APPUP-MyFreeInstaller.zip

Now go forth and have fun creating games!

Tuppe's picture

Is it absolute necessary to include DirectX in the installer? Seems unreasonable because my game is around 7Mb and the directx is 60Mb.
It also slows down the installer quite a bit.

There would be clear "Requires DirectX 9.0" error after all if it is not installed.

BrianDevArch's picture

Tuppe,

Per the Packaging Guidelines, all libraries your ATOM submission requires must be included in the MSI. Failure to include a required library will result in validation failure. That being said, you may check to see what versions of common libraries come with the minimum required version of the supported OS.

Tuppe's picture

Okay, I will include the DirectX just in case.
I believe it must be redistributable so it could be installed offline. Another choice could be the dxwebsetup, which is 0.3Mb and would install the newest DirectX over internet.

Does the whole installation have to be silent, as said in package requirements?

Will those:
policy_9_0_Microsoft_VC90_MFC_x86
policy_9_0_Microsoft_VC90_CRT_x86
Microsoft_VC90_MFC_x86
Microsoft_VC90_CRT_x86

install with "Microsoft Visual C++ 2008 Redistributable Package (x86)"?

BrianDevArch's picture

Tuppe,

Yes, the entire installation process must be silent. This means that no matter what the source of the library (web installer mentioned) it must not prompt the user for any input.

Yes, those are the required CRT runtime merge modules. When creating your MSI, please do not forget to set it to "Install for all users".

The Game Creators's picture

Hi Guys,

In doing a second round of AppUp uploads, I discovered another important step to ensure you don't get rejected during validation and is an easy one to miss without having access to the full beta client.

You need to make sure that your application can run, even if the CWD (current working directory) is not set to your local application folder. For example, you should be able to run your application from a shortcut link on the desktop (i.e. the current directory being the desktop, with your app being indirectly called from it's resting place inside Program Files). Here is the Dark Basic Pro code which fixes this issue, just place it at the top of your program:

rem IMPORTANT: Apps should not ASSUME the current directory is their app folder. Always
rem extract the app directory and set it, so you get local access to your media
app$=appname$()
for n=len(app$) to 1 step -1
if mid$(app$,n)="\" or mid$(app$,n)="/"
apppath$=left$(app$,n)
exit
endif
next n
set dir apppath$

This will ensure no matter where your application is launched from, your application will be able to access the media files that accompany the executable. Good luck and have fun!

Tuppe's picture

I discovered this too, in my case the application launch from the AppUp wasn't working, but the shortcuts worked as they should be.
Make sure you use the beta test to make sure that it works in the AppUp launch button too.

Nice code there, I'd have used that if I hadn't fixed it my way already. I fixed this myself by making the .msi installer write "InstallDir" key to the registry and include the application install directory there.
In Visual Studio the application path would be "[TARGETDIR]" (without the quotes)

Then within the game I read this registry key and use this as the path.

In DarkBASIC:
InstallDir$=get registry$("Software\GAMENAME","InstallDir")

then just loaded objects with

load object InstallDir$+"Media\file.x", 1

And it will succesfully launch from the AppUp and shortcuts.

Bob Duffy (Intel)'s picture

Good tip guys. Thanks for documenting in this post. Here's an article that covers that and a few other key issues. http://appdeveloper.intel.com/en-us/article/troubleshooting-validation-failures

The Game Creators's picture

Not to play second fiddle, a DarkGDK community member put together a kit with documentation for those of you who prefer the GDK over DBP. Here is the link to help you get your GDK projects ready for the AppUp store:
http://files.thegamecreators.com/AppUp/AppUpForDarkGDK.rar

Thanks for posting my library Lee. I just want to point out that the library is just c++ and a bit of winapi, so it is not limited to the GDK, but it has been designed for the GDK.

The Game Creators's picture

I have just posted updates to both kits, fixing a small leak which would have affected a few systems out there so if you are using them, or experienced this issue first hand, grab the latest DLL from the kit and use that one instead. Have fun!

The Game Creators's picture

Since this post, the TGC community have not been idle and continue to sell there games and apps through AppUp. So much so that they community have refined our advice on the finer details of creating an MSI that will pass AppUp validation when using the free WarSetup3 approach to creating the MSI. Here is the thread, and if you scan to the end you will see a screen shot of how our recent upload 'Goals Lite' is laid out in the MSI tables:

http://forum.thegamecreators.com/?m=forum_view&t=177920&b=1

The Game Creators's picture

Here is a useful tutorial that walks you through the process of creating a free MSI installer for AppUp validation: http://forumfiles.thegamecreators.com/download/2185670

Steven Holding's picture

Is there an updated "appupplugin.dll" for the new SDK (V1.1.1) available for DBP users Lee as I just realised it doesn't actually come with the SDK as I first suspected?

The DBP community including myself will rather desperately need this. If you could include calls for the "upgrade button" code too that would be a bonus but just having the up to date plugin would be great!

I would be happy to compile the dll myself for the community if someone could give me some pointers in building the dll. I really should learn a little more about this anyway.

The Game Creators's picture

The APPUP DLL for DBP has now been updated with the latest SDK BETA 3. You will need this update in order to pass future approvals in AppUp. Enjoy!

Bob Duffy (Intel)'s picture

Thinknig this would be great to our component catalog

Login to leave a comment.