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 - m4ko

Pages: [1] 2 3
Support / Re: Set compression editor script
« on: October 11, 2013, 06:57:23 am »
Yes manually setting the compression and commit works as always. Strange. I will look into specifics on monday.

Support / Set compression editor script
« on: October 10, 2013, 03:56:12 pm »

I used an editor script to change the compression of specific atlases depending on platform (webplayer compressed, ios uncompressed). The script does not work anymore. Has anything changed with tk2dSpriteCollectionBuilder.Rebuild?

The script is a little messy so here is the outline:
1. Search all *.prefab in directory
2. Load the gameobject (to check if its loadable)
3. GetComponent<tk2dSpriteCollection> to see if the prefab is a sprite collection
4. Set tk2dSpriteCollection.textureCompression to desired compression
5. tk2dSpriteCollectionBuilder.Rebuild(myCollection);

It seems that it does something as the function works through stuff quite a while. However afterwards the collections still show "uncompressed" where they should be "compressed". I think it started to fail working with 2.1.

I tried to look up my original post where I built this script but couldnt find it. Sorry for repost.

Showcase / Meister Cody - Talasia
« on: August 23, 2013, 11:24:51 am »
Hello fellow 2dtoolkit users,

We are currently developing a learning game/training for kids which have difficulties with math.

Drawback: It's in german only at the moment. English coming later this year. However there is nearly no text and the games are pretty self-explanatory for adults.

Website: https://www.meistercody.com/
Beta (webplayer): http://www.meistercody.com/beta
Username: tino
Password: 1

Some technical information:
- Unity Pro 4.1.5
- Plugins: EasyTouch, HOTween, SmoothMoves, 2d toolkit, UniWeb
- StreamedScene assets
- Developed for: webplayer, standalone, ios tablet, android tablet

More info and feedback in the unity forums here:

Releases / Re: 2D Toolkit 2.1 beta 1
« on: July 08, 2013, 08:49:01 am »
I have a question regarding the new camera:

Up until now I used ScaledResolution to scale a sprite in width. I have a TopLeft and TopRight tk2d anchor set. There is a gui tile in both of them connecting in the center at native resolution. If the aspect ratio is increased there will be a gap. That is where the tiled sprite is placed. I set its x-dimension to the gap-size.

Now with the ScaledResolution i did this:
Code: [Select]
p_sprite_barExtension.dimensions = new Vector2(BLAH.ScaledResolution.x - (600 * 2), p_sprite_barExtension.dimensions.y);

As you removed ScaledResolution I guess there is a better alternative? I don't understand all the tk2dcamera details. Could you help me out to get the correct gapo size again?

Showcase / Re: Toto Temple, a jam game made possible by tk2d
« on: July 03, 2013, 10:04:41 am »
Looks fantastic. Well done.

Releases / Re: 2D Toolkit 2.0 final + hotfix 1
« on: June 18, 2013, 12:29:45 pm »
We have found an easy to fix bug. It's within the uitextinput control. When you scale the parent object the input (gfx & text) are skaled properly. However the cursor (which shows you the typing position) is not positioned in X axis accordingly. Just a 1-liner.

Releases / Re: 2D Toolkit Integrity Checker
« on: May 15, 2013, 02:52:17 pm »
What did I win?   8)

Support / Re: How to use multiple atlases (HD & SD)
« on: April 15, 2013, 10:13:26 am »
Ah ok. Well lucky me then.

Thanks for the information. Didn't know about execution order yet.

Support / Re: How to use multiple atlases (HD & SD)
« on: April 12, 2013, 09:05:04 am »
Thank you very much. I just tested the scaling and and it works beautifully. Very well implemented.

The platform collection tweaking seems a bit trickier. I now have setup a 1x and a 1.7x version. Both atlases are created ok. I can switch between them in the "2d toolkit"->"Preferences" menu and the correct 1x or 1.7x sprites show up. But when I build the scene only the currently active version is compiled into the scene asset.

This is actually what I want. But I wonder how to set it up so that BOTH versions get compiled and I can choose which to use through code.

Also: Whats the best way to use the currentPlatform switch? I set up sprites through scene editor and through code. So I guess I will have to run a "set platform" scene before my gamescene to ensure everything gets loaded from the correct atlas?

Support / Re: How to use multiple atlases (HD & SD)
« on: April 11, 2013, 01:37:50 pm »
Hi. I have a question related to this:

We have a project which runs at these two resolutions:
1200x900     (4:3)     PC
2048x1536   (4:3)     iPad

- The pc version comes first and is developed at the lower resolution
- After this we want to port this to the iPad
- We don't want to supply the high-res textures to the PC version (its web player based and would load too long)

How would one transfer from PC to iPad without the need to re-arrange everything. I tried to use the 2nd option you gave (platform sprite collections). But this ONLY works with a scaling of 50%, 100%, 200%. It does not seem to work with our scaling of 58.6% (1200 -> 2048).

I also tried camera overwrite:
Spritecollections: SC_A  SC_B

SC_A has the 1200x900 assets
SC_B has the 2048x1536 assets

Scene is set up with SC_A in 1200. I set a resolution override to 2048 and force editor window to 2048. Looks fine. Swapping between 1200/2048 is perfectly fine. However now I change from the upscaled sprites from SC_A to the native 2048 ones in SC_B by just changing the sprite collections by hand. Now the image is scaled too big (because of upscaling from 1200 to 2048 is still in there). I disable "autoscale" on override. Set it to "pixel perfect". The SC_B sprite is now in correct size, but at a wrong position.

Any ideas on how to tackle this?

Support / Re: Few question regarding sprite rendering
« on: April 11, 2013, 12:09:46 pm »
To get pixel perfect results I use:
- use tk2dcamera
- in the sprite collection from where your sprites come from check "use tk2d camera"

Finished. That always gives me perfect results. Also I don't have any lighting issues. Sprite colors in collection, editor and game view are all identical.

When you import new textures (before you put them in the sprite collections) change them to "advanced", no mipmapping, filter mode "point", no "stretch to nearest"!

Of course parallax scrolling is supported. Parallax scrolling is not a "feature" of tk2d because it is just a display technique and not a part of a 2d api framework. There is a full demo from the developer in the private support forum here:

Support / Re: Compression
« on: March 28, 2013, 08:07:06 am »
Thank you unikron. It's always a pleasure to read your technically profound and detailed posts.

And you are right. We export our sprites from Photoshop CS6 as PNGs with premultiplied alpha. Even though there is no irregularity in the spots where the black dots pop up this somehow causes them. We now export as TIF with seperate alpha channel. The result looks much better. There is still a dark shade in one corner but at normal resolution it's barely visible. I wonder if TIFs are the way to go. If someone has another recommendation on how to export from photoshop post here.

Thanks again.

Support / Re: Compression
« on: March 27, 2013, 02:52:08 pm »
I just double checked with out graphics artist. He showed me the alpha. There is nothing on the inner ring. It's a perfect white circle with blended edges on the outside.

Support / Compression
« on: March 27, 2013, 02:39:16 pm »

I have a question regarding atlas compression. Why does compression like DXT5 and PVRTC produce such horrific results?

The number is a textmesh on top of a normal tk2dsprite. The tk2dsprite is shown once compressed and uncompressed. The size is the same.

Compressed. Black dots


Info about the PNG:
The source looks like the uncompressed image. There is only alpha blending on the outer edge of the yellow ring. The green center and the yellow ring on the inside are solid. In the atlas texture this looks crispy and perfect.

filter mode - point
no mip maps
Texture Type Advanced / no power 2
compression DXT5 / PVRTC4 (same results)

Any idea why compression places black/dark grey dots in the image? I don't mind losing detail... but getting artifacts like this is unacceptable. How do I need to handle this to get proper results?

Showcase / Re: Chicks Ahead - Cartoon style game for iOS
« on: March 26, 2013, 01:13:01 pm »
Yeah looks much better. But interesting "solution" ...

Pages: [1] 2 3