on the shoulders of giants

After working for two years on a C++ gaming platform the company that provided the tools stopped supporting the engine. It was time to look for another engine. I was amazed at how many options were available.

I had a few simple asks: I wanted to keep using the same programming language. I didn’t want to spend time learning a new language when I could spend that time working on games. I wanted the company to have an active community where if a problem came up other people would be able to help. I wanted ready available and easy to integrate libraries for everything I could possibly need. I wanted to be able to build in the cloud on somebody else’s servers.

The last two parts were my most important ask because I was extremely tired of supporting plugins (my previous engine) and dealing with the minutia of maintaining build configurations.

To evaluate the game engines I decided that I was going to use my next project as a measuring stick. So about 2 years ago, I decided I was going to create a casual puzzle game (the type of games I play). Since I didn’t know any of these engines, I was looking for a well-crafted puzzle template.

I wanted a mostly made backend system that I could configure and maybe write a few scripts. I didn’t want to code this from scratch and then maintain it.

I wanted a monetization plugin that was maintained by the company. And once the app grew, I wanted some sort of mediation plugin. I didn’t want to roll my own mediation with a bunch of if/then clauses.

I wanted a way to track installs and a few events.

In general, I didn’t want to start on the ground floor. I wanted to start on the shoulders of the biggest giant that I could find. Corona was and is that giant.

I was and I am still amazed that Corona had in most cases more than one option for whatever need I can think of. Corona has more than a dozen ad providers and at least a few providers of surveys. Corona has at least 5 options for analytics. Corona has at least 3 options for backend system.

As far as a community, Corona forums are always filled with people willing to help.

And yes I know that Corona isn’t C++, but Lua was so easy to pick-up. And yes you don’t have to point out that I did not come up with the term “shoulder of giants”. It was first written to my knowledge by Sir Newton.

The result of my efforts almost 2 years ago is cuadros. It has almost 50K installs as of this writing and about 800 unique users a day. I am using the Admob Corona plugin for banners and interstitials ads. For rewarded ads, I use NextApp, Ironsource and hopefully Vungle soon. I am using Gamespark as a backend. I have used Tenjin and Flurry to track installs and events. I use one signal to send notification on all three platforms. For all these plugins, I don’t have to install or copy or add dependencies. Everything is done for me. Because I am not a build engineer or a server admin or a desktop configurator. I am a game developer.

 

 

 

 

Advertisements

Gamehouse and QuickLua

The nice people at MadeWithMarmalade are running a promotion with gamehouse where if you integrate their game network promotion api you win money and a Marmalade license extension. There are some stiff requirements (at least for me and my apps) to get the incentives, but I decided to integrate a couple of my apps just to see what it was like (and because I am on vacation with nothing to code). What I found out is that unlike most tap or impression exchanges, gamehouse will show your app thousands a time a day for free (at least during their beta period).

Two of the apps I integrated gamehouse with are written in C++ (what all the instructions are written for), but one of my app I used Marmalade’s Lua api. What follows is how I got the gamehouse extension working with my Lua project.

1. Download the gamehouse Marmalade extension from here:  http://gpn.gamehouse.com/sdk

2. Once the sdk is unzipped copy the gamehouse folder to the extension folder inside your marmalade folder. In my case that is: C:\Marmalade\7.1\extensions.

3. Modify your project .mkb to include the gamehouse extension in the sub-project section. Your subproject section should look like this (unless you have added other projects):

options
{
s3e-data-dir = resources
app-icf = ‘resources/common.icf,resources/app.icf’
}

subproject
{
gamehouse/gpn
}

4. Download the files located here: https://devnet.madewithmarmalade.com/questions/18739/gamehouse-and-quick-integration.html.

Place the header file in the header folder. On my machine it is located here: C:\Marmalade\7.1\quick\include.

And the source file here: C:\Marmalade\7.1\quick\source

5. Modify quickuser.mkf located here: C:\Marmalade\7.1\quick

By adding  the two files you just added. It should look something like this after your changes.

includepath .

files
{
quickuser_tolua.cpp
quickuser_tolua.pkg
quickuser.h

#Gamehouse c++ files.
include/CGGameHouse.h
source/CGGameHouse.cpp
}

6. Modify quickuser_tolua.pkg also located here: C:\Marmalade\7.1\quick by adding the reference to the header file. Your file should look something like this:

//——————————————————————————
// Mark-up in header files
//——————————————————————————
$cfile “quickuser.h”
$cfile “include/CGGameHouse.h”

7. Run the quickuser_tolua.bat file. According to the documentation it should be located here: C:\Marmalade\7.1\quick. Unfortunately I have not seen it in a few releases. If you don’t have it either copy it from the same folder but the 6.4 install (the last version that had it for me).

8. At this point you can either open the quick_prebuilt.mkb or any of your Quick project in Visual Studio and compile it using the x86 Debug target.

9. From within your Lua project now you should be able to initialize gamehouse by calling:

gameHouse.initGameHouse(“yourGameHouseAppKey”)

and request the display of the ad by calling:

gameHouse.presentAd()

10. Remember to add the required items for the particular platform you are deploying it to. For example for Android you need to add the required activity to the android manifest file. Instructions can be found in the gamehouse integration document found in this thread: https://devnet.madewithmarmalade.com/questions/18456/how-can-i-integrate-the-gamehouse-extension.html

That is all, if you run into problems let me know and I’ll try to help. I am back to bill paying work after the new year.

InMobi and ad size support for IwGameAds.

If anybody has bothered (highly unlikely) to download and install any of my games in Blackberry Appworld they would have noticed that at times you will get an ad that takes over the entire screen of the game. This happens even if you are in the middle of playing the game. Unfortunately until this point IwGameAds did not have a mechanism to be able to request an ad size. With some providers like mmedia this is not a problem because you define the size with you define the slot.

Again I have made changes to IwGame to support ad sizes. These are the first batch of ad sizes supported: 168×28, 216×36, 300×50, 300×250, 728×90, 320×480, and 320×50. Up to this point I have only tested and modified (where needed) 2 providers: mmedia and Inneractive. With these code changes I have also added InMobi (was not supported in the original version of IwGameAds). I couldn’t find a way to specify ad size in mmedia, and it isn’t necessary since you can specify it on their portal. All these words is just to say that the ad size functionality is now supported for InMobi and Inneractive. As I test and update the other providers, I will make sure to add the ad size option. You can keep track of what providers I have tested by looking at the read me on gitHub. This change meets my current needs, but I realize that it would be more useful if you can specify the ad size per slot. I plan to make that change as soon as time permits.

Example 1: The ad size of 300×50.

IW_GAME_ADS_VIEW->Init(“yourAppId”);

IW_GAME_ADS_VIEW->setAdProvider(CIwGameAds::InMobi);

IW_GAME_ADS_VIEW->setSlotSize(CIwGameAds::s300x50);

IW_GAME_ADS_VIEW->setNewAdInterval(15);

IW_GAME_ADS_VIEW->setNumAdsVisible(2);

Multiple AppId support for IwGameAds.

I have used IwGameAds for a while (I didn’t write the original code). One of the great things of using it with Marmalade  is that you can write your code once and ads appear everywhere you deploy it.

I use 2 ad providers, and I usually set up the platform as Android since IwGameAds only supported 1 appId per provider. This meant that whatever device is presenting the ads, it would always shows up as Android on the ad console. It also meant that such as ads for Android games would show up on Blackberry devices.

I made some small changes to the code to accommodate multiple appids per provider. You can get the version with my changes in my repo.

To add the extra appIds you can do it when creating the mediator:

Example 1:

// Create Inner-active ad party and add to the mediator

CIwGameAdsParty* party = new CIwGameAdsParty();

party->ApplicationID = “Default when it doesn’t match any of the others.”;

party->IOSAppID = “iOS AppId”;

party->BBAppID = “ONX based blackbery devices App Id.”;

party->AndroidAppID = “Android App Id.”;

party->WP8AppID = “Windows Phone 8 App Id.”;

party->Provider = CIwGameAds::InnerActive;

ad_mediator->addAdParty(party);

Example 2: Not all the appIds have to be provided it would just use the default when the others can’t be found:

CIwGameAdsParty* party = new CIwGameAdsParty();

party->ApplicationID = “Default when it doesn’t match any of the others.”;

party->IOSAppID = “iOS AppId”;

party->WP8AppID = “Windows Phone 8 App Id.”;

party->Provider = CIwGameAds::InnerActive;

ad_mediator->addAdParty(party);

Example 3: You can also use it without a mediator:

IW_GAME_ADS_VIEW->Init(“defaultAppId_Android”);

IW_GAME_ADS_VIEW->setAdProvider(CIwGameAds::InnerActive);

IW_GAME_ADS_VIEW->setIOSAppID(“appAppId_IOS”);

Self Hosted WordPress – Smart Kids’ Apps

Since I last wrote, I have created one Tic-Tac-Toe with Zoo animals app and so far have it in multiple stores (but that is a story for another day).

In the process of trying to figure out how I could get more exposure for my app, I found many sites that feature app reviews. I looked at a few, and decided why not try to create one for myself (in typical Adrian fashion).

From the beginning I wanted to use a content management system, since I don’t have the time to recreate the wheel. Doing a search on Google will show dozens in every platform and development language imaginable.

I was one of the original testers for the 1and1 PHP/MySQL servers in North America. And as such, I have a very generous plan for very little money. I have used it in the past to host many websites, including my wife’s very successful parenting board (at its peak it had hundreds of uses and thousands of pages servered an hour).

After spending half a day looking at PHP/MySQL options I came across Redaxscripts. Fast, slim and nimble; it is very impressive. While looking at their performance charts WordPress was second or not far behind every test. Couple that with the fact that I couldn’t find many full fledge templates available for Redaxscripts: I decided ultimately to use WordPress.

Since this blog that you are reading is hosted on WordPress.com, I decided to do the same for the Smart Kids’ Apps blog. I soon found that for some of the things I wanted to do it would not be possible or too expensive to do them here. This is especially true since I am already paying for a hosting package at 1and1.

I have known people who have done self hosting WordPress sites, so I figured how hard could it be. I went to the WorldPress.org site downloaded the installer, configured my hosting provider, bought a domain, bought a template (i am not a designer), downloaded a few plugins and in little over four hours in 2 days I had the site up and running.

The Smart Kids’ Apps site might not be perfect, but it took me a fraction of the time and effort than the last time I tried to do something similar (I was in love with Ruby on Rails a few years back).

What have been your experiences with self hosting WordPress? Have you tried anything else?

2 days with my HP TouchPad

Let me start by saying that I loved Palm. I had a few of the first palm including the first wireless palm. I would love going to garage sales and using my palm to look up the prices of items on the web. It was big, had an antenna that you would have to slide up, and it was extremely slow.

I looked at the Pre when it first came out, but ultimately ending up buying an iPhone when it was time to switch phones.  I love my iPhone, and for that matter both the first generation iPad (@mamasnark has one), and my second generation iPad. I have never owned a Android device (although I would love to). So this review (if you can call it that) is based on my observations and mostly comparing it with the iPad, and a little on the blackberry (since I also own a blackberry touch device).

I bought the device for $149 during the fire sale last weekend. The device feels solid although slightly cheaper than both generation iPads. It is mostly made of plastic, and not metal and glass. I don’t know if it is due to the cheaper construction, but I feel that it is less likely to break (I broke an iPad 2 by dropping about 2 feet). So far I have only dropped it 2 times (well the kids dropped it once), and both times the chunk of plastic has not even shown a dent. It is much thicker than the iPad 2, but I don’t have a problem holding it.

So first the bad news and then I’ll go into the parts I like:

1. It takes a much longer to start, and in general it feels a lot slower than the iPad 2. It sputters at time on random web pages, scrolling, and other activities. It is worse on some applications. For example the only useful twitter is extremely slow. Sometimes you get an sign that it is working and you wait, but other times it just freezes. The freezing gets worse as the day progresses which forces you to restart the device (and wait the longer restart times).

2. The tapping seems less precise, and I have not figured out a way to scroll through the letters of a word. I end up tapping 3 or 4 times to get the cursor on the correct place, and sometimes navigating to the wrong place because I tapped the wrong button.

3. The choices of applications are rather limiting. I don’t really care if there is only one choice, but there are applications I use on my iPad that have no equal on the touch. Words with Friends, Chess with Friends, Netflix, Time Warner Cable and an ePub reader are all missing (and many others). The first four are nice to have I guess, but not having a ePub reader means I can’t read any of my tech books on it or read books I have download from the library.

4. Although it promises the entire web (since it does Flash), it is not necessarily true. Many major sites don’t render correctly, and a lot of flash content doesn’t seem to run or runs very slowly. For example tried to listen to some clips yesterday on NPR and was not able to use the web widgets to control the volume. I understand this is not HP’s fault, they can’t control what people do on every website, but I don’t have the same problem on any of my computers with the same widget.

5. The front camera does not seem to take pictures. Just videos for Skype. I did see an app to take pictures, but it isn’t free (I’ll probably end up buying it).

Now the good news:

1. It tries to keep all your data together. It searches across all your items, and not just things on your device (it is configurable). So it will search Facebook, Twitter, WordPress, your local files, and files on your box.net all at the same time. It will sync your contact and calendar across all the devices and sites if you want. It will also notify you of changes on all sites or local files. It will let you know that somebody left a comment on Facebook. I guess iOS does the same thing, but webOS does it all in one place instead of constant modal notifications.

2. Although the browser isn’t perfect it is nice to be able to see some flash content.

3. You can store files locally on the device, and you are able to move files from internet web sharing applications into the device (it comes with 50gig of box.net). It will open those files if the app to open them is available. For example I am able to drop a word document on my box.net account, and then open it on my webOS device. Once downloaded on to the Touch, I don’t even have to be online to view it.

4. HP now sells accidental damage replacement insurance for $50.

Conclusion:

At $149 dollars (for 32gig) or $99 (for 16gig) it is a great piece of hardware. If I were buying just one device and without being able to view ePub documents I would probably purchase a Nook Color instead (you can even install Gingerbread if you get bored with the custom android). At the original price with the current software available, I would have bought an iPad or an Android tablet instead.