The past weekend I was determined to fix few issues with the Scoreloop I have had. The problems I have had with integrating Scoreloop are mostly related to my own game engine. Issues like how I change Scoreloop user “credentials” so that players can use their own unique name and email address if they want to.
Scoreloop has pretty decent documentation and nice sample code. It can be found here.
Scoreloop assigns a generated username (currently of type PlayerXXXXXX, where XXX is a long digit) which it continues to use when communicating with the Scoreloop service. My problem is that I need to read input from the user who wants to change the “credentials” namely username and email. With normal Android Activity I could utilize keyboard and TextField functionality but since I am using Canvas and Bitmaps to draw I can’t use them. At least, I don’t know how.
I have solved this issue already once in my Highscore screen in which I have implemented a simple keyboard for reading username for local highscore. I thought I could redo this with Scoreloop username and email but it wasn’t that simple. I don’t know how Android default keyboard solves layout issues, like when touching textfield, does it bring the keyboard automatically up and how events are handled when updating the textfield etc.
With these type of issues I continue to struggle and I am feeling that I am too far on the sidetrack considering what I should be focusing at. With other time constraints I am not proceeding as much as I would like with my game. Hopefully I can solve this soon 🙂
Update: When I got down to reading the user input I realized that my keyboard implementation didn’t support symbols or anything beyond regular letters. How can I read user email if my keyboard doesn’t even support the “@” (at) sign? Hahhaa, how silly of me. Then well, another problem was that my custom font didn’t have all the needed letters. Even when I could read the input I couldn’t show the email because of special symbols. Sigh. Big time! I could of course replace “@” -sign with “(at)” or similar but… Oh well. More things to implement 😉
Here’s an screenshot of early stage HighScoreScreen with keyboard which is pretty much what it looks today.
I have brought home another Android device. It’s Motorola Tablet (Xoom 2 ME), thanks Romney!
I am going to do some testing and try how well my game supports different screen sizes. I have tried to implement everything without hard coding x and y coordinates and calculating them from device screen width and height. I am sure there are few places it will not work as well as I had planned but this is my chance to fix them. Also I might have to draw some additional (bigger) pictures but we will see.
I did try to run the game with Emulator using Nexus settings with bigger screen but it just keeps crashing, I don’t know why. Real device is of course authentic 😉
Have a nice weekend!
I have not been able to do as much as I would have liked regarding my game project. We are having a release at work just next week, so I have been pushing things ready and tested. That’s why I have also been very tired in the evenings and I just didn’t have the extra energy to continue with my game.
I tried to switch to LibGDX this week though. I took all the code I had written and created another project with LibGDX. What happened I got at least thousand errors because I didn’t “import” my game engine. All I copied was the classes that use my engine.
It was of course expected, and I was just to try to do some simple things, just to see how I could utilize LibGDX in the game rewrite. Well, it turned out to be harder than I thought and I was put down by the amount difficulties I encountered. I probably did something incorrectly because I didn’t get even simple thing to run. I have to check that later but with more energy and time.
So, I went back to my original project and decided to fix some small annoyances. I also took another look (a much better look) about the AdMob. It turned out that with some small tweaks to my engine I could show Google Ads in my game screens. It’s not the best solution ever but it works, with few runs at least. I probably should read a bit more about the ad sizes and stuff. Now the area I am allocating is quite small and I don’t really know how the area affects on the effectiveness of the ads.
Here’s my brand new main screen with the game menu and Google Ads. What you think of it?
ps. It was father’s day today (sunday the 10th) so congratulations to all fathers! And special congratulations to my father!
Well, not exactly. I have currently approx. 5400 lines of code and my skill level is about 9. You do know where this line is taken from? It’s a famous(?) internet MEME started from this.
What partially explains the amount of code is that I have written some game engine code as well. This is probably not very wise thing to do since I should be concentrating on the game itself rather the framework. But one of my original goals was to learn game programming and what is better than learning to do the engine?
Having said that I am even closer to switching to LibGDX or similar because of the side effects that I am having for my own framework. I was redoing this weekend my High Score feature by adding difficulty and game mode into play. I originally had only local High Score with just one TOP 10 leader board but since my game will have difficulty setting and two game modes I thought the High Scores should be separate.
I was also thinking to try some leader board service like OpenFeint or ScoreLoop. I don’t have any experience on either but it seems that OpenFeint is discontinued and is replaced by GREE. I read few articles about the ScoreLoop and people seem to be happy with it so I decided to give it a try.
I won’t go into details here about the setup but it was pretty easy to do. The real problems come when I try to integrate it with my game engine. ScoreLoop is built asynchronously so that you will get call backs and because of the design you need to execute the calls in main UI thread. This is a little of bit problematic for me and I will probably have to do some refactoring. One very annoying feature in ScoreLoop is that you need to Agree to Terms of Service to use it. Well, I don’t mind agreeing (or asking for agreement) but you cannot customize the UI element that will pop-up. At least I don’t know how.
That will look very strange because ScoreLoop dialog is blue and white and totally looks different from my other game design. This is big big flaw in my opinion. Lets see how it goes if I can go around the restrictions.