★ TouchArcade needs your help. Click here to support us on Patreon.

Upcoming Platform Game: Suzy Cube

08-04-2017, 12:03 PM
Suzy Cube Update: August 8, 2017

Sorry, no multilingual support yet. Figuring out the best way to load stuff and the best format in which to store localization text has proven to be more trouble than I originally expected.

I know, I know, excuses excuses! Truth is, I haven't been concentrating on the game much this week. Little bits of work here and there mostly related to file loading and tester gameplay review have been disrupted by shopping trips as I attempt to cross everything off my wife's and my shopping list before returning to Caracas.



Among a handful of small changes like adjusting the placement of text on the "Stage Cleared" screen for better placement on iPad and iPhone, I did make a rather important change to the order of four of the game's early levels.

Based on feedback from a friend, I decided to swap Level 1-4 and Level 2-3. Both snow levels. Level 1-4 has proven to simply be a bit too difficult as a World 1 level.



Similarly, I've swapped the World 1 and World 2 special levels for similar reasons.

Well, that will, unfortunately, do it for this update. If all goes well, I should be back in Caracas next week. Hopefully, I'll be less distracted once I'm back home! See you all next week.
08-11-2017, 10:32 AM
Suzy Cube Update: August 11, 2017

I'm back home and it shows!
I've got a localization solution up and running and I think I've accounted for all text currently in game.



I settled on CSVs for storing and loading my translation data. Google Sheets makes it super easy to store/edit/export these using separate pages in a single spreadsheet. What's nice is that I've made all pages inherit their left column from the English page, so as I add new entries, all other language pages are automatically updated!

In the game, I simply load the appropriate CSV into a static dictionary using the left column as keys and the right column as values. I wrote a simple static function which takes a string as input, uses it as a key to search the dictionary and then simply returns the result or an appropriate error. This makes it really easy to call from any script which needs to dynamically populate text fields.

For text fields which are populated right in a unity scene...



I wrote a handy little script which I can attach to any object containing a text field. The script simply pulls the content from the text field, feeds it to the translator function and replaces it with the returned result. YAY! So in the shot above, for example, the prefab for the Settings Panel has a text field at the top containing the word "SETTINGS". In the Spanish localization file, the key "SETTINGS" corresponds to the value "AJUSTES". The script takes what's in the field (SETTINGS) and replaces it with the value (AJUSTES). Easy peasy!

Remember folks... If it looks, at all, like your project is going somewhere, don't keep shoving it full of static text. Take the time to properly source your text from external files to save you many more headaches down the road!

ALSO! I fixed a little timing issue I had with these guys...



It was a subtle one too. Depending on how fast the level was loaded, the timing of the beat-blocks would end up offset compared to the music. So, like, loading from the level select screen... probably fine... reloading after death (faster)... de-synced... Booh!

To this I say.. .WHY DID I NOT LOOK THIS UP BEFORE!!?? I literally found an analogue to Time.time called AudioSource.time!!!! I literally just had to search the Unity site for "Timing elements to music"!!!

Do your research, kids!

Anywho. I literally switched out Time.time for AudioSource.time, fixed a small issue it introduced and BAM! problem solved! The beat-blocks now can't de-sync from the music as they get their timing directly from the music's audio source timer!

A nice productive week! I like it!
Check back in next week. I'm hoping to put out a new test build this afternoon, so I'll hopefully have some test-led tweaks to a new set of levels to share with you then.
Until then!