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.

Topics - m4ko

Pages: [1]
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:

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?

I tested 1.92 beta 1 and its clipping feature in a fresh unity project without any problems. However if I update the tk2d package in my real project to 19.2beta1 I get the following console errors:

Code: [Select]
ApplicationException: Unable to find a suitable compiler
UnityEditor.Scripting.ScriptCompilers.CreateCompilerInstance (MonoIsland island, Boolean buildingForEditor, BuildTarget targetPlatform) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Scripting/ScriptCompilers.cs:99)

Failed to create compiler instance

I am upgrading to 1.92beta1 from 1.91final.

What I already tried:
- Restarting Unity after upgrade.
- Delete the TK2DROOT before installing the update.
- Finding "ScriptCompilers.cs" (doesn't exist on my system).
- Google solution: Delete any compiled assets
- Google solution: Delete UnityEngine.dll in project

Any more ideas?

Support / Hourglass
« on: March 14, 2013, 12:39:41 pm »

I am trying to make a 2D hourglass but I am a little lost. Currently I have the following sprites:
Hourglass Front
Hourglass Back
Sand Top
Sand Bottom

My plan was to just layer these front > sand top, sand bottom > background. This works quite well.

The problem is when I want to "substract" from the top pile and "add" to the bottom. The only thing that comes to mind is scaling those textures (top y shrinks downwards, bottom y grows upwards). However an hourglass is pretty angled. Therefore: The top sand will "break out of the glass" while the bottom part fills up in the center and never reaches its sides until its at 100%. It is not possible to just cover up this mess because there are no sprites allowed to the sides of the hourglass.

Is it possible to instead of scale the sprite just draw a specific part of it? If the sprite is 100x100 pixels. Can I draw 100x80 of it? I think that would look much better. Or is it possible to add a mask to the sprite? So that it could just be a square which is masked on the sides of the hourglass?

Or if you have any other ideas on how to fill angled sprites with fluids/sand/etc. throw in your ideas please.

Support / Sprite Dimensions
« on: March 11, 2013, 03:14:11 pm »

I have a problem regarding initial setup (i guess). I am using the tk2dCamera. When i insert a sprite and click on 1:1 in scaling it sets its scale to 270,270,270.

I guess that is not correct? At least I can't find out how to get the actual dimensions of a sprite (GetBounds) as the results are off. Sprite.width would be nice to have.

Camera settings:

Sprite settings:

Pages: [1]