Friday, August 30, 2013

iAd in iOS with Marmalade (on PC), what a pain

Ok, so the title does describe what I think. Though it is not all bad to be honest.

Let me explain a bit more...

I went to iTunes Connect and clicked the easy to see button to activate my iAds for my game (click ya game under manage apps, then the button is top right side). It was very easy to activate as ALL you had to do was confirm you were activating them and then save it. Done on the Apple side of the setup equation (this made me hapy, no stupid IDS or codes to put into my code to make sure I was serviced ads).

Next up was to work in the code from Marmalades example. I have to say that it was pretty easy to use. Setup the MKB(project) file with the iAds extension and then grab the relatively few routines I required and placed them into a class for use in my game. Once again, very easy to setup and this did not take me long at all. Then it was time to run the code.

I setup some of my title page buttons to do an extra task, so activating the config button would tell the Ad to show, activating the shop button will hide the Ad. I also added in several debug prints to the screen to tell me what state the Ad system was in. I wanted to know that I had Ads ready to go or not, and then if they were Showing or Hidden. So far so good. In fact it was still good till I ran the game and saw that an Ad was active and I touched the config button to Show the Ad. That is the moment things went awry.

The Ad appeared at the top of the screen, which was ok, I don't really mind it being there, though I would prefer the bottom once I get them working, or that was my thoughts anyway. However there were problems. Namely the screen should have shrunk vertically to fit in the Ad, but it didn't. Instead it pushed the whole screen down and so I lost a bunch of screen off the bottom. Also the touch input should have been shrunk to the newly sized screen, and apparently it did, only now it didn't matchup with my graphics as they were pushed down, Gah! If they had match I could have worked around this issue easily enough, but not now.

So I went looking for how to set the Ad to a different part of the screen, and I read the help info on the iTunes developer site and was excited to see so many options of where to place it, and also what sizes of Ad I could place. I found out later when I looked all over Marmalade that the extension doesn't actually support different placements for the iAds. Ahh well I figured I only really need one, but one that works. After reading all over the place on the internet along with the Marmalade Dev forums (obviously). I discovered this problem has been around for more than 2 years. So the chances of it being fixed is small. I presume it isn't addressed because there really are very few complaints about it not working. But there is a bunch of good news.

The Good news is that there is a was around this. Firstly it is said that if I had the Ad working on the bottom the screen would shrink along with the touch input and so the Ad would seamlessly be part of the screen it shows on. Great.. but how do I get the Ad on the bottom of the screen. It seems that all I have to do is modify the .mm file and rebuild the extension libs. Well sadly for me developing on a PC I can only rebuild iOS libs on a Mac. The actual source files for the library I found on Github here. So it should be possible to get a fix for this. I have asked a couple of mates, but they do not really know how to rebuild libs on a Mac, and the same for me at this point. I will have to read up on that once I have my current tasks sorted out. I really would like to have the iAds working in this game, to help supplement the games income.

I hope this blog post helps others in my situation understand what is going on with the iAd in Marmalade and its problems. If there are more problems, I have yet to find them, but I will post once I do.

Laters
Da Voodoochief

Saturday, August 24, 2013

Setting up IAP for iOS WTH?

Well after my recent success with GameCenter I figured next up was to work on the iAd code. And I am not going to talk about that here, lol. That is for another post though....

Today I am going to complain about IAP or In App Purchase setup. I was still all abuzz because I was hoping that setting up IAP was going to be nearly as easy as the iAd and GameCenter was. Now it looks easy and in fact setting up my first purchasable item seemed to go swimmingly, so far so good I thought. this is great. I thought I would then setup a couple more items for purchase to allow me to test the system more thoroughly. Well that is when I got confused...

I had setup the first item. Then I hit save and was presented with this,
The first In-App Purchase for an app must be submitted for review at the same time that you submit an app version. You must do this on the Version Details page. Once your binary has been uploaded and your first In-App Purchase has been submitted for review, additional In-App Purchases can be submitted using the table below.

what does this mean ? Does it mean I am not allowed to setup a new item for purchase until I have some form of screenshot.. of What exactly?

Is this a screenshot of me showing how I present the purchase Item information?

The upshot is I am not certain how to proceed with this at this time. Next up for me is to get the game to setup and do the screen design for the IAP in the game itself. Maybe it will work with this one item and then I can try this screenshot of something and submission thing. Though my game is well away from submission. So what do I need to do exactly?

Good luck in your endeavours,

Laters
Da Voodoochief

Friday, August 23, 2013

GameCenter Now Done

It was so Easy.

No, really it was. Both ITunes Connect and its Manage Apps, section along with the Marmalade implementation (extension) worked really easily and well together. I am surprised and also excited, in fact I was so excited I moved onto iAd.. but that is to follow.

Back to Leaderboards and how easy they were. In ITunes Connect I clicked the Space Invaliens game, then clicked the button saying 'Manage GameCenter'. In there it was eminently easy to add leaderboards, and sort them, and rename them (when I made an error). So easy I setup 5 boards for the first 5 levels best scores along with an overall board. I have to add though that Apple could make it faster for me by allowing me to setup a range of leaderboards and simply increment their name. As I might end up with 100 levels, that is a lot of clicking, eek! Still, easy and does as it says it does. Setting up a couple of test achievements was just as easy, though you will need 512x512 images ready to upload for each achievement.

In Space Invaliens I am using Marmalade and their GameCenter extension worked great. Setting the new score and also bringing up the GameCenter GUI were so easy. Geez, it took me about 20 minutes to add in the Achievement code and also get a button on my title page to show the GameCenter Gui at the achievement screen. Simply awesome. I ended up sticking my code into a class I simply called cGameCenter and is accessible from anywhere in my code.

I highly recommend anything thinking of doing this to simply do it! It is very rewarding and I love it.

One sad note from me is that I will be implementing the Google Play Services for Android devices when I get to it, and I have been reading up on that system. The sad aprt is they ONLY allow 100 leaderboards per game. I am not sure why such an arbitrary number, but that will pose a problem for me game if I actually go to 100 levels. As I would need several more leaderboards to finish up the game. Still I have yet to go there.

Laters
Da Voodoochief

Tuesday, August 20, 2013

GameCenter 30%

Well I worked hard last night on trying to get my GameCenter stuff sorted out, as I changed my implementation to a nice class. The only issue is that it didn't work properly. Oddly enough It would say I am not authenticated (a Bool), but I would see it tell me welcome at the top of the screen, Grrr.

I could not see why my App was not working and after a hour or more of creating special debugging versions I could see that my Bool was simply not altering when the callback said I was authenticated. I had it as a static in the header, and I did this as I thought that the callback being static this would be a good match.. Yeah, no more thought than that to be honest.

Well once I proved this was the issue I removed the static and declared it as a Global (I wanted this one as a global anyways). Then it all worked. I was now happy and felt I was at 30% through my leaderboard and GameCenter implementation.

In fact I was more than that, as I was able within an hour to create a Leaderboard button on my title page and allow that to bring up the GameCenter GUI and show my leaderboard, which I had placed a score from my game over situation for testing purposes. This mean't I was suddenly at about 75% implemented. WOWZA!

So tonight I have setup a few more leaderboards so I can try and record single level scores. I also created a couple of Achievements.. and I will try to implement them after I have worked on the individual level scores.

The only failure of the night consists of my son not being able to sign into the sandbox GameCenter to get another score in it to go with mine. Still I can work on that more tomorrow when I have more time.

So far it has all been pretty great apart from the stupid static variable. I would add though that I think Apple could add a feature on their web site to allow me to create a whole range of Leaderboards in one fell swoop. After all I may have 100 levels... eek.

Laters
Da Voodoochief

Monday, August 19, 2013

GameCenter Authentication, initial setup

I managed to procrastinate most of the weekend away before I actually got round to working on the GameCenter implementation in Space Invaliens. Now of course I had it setup in iTunes Connect, I also had read a bunch about how to use it. Yet.. well, nothing quite works as well as experience.

Sometimes ya have to simply give it a go...

So Sunday night that is where I found myself. Time to get it sorted. One of the off putting things for me was the fact I have to do this on the iPad itself, and not simply use the emulator (oops, simulator) to show me it working. so creating a file to upload to www.testflightapp.com and then download to my iPad is a bit annoying, though not really very time consuming in all honesty.

So I put in the include (single header file), and I added the extension to my .MKB file. It compiled and I took this as a good sign. Then I grabbed a bit of the Marmalade example code for player Authentication and placed it early in my own code. Then I created my apk file and uploaded it to my iPad.

Well it didn't work. One trick I use is to color the background various colors depending on what is happening in the code. So Red for bad, and green for good. In this case I had set Red up for if my communication error'd out. However my screen was not red, in fact it was black, which mean't it hadn't done much of anything as far as GameCenter was concerned.

I realized that I was not updating the system, as I was in a closed loop awaiting the login to work itself out, however this mean't the system was not getting any time to actually do that. DOH! a Noob mistake in some ways. I simply added in a flush and tried again.

Next I am pleased to say was the requester appeared to have me sign up or in (all good), and so I did that. It even notified me that I had indeed signed into GameCenter (YAY). Now I had run out of time for my evenings work, as I have to be up at 6am Monday... So off to bed for me, and tomorrow I will try and display the Leaderboard GUI, and then upload a score..

Laters
Da Voodoochief

Saturday, August 17, 2013

Apple got it right

It is not often I say much nice about setting up stuff or generally dealing with Apple authority and setups. However this time I am saying something nice.

I needed to setup my game with GameCenter and the only thing I knew was that I would have to go to Apple Connect and do a little setup. Oh no, here I go again into the Apple web pages in the Safari browser (only the safari browser works correctly for all Apple web pages). Still I went into Connect and Clicked the Manage Apps link and then clicked the Space Invaliens link.

This took me to my usual Game/App management page, and lo and behold in the far top right side there were the links to not only GameCenter, but also iAd setup and IAP. Well I will come back to those later I am sure.

So I went and clicked on the GameCenter link and it took me through a setup of how to create a leaderboard and also a nice simple test Achievement. I was going to put instructions, but believe me when I tell ya they are not needed. Which is surprising and very pleasing.

Now I have got to write the code in my game to actually access the GameCenter stuff, and I am sur I'll blog about that soon.

Laters
Da Voodoochief

Wednesday, August 14, 2013

So much stuff to do

I have so many things to do and below is my short list (short cos it is the MOST important items).

  1. Get GameCenter test App running on my iPod
  2. Realize I need to setup test App and all sorts of stuff to be able to test GameCenter (bah!)
  3. Send off an invoice for my work on Hoopfighter. I hope to find out soon who and when it might be published!
  4. Get IAP for iOS test app running on my iPod
  5. Realize yet again I have a bunch of setup to do before I can test anything
  6. Be excited about the prospect of working with a great artist on not only Space Invaliens, but also stuff in the future! woohoo! (done and done again haha)
  7. Update my Web sites
  8. Release Free/Lite versions of my Book Apps, so more people can try before they buy (if they see it)
  9. Figure out what else I have forgotten to put in this list :O
I am not the biggest fan of setting up stuff with Apples web sites. I will do a post about all the elements one has to set up for IAP and GameCenter when I get to do them. Maybe I can even find a useful blog from someone else talking about this very same thing.. hmm, now that's a plan eh! Once I have the correct setups done, deploying the test Apps will be very easy. One of the nice things about Marmalade is the fact their examples tend to work easily.

Now I am getting a little concerned about when my license with Marmalade runs out. I think it might be pretty soon (October?). So I will also have to check on that. If I don't get more paid work, I will not renew my 500 dollar license. Instead I will go back down to the 150 license. Which will be a slight downer.

Ok, back to work for me,
Laters,
Da Voodoochief

Tuesday, August 13, 2013

Test post for Auto Facebook posting

I followed the instructions for the NetworkedBlogs App. Apparently when I do a post now it should go to my facebook page magically.

I wonder if it will work?
Da Voodoochief

Sunday, August 11, 2013

Game bible

My Space Invaliens game is hopefully not going to be simply a game. I really want it to be an IP or Intellectual property.

To do this I have expanded (actually I started with ) the design of the game to cover a full array of areas so the game could become a fully fledged franchise, or even have pillows made of some of the game elements.

As I started out with this kind of scope in mind, I did not find it too hard to design the elements and ideas I would need to make it possible. Today I have been very busy typing up all the elements from my extensive notes. I still need to do more, but it is on its way at 6 pages. This document I am calling the game bible. I will try to continue to develop the ideas for the game and of course try and make things friendly for the possibility of becoming a franchise.

The other use of this document is so an artist can understand my ideas more readily. Once read they can hopefully add to the bible with real imagery.

Laters, gotta write more in my document.
Da Voodoochief

Thursday, August 8, 2013

Back in Town

I have now successfully travelled from the far off country of England and have arrive back in California. Amazingly I hardly got anything done game development wise while I was away visiting my family in Derby. I really thought I would be able to work on something, code or design. However I found I was simply too tired and not able to bring up any more creative juices.

Of course I expect that to change now I am back in Socal. Time to finish up whatever is needed for Hoopfighter and then get on with writing up the game description documentation for my friend who is interested in doing the artwork for Space Invaliens. I am very excited about this and will be trying to get that all sorted over this weekend. Hopefully I can get him as excited as I am about its potential for being an IP as much as the current gameplay. Time will tell.

Back at work today was interesting, I feel a bit like a loose end and am in need of finding what I do next, rather than my well functioning team. Still it was great to come back to everyone working :)

G'night... Jet lag has taken over my mind and body...

Da Voodoochief