Archive Page 2

10
Apr
14

It compiles!

Finally, RummyFight for iOS finally compiles again in XCode. A huge amount of code has been replaced or adjusted for it to be able to compile with the latest Cocos2D in the latest XCode development enviroment.

But now it finally compiles without errors again.
However, the app does not work at all.

Hmmm…

18
Mar
14

Waaay to long between updates

Hi again. I’m alive!
Yes, I really am, despite me almost disappearing from the world for a couple of months. After spending almost all my free time with RummyFight for 2.5 years, I felt I needed a break. Not only because I was getting tired of my life but also because I needed to make some money.

But aaaanyway, since a couple of weeks now I’m back in the saddle making code for RF.
However, I don’t know if I am a bit over my head this time. I’ll explain why.

The macintosh I have used for the iOS-RF development is an old one and only capable of at best running Mac OSX 10.6 (Snow Leopard). This OS was released in 2009 so it’s pretty darn old by now. The latest version of the development enviroment XCode possible to run on Snow Leopard is XCode 4.3 which also is ooooold. RummyFight is using a 2D graphics library called Cocos2d to make it easier to use touches, pictures etc. The latest version possible to use in XCode 4.3 is Cocos2D v1.1 which is ooold.

So, the existing RF is using an outdated graphics library in an outdated development library on an outdated operating system on an outdated machine. It’s pretty amazing it works as good as it does.

But we can’t have this!

So now I’ve managed to setup a virtual Mac on my PC, running a brand new operating system, the latest version of XCode with the latest version of Cocos2D… and begun converting the RF-project. And my god, there are a lot of things to convert.

First of all, newer iOS-apps can use an automatic memory management model called ARC which means I have to strip away all code that is managing memory, deallocating resources, releases reference counters etc since ARC is supposed to do this for me. Then I have to update all calls to Cocos2d which has changed a lot from v1.1 to v3.0. Then lastly, I have to redesign some code to make it friendlier to XCode. Seems Apple has introduced quite a lot of “don’t do this” in later versions… which I unfortunately did.

So… this task is quite daunting and I don’t know how long it will take for me to be finished.
But when I am, RF for iOS will be faster, better, smaller and cooler.

And that’s worth the work!

24
Jun
13

Yes, the tournaments are coming

We are still making progress with the tournaments feature in RummyFight. It’s a complicated process since it’s a feature that affects lots of parts in the app. Not only are we implementing the tournaments themselves but also four different fight modes, trophys for the winners, updated profile dialogs, updated statistics page but also the possibility to look at other players tournament fights while they are being played. Why this, you ask? Well, we thought it could be fun to watch a final in a tournament even though not being in it yourself, etc.

So what’s the current status then?
Well, most of the new things are already in place. Now we are working on the interface to make it easy to use and fun to look at. Pinch zoom in the Schedule, activation of the “if there has been three Passes in a row, then a winner is selected anyway”, etc.

Also, some new rules are being implemented regarding acceptable melds and there are lots of small improvements of the translations.

But we are getting there. Take a look at the screen shot of a tournament schedule and be your own judge.Screen shot 2013-06-24 at 11.03.32

17
May
13

Hey hey hey. Look at this!

See anything new in the Lobby?

tournaments

25
Apr
13

Working on tournaments

Since a few days, I’ve begun implementing tournaments into RummyFight.
Damn! Tricky as hell.

Not the tournaments themselves but the alternate gaming modes that I plan to implement as tournament exclusives. There will be a NORMAL mode, a FRIENDLY mode and a TRICKY mode. Maybe even a QUICKY mode.

Now, what is this, you say?

Well, imagine when you meld that a stray tile will apprear on the board afterwards. A single tile from the stack that is placed at an empty place somewhere. This means that the next player MUST incorporate this tile in their next meld to be able to meld. If they can’t, they have no option but to get a new tile regardless of how many Groups or Runs they have on their hand.

Could be interesting, right?
Stay tuned!

23
Apr
13

And there we have v1.49 for Android too

Yesterday it was time for the release of v1.49 for Android too. Lots of small improvements and a few larger too.

THE CLOCK
First off is the clock in the Lobby. This was requested by lots of players since they spend a lot of time in the app and tend to forget the time.

THE BOTTOM MENU
With the introduction of localization in the app where different languages have longer or shorter words for the same things, the existing bottom menu didn’t really hold up anymore. It was too smart for it’s own good and created layouts that looked like shit on some devices. I therefore threw out this Android standard menu and created one on my own where I have full control over the layout and the visibility. Plus I was able to add the chat bubble indicator in the menu too if there are any unread messages in the fight.

VISUAL MENU BUTTON
Some devices don’t have a physical menu button so now I’ve added a visual one, available to tap to bring up the menu

NEW TUTORIAL SLIDES
Replaced three slides with new ones and finally there’s also a mentioning of the button lines changing color when the first meld is made.

SELECT LANGUAGE
With the introduction of localization in v1.48 the app autodetected the device’s language and displayed all texts accordingly. However some people have requested an option to override this and use another language than the detected one. Now this option is added in Settings too.

THEMEGALLERY
A little change for those using the free version. Now when they create a fight, they get to see the theme gallery and the list of custom roundtimes. However they can’t select anything other than the two built in themes and the standard 24 hrs roundtime. I made this change to allow them to see what they miss out on not buying the full version.

GERMAN LANGUAGE ADDED
Now the app supports the german language too.

NEW CHAT BUBBLE
The old chat bubble in the lobby and fights, indicating there are unread messages in a fight is now replaced with a red badge which is much more visible and easier to spot.

OTHER BITS AND PIECES
* Lots of language changes and adjustments in the Dutch translation. Also some changes in the swedish and english versions.
* Location of the Exclude-line in lobby is now lowered by two pixels
* Page-indicator in the Tutorial is now yellow instead of white
* The report-button in About is now using bold text like all other buttons
* In Statistics, total points and number of fights is now formatted with dots and commas
* Bug fixed which didn’t allow gender to be changed in Settings if using another language than english
* The Delete-button in ProfileGallery is now localized too. Forgot that one
* Removed the double click sound when selecting a fight in the Lobby
* Made the “Press the menu button to see more settings”-text in Settings brighter and more visible
* Made the highlight showing whose turn it is in a fight a lot brighter
* Fixed bug which sometimes didn’t show recently created poolfights in the column to the right in the Lobby
* Adjusted the “flash” when tapping the buttons in a fight to cover the whole button area. Was a little unaligned before.
* The lines surrounding the buttons in a fight was a picture before. Now it’s vector lines, making for better upscaling on large displays
* Adjusted some textureatlases and realigned some textures in them to get rid of strange white or black lines on large displays.
* Theme pictures are now rendered with another option which should make them a little better quality
* Adjusted position of the ticker texts at the very top of some pages. Moved them up 2px

Well, that’s about all I can think about at the moment. Version 1.49 is already available at Google Play and should be available for download from Amazon within a few days.

And now it’s time to begin work on v1.50.
Tournaments, anyone?

11
Apr
13

Finally time for a new iOS version!

It took a while but now I am finally finished with an update for iOS. Up until now the latest version for that OS has been v1.46 and the Android people has had v1.48 to play with for quite a while. Now this can’t go on for too long and about 10 minutes ago I submitted the new version to iTunes.

It’s not v1.47.
It’s not v1.48.
It’s v1.49.

Yes, it’s true. For the first time in RummyFight’s history, the iOS version will be ahead of the Android version.
Why? Well, they’ve been waiting so long (more than 2 months now) and I feel it’s time for them to be in the front line for a while… at least until I have implemented the same functions in the Android version too.

So what’s new then?
Hmmm… let’s take a look at the Lobby for a start.

Screen shot 2013-04-11 at 16

Can you see what language it is in?
Yes, it’s true. The iOS version is finally localized too. Now it supports English, Swedish, Dutch and German which is autodetected based on the device’s settings. However it can also be overridden in Settings to be any of the four languages supported.

Also visible in the Lobby is the clock in the middle. This is added on popular demand. Seems lots of people spend a lot of time in the app and like to be able to see what time it is without having to leave the app. So… here you go. A clock showing the local time in the local time format.

So… what’s new besides this then?
Well, Tetpuz has had it’s graphics improved and also the bomb added. Bomb, you say. What’s that? Well, place it and tap it and you’ll see.
Then we have the Tutorial which is improved with some new slides and texts.
Then we have a couple of improvements and bug fixes. One of them was that the app sometimes could crash when leaving a fight. Fixed now.
Then there was a bug that showed the wrong creation time at newly created fights. Fixed now!
Another bug that didn’t show the FightText in the invite dialog – Fixed!
Improved error handling when trying to display a broken theme or profile pic. Shouldn’t crash the app anymore.
A small bug that showed the wrong space used in the Clear Cache dialog – Fixed!
An even smaller bug that sometimes didn’t put the name of the player in turn in bold text – Fixed.

And lots of text improvements here and there and other stuff too of course.

So, when will this v1.49 for iOS be available?
Well, we need to give the guys and girls at Apple some time to review and approve the update first. This normally takes about 4-7 days so hopefully it will be downloadable from App Store during the next week or so.

And what’s next then?
Well, the Android version will be v1.49 too soon. Then I will probably release a free ad-based version for iOS too.
After that… it’s time for Tournaments.

Keep your eyes up… and have fun!

02
Apr
13

Yes, I am still alive ;-)

I’m well aware that I’ve been quite absent lately. I’m sorry for this. However I’m not dead, I’m not exhausted, I’m not sick, I’m not tired of RummyFight… yet.

The simple reason for my absense is personal. I’ve gone from being a single father of two kids to be a father of two kids living with Messer, the love of my life. To move all her furniture into my apartment and integrate both our lives took a few weeks and because of this, RF development had to be paused.

But don’t fret. I HAVE been working on RF a little during these weeks too but not at the normal pace. However since today I feel I’m back in the saddle again and v1.48 of RF for iOS is almost ready now, including bug fixes, language localizations and physics handling in Tetpuz. In parallell I’ve begun working on v1.49 for Android which will be the last update before v1.50 where I plan to have added Tournaments.

The localization of the apps to support multiple languages was really a tough nugget to pull off. I had to develop several tools just to make sure everything always is synced correctly even though Android and iOS handles localizations differently. But now both versions compile with my new tools and the upside is that the german language also will be supported from the next release.

So just sit down and relax for a while. Soon everything will be back to normal again… with a developer that’s just a litte more a happy puppy.

By the way: On popular demand 😉
Here is my developer’s desk. This is where RF is created. This is where the magic happens!

rf_desk

31
Jan
13

Sometimes I make myself happy

One challenge with RummyFight is to constantly optimize the servers. Since there is an increase in both players and playing there will sooner or later be a limit of what the servers can cope with.

At the moment that limit is still pretty far away but I rather spend some time with it now because I want that to do it later because I must.

So what can be optimized then? Well, even though things are pretty fast as they already are there’s always a few milliseconds more to tweak out of the system here and there. My focus lately has been on the “FetchLobbyFights”-routine which is called pretty often by the apps. As a matter of fact, it’s called about 10 times a second at peak time which means that if I can optimize it a little it might make a good difference after all.

So… up until now, the FetchLobbyFights has been a combination of three database calls and some post processing logic. 10 calls a second * 3 = 30 database operations per second and that’s a bit too much according to me. Also, each fetch took about 110ms to make meaning that every minute there’s been about 66 seconds of work for the server (many of them in parallel though)

But with some clever coding I’ve been able to reduce the database calls to ONE per fetch and now the call takes about 67ms instead. This means a reduction of database operations of 2/3 plus a reduced workload of 39%. That’s a lot! And besides making fewer database operations, the one remaining is also a lot friendlier to the database since the sorting is made in the apps afterwards, not in the database (outsourcing the work, anyone?)

And I do like the size of the database query now too 😉

SELECT d1, d2, d3, d4, d5, d6, d7, d8, d9, p1.d10, p2.d10, p3.d10, p4.d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22, m.d23, d24, d25, d26, d27, d28, m.d29, m.d30, p1.d31, p2.d31, p3.d31, p4.d32, d33, d34, p1.d35, p2.d35, p3.d35, p4.d35 FROM TABLE1 m join TABLE2 p1 on abs(d1)=p1.d1 join TABLE2 p2 on abs(d1)=p2.d1 join TABLE2 p3 on abs(d1)=p3.d1 join TABLE2 p4 on abs(d1)=p4.d1 join TABLE3 on d2=pk_d2 WHERE (abs(p1.d10)=d1 OR abs(p2.d10)=d1 OR abs(p3.d10)=d1 OR abs(p4.d10)=d1)

All row and table names have been changed in the above query so there’s no use for you to memorize anything. Just wanted to show that I find it amusing that a query with 5 JOIN and a WHERE with mathematical operations can be as fast as it is.

And now… back to the app 😉

21
Jan
13

Some fun numbers

While working hard on the iPhone update of RF to make it v1.48 too, I thought it could be fun to publish some numbers about RummyFight, since they are, in some ways, pretty impressive. At least I think so 😉

So first off, how many people are playing RummyFight?
Well, it’s a difficult number to define. One day there could be X people playing. The next day there could be the same amount but totally different people. Since there can take 72 hours between melds in a FourFight you don’t need to check in every day if you don’t like. But we have defined “active player” as someone starting the app at least every three days and at the moment there are about 22.000 people doing that. If we would increase this to a week, there are almost 40.000 different users playing. What we also know is that these numbers are growing. Every week the “active users number” are increasing which means that not only are new players discovering RummyFight but the old ones stay too.

How many fights are being played
We are getting close to 15.000 running fights at the moment but there are more fights being started than ended every day so it’s a growing number too. You must take into account that some fights last for weeks and some are finished within 30 minutes. Some fights are between two players and some are between four so it’s not as easy as saying 15.000×2 = 30.000 active players either.

How many melds are being done every day
Now this is an interesting number. A meld is when someone makes their move and is a good estimate of how much RummyFight is played. I like this measurement since there are other Rummikub apps out there bragging about having 100.000 active fights. However what’s the use when people only make a meld a week due to slow gameplay? I mean, it’s not the amount of fights or players that are important. It’s how much you PLAY.

Yesterday we scored an all time high with juuust short of 180.000 melds being made during 24 hours. That’s 2 melds every second around the clock. What makes this even more impressive is that 70% of those melds were made between 4pm and 11pm (swedish time) which means that during those hours there were 5 melds being made EVERY SECOND. But yesterday was an all time high. Normally there are about 140.000 melds being made every day, however this is also a number that’s increasing. Just two weeks earlier the average was 127.000 melds per day.

How many data requests are being made every day
Every day? Let’s focus on every second instead. I mean, a meld is one request. A Login is another. Then you have “get bookmarks”, “refresh lobby”, “create fight”, “open fight”, “send gift”, “change settings”, “get statistics” etc etc. There are A LOT of requests from the apps to the servers. At peak times about 200 requests… PER SECOND… which makes the very rapid response times from our servers even more impressive.

So what are the response times then?
Well, it depends on the nature of the request and the amount of data being involved and one need to remove network latency from the factor too. I mean, if you are using a slow mobile connection, it’s not the server’s fault it takes a second or two. The servers were done quickly but then it took the data a while to get to you. Also, some data takes some time for the phone to process and update the interface with too.

However, the average response time of the servers, when not including the time for transferring the data or parsing by the phone, is about 70ms. That’s LESS than 1/10 of a second for fetching active fights, creating new fights, making a meld, etc. That’s faaaast.

How much is people using the chat?
Pretty much actually. Since it was implemented in RummyFight there has been 894.146 chat messages sent.

How much is people playing the hidden game of Tetpuz?
Don’t really know. What we do know is how many Tetpuz games that are finished and scores being sent to the server and that is 865.807 so far.

So what can we expect in 6 months?
Going by the constant increase of new players, increased playing and bigger popularity, probably servers with smoke coming out of them 😉




Categories