Post news RSS Infinite Dive 4.0 released

Massive update to mobile game, Infinite Dive: A Falling Game.

Posted by on

Infinite Dive 4.0 has been released for Android with iOS soon to follow! What started as a small update to the GUI turned into quite the overhaul. We re-implemented the GUI using Unity’s new UI system which gave quite the performance boost as well as insured quality on all devices. Then, I got caught up in trying to decouple everything, which may or may not have been worth it, but at least I followed the boy scout rule of leaving the code better than you found it!

However, one change I’m particularly excited about is the clever new implementation of the decryption system (I can call it clever because it wasn’t really my idea). In the previous versions, every potentially encrypted letter was displayed as a separate GUI element since we used a different font for the encrypted letters and there’s no way in Unity to change the font inside of a GUI component. This was terrible for performance as I was forced to use the composite design pattern and perform calculations on the position for every letter (it bore many similarities to the code you would see in a word processor).

I have since learned that I can get around the font hurdle by combining the fonts using Font Forge. The trick is to add the encrypted letter font a set amount higher than the decrypted font (I decided to use 100 as my set amount, so if ‘a’ has an ASCII assignment of 97, the encrypted ‘a’ should have an ASCII assignment of 197). Now I can put the encrypted text in the same GUI component and simply convert the char to an int, add 100, and then convert it back to a char and BAM! You’ve got some encrypted text. I then, of course, added rich text tags to change the color of the decrypted letters.

That’s a very bare bones explanation, so if anyone is interested in implementing this in their own game, let me know and I’ll write an in depth tutorial.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.