November 19, 2017, 08:06:51 pm

News:


Welcome to the Platino support forum!
We've got some huge Platino 4 updates coming very soon, so check back here next week.

July, 2017


TextSprite API documentation

Started by jrayon, September 15, 2015, 02:25:20 am

previous topic - next topic
Go Down

jrayon

Hey,

I see that the textSprite docs have been removed from API documentation, is it something we can recover? I guess we are suggested now to use Ti.Labels instead of textSprites, but there are still some cases where textSprites are useful (specially on existing projects!). Are textSprites going to be deprecated? Should we move away from them?

Thanks!
Javier

JosephAustinDev

We did deprecate them due to them having performance and cross-platform issues, particularly in android. They're still in there, they're just a little redundant. We might could bring back the documentation for them. To be honest, they might yet have a use in a 3d camera situation but they need work if we're going down that route.

johngould

Hey Javier!

Yeah, we had a discussion about this today.  We will be adding text sprites back to the documentation.  They are definitely still available and we had thought about deprecating them, but due to the limitations of putting a standard label "inside" a game view, we do need to come up with a better solution before we totally get rid of text sprites.  We will be discussing either fixing the issues with Android or coming up with another solution altogether.  Either way, we'll let you know what we come up with.

jrayon

September 17, 2015, 07:27:10 am #3 Last Edit: September 17, 2015, 07:29:19 am by jrayon
Cool, thanks!

Related to your comment in the other thread about gradients, I understand the difference between "normal" and OpenGL views, and that's exactly why IMHO in some cases an opengl label make sense. For HUD purposes, the Ti Label is enough, but if the game has some scroll or camera zoom in/our with text inside the scene, I think we'll need textSprites (or similar), not sure if Ti labels would work. This makes specially sense when you want to localize some texts in the game, so you can not use just an image with the rendered text.

beermat

Really would like to encourage you to keep text sprites! The thing about Ti.Label is that I haven't found a good way to scale it to appropriate dimensions for any given screen. The label itself can be scaled, but it doesn't seem possible to increase the font proportionately to completely fill the label? Scaled text sprites solve that, easily, for me!

jrayon

Quote from: beermat on September 22, 2015, 08:43:10 am
Really would like to encourage you to keep text sprites! The thing about Ti.Label is that I haven't found a good way to scale it to appropriate dimensions for any given screen. The label itself can be scaled, but it doesn't seem possible to increase the font proportionately to completely fill the label? Scaled text sprites solve that, easily, for me!


+1

beermat

Hi there, been a couple of months since the promise to update documentation with TextSprites, just wondered if that was close yet?

I ask because I'm having an issue on Android with them. If I perform several updates in sequence to the text value of a text sprite "too quickly", some of those updates do not happen. I say "too quickly" because the speed depends on device, but for a ballpark it occurs if trying to update every 75ms on my Samsung Galaxy S6. I am updating a text score value and instead of displaying the final value, I display a bunch of interim values quickly to give an impression of an animated roll of the score to the new value.  In debug mode and using Appcelerator console, not all the "load Texture" / "unload Texture" DEBUG messages show either, so it's hard to build the sequence of events.

Asking the same thing differently, are there any performance tips that might help updating a TextSprite, such as certain size/scale values or ratios, etc?

Thanks in advance!   

beermat

Is Platino dead? Even the simple request for documentation of TextSprites from 8 months ago hasn't been done. I don't see much activity on the forum, no site updates, or any updates to what was a brand new SDK in 8 months now, which is very unusual? I really like this product and have embedded myself with it, but the absence of any activity at all has me nervous that this is now a dead-product-walking?

johngould

Quote from: beermat on May 16, 2016, 02:04:56 pm
Is Platino dead? Even the simple request for documentation of TextSprites from 8 months ago hasn't been done. I don't see much activity on the forum, no site updates, or any updates to what was a brand new SDK in 8 months now, which is very unusual? I really like this product and have embedded myself with it, but the absence of any activity at all has me nervous that this is now a dead-product-walking?


Hey, I'm sorry, it looks like the email notifications on our forum are not working - I'll have to take a look at that.

No, Platino is definitely not dead!  I know it's been a while since we had any updates but we are definitely hard at work on the next version.  We were working on several issues like this for version 3.1 and then for various reasons had to shift our attention to a much, much bigger and more ambitious roadmap directly to version 4.0, which is going to be a very big leap forward with the engine.  We will be making an announcement about this before the end of the summer, and in the meantime, we may still have an interim update and I will ask our lead developer, Joseph, to take a look at your question here and see if we have a solution for you.

I apologize again for the very long delay in answering, but I will fix the email notifications and we will start to be more active here and elsewhere as we get closer to our next release.  Thanks so much for sticking with us - you won't regret it!

--John, still CEO of a still VERY ALIVE Black Gate Games!   :D

JosephAustinDev

var textsprite = platino.createTextSprite({text:'Lorem ipsum dolor sit amet.', fontSize:24, fontFamily:"arial", textAlign:"left"});

After that it's just a sprite. :)

JosephAustinDev

As for the android problems... no, they are known to be a performance fail. Which is why they were deprecated for the time being. You could try making a Ti label, then using label.toImage() and making a sprite out of that.

var lbl = Ti.UI.createLabel({.....});
var sprite = Platino.createSprite({
  data: lbl.toImage();
});




beermat

John - Thanks very much for the reply! I am excited to hear you are still going strong and working on great new things. It is much appreciated,  Platino is a great product!

Joseph - Thanks for the response, too. I'm using TextSprites in my app, they are very useful for scaling text to various device screen sizes if you want a "fixed" layout (something I cannot do with a Titanium label), and I have used these successfully in my app. Some trial and error was necessary to get things working correctly. A few things I had to plough through myself was figuring out the sizeWithText method does not apparently take into account the fontFamily set in the text sprite creator, only the fontSize - not sure if this is a bug or a feature without any reference materials, or if I am doing something wrong. Anyway, as both a developer and an end-user, I understand both sides of the documentation issue :) But I think, for an API, it's essential that everything is documented well and, as a bonus, giving a trivial example and a non-trivial example of usage, gets me flying!

Looking forward to some updates from you guys; great product!

Go Up