v1.60 for iOS now released

So, now that v1.60 finally is released I thought I could summarize what’s new or changed in it

To be able to create a version of RummyFight that works on iOS11, I needed to update the developer suite called XCode. For that to even install I needed to update the Mac OS. The problem was though that my Mac was too old for that so I had to get a new Mac first. Then I installed the newest OS, downloaded XCode, opened the project and thought this would be easy.

But noooo.

The old version of RummyFight did it’s own memory management. It allocated and deallocated data itself without any help from iOS. The problem was that Apple now has decided that all apps should use the built in ARC instead (Automatic Reference Counting) which deallocates data when it’s not needed anymore. Normally this works just fine but sometimes it guesses wrong which turned out to be a big debug problem for me.

Anyway, sure. I removed all deallocations in my code and changed the structure some… but still RummyFight was using an external 2D graphics engine called Cocos2D and that one did also it’s own deallocations. Cocos2D is huge and I don’t know my way around all it’s code so I instead chose to update it to version 3, which supported ARC. Fun thing though: Cocos2D v3 was very different from v2 so I had to rewrite almost all usage of that engine. Sometimes small changes, like that the color white was called 255,255,255 in the old version and 1.0, 1.0, 1.0 in the new one. Not difficult but cumbersome. I mean, the source code of RummyFight is more than 30.000 lines now. Lots to look through

But some changes were bigger, like how to use Actions callbacks, using animated sprites, adding textures from pictures etc. So this was a BIG challenge for me and it took a lot of time. The majority of the 1.5 years that this update has taken has had to do with the conversion to Cocos2d v3.

Anyway… next obstacle.
When the old version of RummyFight was created, only iPhone 3 and 4 existed (and the iPad of course). Since the app was an iPhone app (not a universal), it did however work on the iPad too even though it was scaled and didn’t really look good. Now, the new version has to deal with iPhone 5, 6, 8, X and multiple types of iPads. All with different resolutions, screen sizes, aspect ratios etc.

So I needed to find a solution to that too. What would I do with the extra space on wide screens. How should I handle the extreme resolutions now available in the new phones, etc. How would it affect the positioning av things in the app if the screen was three times larger than the app originally was built for. Would a button placed at coordinate 320,160 still be in the middle of the screen or down to the lower left now?

Well, it turned out it was the lower left so EVERY coordinate in the app had to be changed from absolute to relative. Like, “Place this button 10% to the left of the middle of the screen” etc.

But finally I found out a way to do it and piece by piece all screens started to look close to the old ones.

Here’s a screen capture from an iPad. You can see that I’ve added black borders to the top and bottom for that kind of screen size.

Here is the same screen from an iPhone 8 where you can see I’ve added graded green space to the left and right.

Ok, we start with the Lobby above. Nothing much there is changed. However a few small bugs are fixed though and also some translation fixes of words too long to fit. Visually it looks more or less the same apart from the Footer which now looks the same on all screens (it didn’t before). The Top on all pages are now also animated and the buttons are not completely static anymore. I thought it would bring some life into the app again.

dump_greengameSo, what’s changed inside the Fights then? Well, as you can see the player in turn is now a big yellow panel instead of just yellow text. Also, clicking on the stack of tiles in the upper right corner now opens a window with detailed fight history: When someone made a meld, how many tiles it used, when an opponent did a NewTile etc.

Also fixed a bug which has been around since RummyFight v1.0: When placing bad tiles on the board only the last placed tile were flashing, showing it is bad. Now all bad tiles flash.

Oh yeah, you might notice the clock in the upper right corner? It shows how many hours, minutes and seconds you have left before you are timed out. Great for Speedgames.

Also updated and changed a few of the Gifts, including a new version of the Hoarder song. A nice little addition too is that you now can cancel the download of a theme by tapping on the download dialog window. Pretty handy if you are on a slow connection or something.

dump_tetpuzTetpuz has gotten a makeover with new tile graphics. I’ve also added the MINE-section in the highscores (showing YOUR best scores) and also how many submitted scores there are.

I’ve also added a visual explosion animation when blowing up a bomb and tweaked the numbers a little to make the debris move better. And yeah, almost forgot: Try to tilt your device while having debris at the bottom of the screen. I’ve always wanted to add that feature 😉

Of course there are multiple other things changed in the app too but these are the ones I can remember straight from the top of my head.

I would say that 80% of my work has been invested in just making the code compile again. Then 10% has been about debugging and sorting out issues related to the ARC (memory management – objects disappeared before the app was done with them etc). The last 10% is related to the new features and making them work.

Add almost three whole days of work including a long phone call to tech support in USA just to be able to upload the app to Apple for review and acceptance. It’s almost ridiculous how difficult it is to release apps to them. You really need to be a rocket scientist for that.

Well, let’s wait a little and see how well this v1.60 works in reality before making any new plans. I mean, surely there will be a need to fix some urgent new bugs. And then we have christmas. I have 2 kids, a wife, three cats, a horse, 50 fish, 2 axolotl lizards, a job and a life. Give me a time to breathe and we will see what 2018 will bring to RummyFight.

More than 30.000 lines of code now! How about that


0 Responses to “v1.60 for iOS now released”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: