Localization on iOS

February 16, 2015 Studio Life

Here at Astute Monkey we have had some issues with some localization features in iOS that come shipped with Apple’s development tools. In particular, the genstrings tool.

This command line tool is used to generate the .strings files that are used for localization. We’ve had a couple problems that we wanted addressed:

  • The NSLocalizedString macro takes a key and a description. We wanted this to be a key and a default value instead.
  • Running genstrings to generate a new localization file would overwrite all strings to be the value of the key, even if the string was already changed to something else. The -a flag is not applicable here because it’s append, and just duplicates our old keys.
  • The generated files were always encoded in a way that git and gitlab weren’t able to diff with previous versions. This would be no problem if we absolutely needed special characters, which at the time, we didn’t. It should only have that encoding if absolutely required.
  • Generated files look like crap. It could have a lot better formatting for future translators involved.

To address these problems, we’ve had to roll our own tool. We’ve decided to publish it on Github, as it might be useful for others as well.

Let’s take a quick look at an example, and the differences between generated strings files. This is test.m:

#import <Foundation/Foundation.h>

int main()
{
    NSString* strTest = NSLocalizedString(@"TEST_ONE", @"This is the first test string.");
    NSString* strTest = NSLocalizedString(@"TEST_TWO", @"This is the second test string.");
    return 0;
}

After running genstrings2.py -o . *.m, this produces a Localizable.strings file with the following contents:

/* test.m */
// This is the first test string.
"TEST_ONE" = "This is the first test string.";

// This is the second test string.
"TEST_TWO" = "This is the second test string.";

/**
 * Total strings: 2
 * Total duplicates: 0
 * Total preserves: 0
 * Total conflicts: 0
 */

As you can see, above all strings it will tell us in which file the string has been found first. (It could be duplicated in some other files, but this is the first occurrence.) Below all strings is a comment of some statistics. A duplicate is a string that appears in multiple files, a preserve is a string that has been changed in the strings file before re-generation, and a conflict is a duplicate with a different description (actually default value).

At this point, we could change TEST_TWO to something like This has been changed. Then, we can run genstrings2.py -a -o . *.m (the -a flag is append, which works differently from Apple’s genstrings) and it will preserve that value in the strings file: (note the total preserves count)

// This is the second test string.
"TEST_TWO" = "This has been changed.";

/**
 * Total strings: 2
 * Total duplicates: 0
 * Total preserves: 1
 * Total conflicts: 0
 */

Now a real production example would have a few more strings and possibly even some conflicts, such as:

angel@spear $ shopt -s globstar
angel@spear $ genstrings2.py -a -o Base.lproj **/*.m
35 file(s):
/**
 * Total strings: 36
 * Total duplicates: 24
 * Total preserves: 0
 * Total conflicts: 1
 *  (Check these keys!)
 *   "CHALLENGE_REWARD_MESSAGE"
 */

There are a few things left to do to make the tool a complete replacement, such as:

  • Generate positional formatting parameters (%d and %0.4f becomes %1$d and %2$0.4f) (we haven’t seen the genstrings tool actually produce this, although this is what its manpage says it’s supposed to do, but perhaps we missed something)
  • There should be support for CF-prefixed localization macros (for compatibility)
  • Support tables that go into Table.strings instead of Localizable.strings (NSLocalizedStringFromTable, NSLocalizedStringFromTableInBundle)
  • Support NSLocalizedStringWithDefaultValue

You can check out the source code on the Github repository. Be sure to let us know what you think, and if you have any improvements, we’re accepting pull requests as well.

Iterating on characters

February 12, 2015 Studio Life

We’ve now come quite far with defining the “Project DARK” game.

Lucia and Mari have grown under our pencils, and we’ve animated them, put them in situation… but we weren’t happy. Our demo models just aren’t as good as the environments we’ve spent so much effort on, and discussing them on the Facebook Indie Developers group helped us make a decision. Time has come to rework the models.

luciaanmari

 

First things first, we’ll update the concept art to make Lucia and Mari shine, before we build new model sheets, and redo the model and animations in Blender. It’s a lot of work, but it would be a shame to give a bad impression by skipping this step. Mari and Lucia need some love, we’ll make sure they get all the effort they deserve!

Updating the iOS games

February 3, 2015 Studio Life

Hi dear monkeys!

We’ve been lately updating our iOS games to the new iPhones and iPads.

a picture shows the gameplay

This is the game before the update. We have added cool deflectors since.

Accel Chaser, SkyDragons and FlicketyFlick should get a new release in the coming month, adding new content and better UI and interaction. We have already submitted AccelChaser to the App Store, but Sky Dragons and FlicketyFlick still need some small amounts of fine-tuning to the art.

a picture shows the gameplay

Jump, Axel!

I am very happy with this, because games age fast and we have been thinking of overhauling those three for about a year. I love being able to make games young and fit again, ready to jump into the fun!

 

As soon as we are ready to push to the Store, I’ll tell you monkeys, so you can play the best releases of our games ever ;)

Promotional Video

January 5, 2015 Studio Life

Happy New Year everyone!

We’ve started the first season of 2015 with our best mood, things are going great, and after a few minutes remembering where we left off before the holiday, the team was hard at work.

It’s always so enjoyable when a team sees their game starting to grow, people bringing great ideas to fruition… We’re polishing off a level and starting work on another level, which is very important to us, because we hope to be able to use it for our promotional video. The script is written, the rough storyboard is drawn, and now the basic tridimensional scene is laid out. We’re discussing details, such as “should you have an elephant painted on your couch’s pillows?”, “is purple a color our characters appreciate?”, “why would anyone ever want an infinite mirror as their floor?” or “are girls in the far future likely to live in a clean room or a messy place?”.

If you have anything to bring to the table on these important and critical questions, don’t hesitate to chime in. Also, is a pig form factor a nice idea for a robotic, moody alarm-clock?

In any case, we want to show the game’s characters in their daily life. What do they like? What do they dream of? What annoyances do they have to put up with in their quest to subjugate and dominate the universe with their armies of evil minions (no, sorry… wrong game… ) ah yes, in their quest to go through to the next work day with minimal mental trauma? There will be supercomputers, lasers, nuclear reactors, rockstars and bacon. Maybe even superheroes, space operas and ground-breaking science!

 

We hope you’ll be as excited as we are when you see the final result. For now, we’re going to work and refine, polish and shine, until it is perfect (or at least, until our favorite accountants warn us we’ve grossly overrun our polishing budget).

Christmas in the company!

December 24, 2014 Studio Life

Merry Christmas everyone!

This year, we’ve decided to celebrate Christmas by creating a little postcard, and we made a nice Christmas texture for Lucia, one of the main characters of the upcoming adventure game.

The plan is to have her be dressed in Christmas clothing if the game is played during Christmas time ^^

 

lucia (2)

christmas_Card_Astute_Monkey-01

New Internships for 2015

November 30, 2014 Studio Life

From February, the Studio will welcome several new interns in the Art and Development departments, which currently consist of one room each. Good news: both rooms are allowed access to the coffee reserve!

We’re currently looking for those lucky interns who’ll get to work on our not-so-top-secret adventure game, using the Unreal Engine, Blender, C++, Motion Capture, and lots of other fun things: they might get to do pixel art, vector art, iPhone development, concept art…

If you’re interested, and you think you have what it takes, contact us here.

Blender proportion editing issues with UV editing

October 20, 2014 Studio Life

I am using Blender to create the assets for the demo for DARK.

I had some issues with unwrapping the models, I accidentally changed a setting which caused strange options so I couldn’t drag points or edges separate in my unwrap, Blender kept taking the whole UV which was annoying and unpractical.

Solution

Where to disable the specific proportion editing.

Go to UV Editing on the top of your screen

1 - Copy

The UV Editing mode will show 2 screens which look something like this:

2 - Copy

On the bottom of the screen you see a drop down button with a dot in it.

3 - Copy

Finally you can Disable Proportional Editing here to unwrap your models by hand.

Concept art for Dark

September 25, 2014 Studio Life

This blogpost will be about the concept art in our new project “dark”. I’ll be explaining how and why I make the steps I make. Dark will be a Sci-fi so everything needs to be high-tech and futuristic, not only does it have to look like it but also should work like a futuristic product which is hard because I’m basically making inventions for a game.

When I make sci-fi art I like to get a focus on details and functionality, functionality is the key to creating things players will believe in. The starting technique I use is either a thumbnail or making silhouettes, sketch really fast a lot of different silhouettes till the silhouette gives the feeling you want (evil, scary, good). For example a bad guy needs to look intimidating, if the silhouette looks intimidating you’re on the right track, since a silhouette is a very abstract shape your creative mind starts imagining things like shapes and objects and will help you being more creative! But this mainly works with characters.

I like to put on some music that is related to the universe of the game, like a soundtrack from Star-wars, 2001: a space odyssey or Dune to get in the mood.

So here are some thumbnails I made:
spaceships

Once you believe you have enough sketches, pick the one you like most and see if you can change things, here is the one that I picked:
spaceship1
And then, improvise !
spaceship2

and that’s how I make my concept art.

Spaceships and meatballs

September 12, 2014 Creative Process, iOS Games

Dear Monkeys,

we’re currently putting the final touches to the art of Ad Astra, our upcoming iPad release. We then will have to fix all the nasty bugs that always hide in code before we bring our shiny new game to the Apple review team. It’s turning out beautiful, as it’s been crafted out of bananas, love and effort (with more effort than bananas).

 

As soon as Ad Astra is on its way to Apple, we’ll pour all our heart into DARK, a game about teenagers in a space station who build robots, cook food and serve coffee. We’ll have space police ships, space pasta, space trains, and a huge hangar to have even more spacious space. We’ll also have some evil pirates parking in there!

Efficiently saving animating time

September 5, 2014 Studio Life

I am working on the credits for Ad-Astra which includes animations, since the credits screen is interactive. I am using Adobe Flash CS6. As a general rule,  you want to animate the fastest and most efficient way possible.

The animations include spaceship that expand if you click on them. We wanted to make them look like the angle of the ship changes, so I used a way of making it easier to create this effect.

ship1 ship2

As you can see there are missing frames between those two pictures. I decided not to make all the frames by hand but instead using smoke/clouds to create the effect of a space ship that opens itself, as you can see here:

ship3ship4

frame 3frame4