Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - theremin

Pages: 1 [2]
16
Support / Re: Change tk2dCamera scale dynamically with code?
« on: May 31, 2012, 03:47:45 pm »
Perfect! Thanks!

17
Support / Change tk2dCamera scale dynamically with code?
« on: May 31, 2012, 01:46:24 am »
How can I change the Scale for the tk2dCamera dynamically with code? I don't want to have to create dozens of different Resolution Overrides for all sorts of different devices and monitors; I'd prefer to just set the scale dynamically with code according to a handful of resolution ranges. Is this possible?

Basically, I'm looking for something like this:

Code: [Select]
td2kCamera.inst.currentScale = 2f;

18
Argh, of course right after I posted this question I figured it out! Sorry about that.

For posterity's sake, if anyone is curious:

Although the 2dtk Fonts don't seem to have a "hard edges" option, you can manually open the font texture in Unity (i.e., the .tga you generated in BMFont and imported into your project), and then change the Filter Mode for the texture to Point. Voila, hard edges!

19
Thanks for the response. I took the plunge and just purchased 2D Toolkit.

Unfortunately, I'm having trouble getting scaling to work correctly. I'm working with a 2dtkCamera and a 2dtk TextMesh/Font. My font is a pixel font, so it has sharp edges and no anti-aliasing. (Again, I'm going for a retro graphic style with sharp pixels.)

The font looks great at the default camera setting, but if I use Resolution Override on the 2dtkCamera and set the scale to 2 or 3, the font is blurry and unusable.



How can I get pixel perfect, sharp fonts at a variety of camera scales?

20
FAQs / Pixel perfect scaling for sharp retro-style pixel graphics?
« on: March 17, 2012, 01:39:13 am »
I'm investigating 2D Toolkit for possible purchase, but I want to make sure it accomplishes what I'm looking to do first before I buy.

If I design a game with retro-style sharp pixel graphics (with hard edges and no anti-aliasing) at 480x320 for the iPhone 3GS, can I use Resolution Override with scale=2 to size the game up for iPhone Retina and iPad (and scale=4 for the iPad 3) and maintain the sharpness of the graphics, just at double the size? Or will 2D Toolkit soften the edges? What I'm looking for is for 1:1 pixel ratio on the 480x320 iPhone, and 2:1 pixel ratio on iPhone Retina -- essentially "pixel perfect" in both cases, just double the size in the latter case.

To illustrate, take a look at this page: http://en.wikipedia.org/wiki/Image_scaling

I would want my sprites to be sized up like the TV on the left (nearest-neighbor scaling) as opposed to smoothed anti-aliased scaling. Can I accomplish this with 2D Toolkit?

Pages: 1 [2]