NickN
Topic Author
Posts: 12
Joined: 23 Jan 2015, 13:51

Dynamically loaded icons / mobile app

02 Jul 2015, 05:27

Like many free-to-play mobile games, we will be releasing a steady stream of new content over time. Much of the content will be in the form of items the player can use in-game.

Our game uses a content management system that lets us dynamically define new content. When the game loads, it checks in with the CMS and grabs any new/updated values. The primary reason for implementing this system was to avoid having to resubmit apps to Apple other than for bugfixes or functionality updates.

Each new item would have an icon and be accessible via a button that includes that icon.

Is there any way of adding new vector content without creating a new build?

Could we do something sneaky like author our own font and push an update to the font? i.e. each button label would be simple text using our custom font.

All suggestions welcome.
 
NickN
Topic Author
Posts: 12
Joined: 23 Jan 2015, 13:51

Re: Dynamically loaded icons / mobile app

02 Jul 2015, 06:39

Found some interesting info on the font workaround.

Seems you can load a font dynamically in an iOS app. See http://www.marco.org/2012/12/21/ios-dyn ... nt-loading.

Here's what I propose:

We create a custom symbol font called foo.ttf. Like any symbol font, Foo.ttf would contain a bunch of custom icons/symbols. It would be just like zapf-dingbats but with our game icons.

In case you are unfamiliar with Zapf, here's what it looks like:
chartzapfdingbats.gif
example of zapf dingbats symbol font

We then define our button labels in XAML as text generated by a data binding, but we also define the font as foo.ttf.

For example, we could define a button label as the letter "A". If the declared font is foo.ttf, it would draw the appropriate icon. Note: As you can see from the image above, if we used zapf as our font, "A" would actually draw as a six pointed star.

At launch, foo.ttf might only contain glyphs for the letters A-Z. Over time, we would add lowercase letters, punctuation etc. A typical font can easily accommodate several thousand unique glyphs, which would be more than enough for our needs. The XAML code would always reference foo.ttf. We would make sure we didn't define a button label as a letter that hadn't been added to the font. When we added new icons to the font, the app would load it dynamically at runtime, as per the link at the top of this post.

Does that sounds workable? Is there an easier way to do this?
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Dynamically loaded icons / mobile app

03 Jul 2015, 15:21

There is no problem in adding new content in form of resources to a NoesisGUI application. As soon as the resource is added to the proper location (that can be as complex as you wish implementing a resource provider). The only condition is that all resources that are consumed at execution time must have been processed by the BuildTooll. Then your application can download a new font from the internet, store it somewhere and use it. The same for XAMLs and textures.

Probably I need to properly understand what you mean with "creating a new build". If you are meaning, rebuilding the application then it can be done.
 
NickN
Topic Author
Posts: 12
Joined: 23 Jan 2015, 13:51

Re: Dynamically loaded icons / mobile app

03 Jul 2015, 20:53

Basically, we want to avoid having to resubmit the app to Apple.

For example...

1) We launch v1.0. It includes 100 items for the player to use, all of which are represented by vector elements. Each element is defined in the xaml.nsb file that is part of the app bundle.
2) Three months later, we add 25 new in-game items.
3) Player opens the app and is notified that new content is available. New content downloads and is available in the app.

We want the new items to appear in the app without creating a new build that has to go through the app store approval process.

Make sense?
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Dynamically loaded icons / mobile app

03 Jul 2015, 21:07

Yes, you don't need to change the code at all if you only need new resources. The only restriction is that you must preprocess the resources using the BuildTool (so, sending the xaml.nsb to the user instead of .xaml). Apart from that I don't see any extra problems.
 
NickN
Topic Author
Posts: 12
Joined: 23 Jan 2015, 13:51

Re: Dynamically loaded icons / mobile app

04 Jul 2015, 06:25

Great. Thank you!

Who is online

Users browsing this forum: No registered users and 0 guests