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

Pages: [1] 2
1
Support / Re: Repeating Sprite In Atlas
« on: November 11, 2015, 08:29:23 pm »
I'm sorry replying to the old thread, but I think it is better to comment it here than starting a new thread.

I would also really like to have the options to trim the sprites and use the trim "template" in the linked collections.

Could you describe the problems when creating the 4K atlases in more detail? Because I don't get why there should be so high memory usage.

Anyway, is there at least some options to implement this in tk2d? I've done exactly this in another sprite atlas generator and it wasn't very hard and was working good.

I imagine it, like it was describe above, that is when the atlas is generated, the trim information would be saved. Then when linked atlas is being built, the trim information would be passed there and only blind trimming would be done without any computations. I could try to do it myself, but I want to know if it is theoretically possible to not to waste time.

Thank You

2
Support / Order in layer vs. Z-ordering priority
« on: December 10, 2014, 10:14:08 am »
I was just playing with the "order in layer" and z position of the sprites and want to be sure (because found out in some previous version of unity it was working differently).

The priority has the "order in layer". That is, the sprite with higher order than some other sprite is drawn at the "top", the Z-position isn't taken into account. Only if the "order in layer" are the same, the Z-position is taken into account and could fine tune the draw order.

Am I getting this right?

One more question, what is the maximum value of the "order in layer"? Is it somehow dependent on the (Z buffer)/(near-far plane position)? I found that max positive value is (2^15) - 1.

Thanks


3
I don't think it has any effect, because tk2D don't reference those sprites in the build, it creates it's own sprite atlas. So the textures are used only in the editor and not referenced outside it.

4
Support / Re: Dynamically hide part of a sprite.
« on: December 01, 2014, 09:15:27 pm »
You could but it would be slow and you will need to somehow find  exactly which pixels to "hidden". And I don't find the SetPixel method particularly nice nor the "technologically advanced solution".

5
Support / Re: Dynamically hide part of a sprite.
« on: December 01, 2014, 08:32:29 pm »
You could achieve this with sorting layers and sorting order in the given layer. Or setting the different Z position for the building and the player. I think there something about this in the documentation in the sprite section.

6
Support / Re: Multiple cameras
« on: November 26, 2014, 04:34:22 pm »
And when you try the release for the PC?

7
Support / Re: Interested in 2D Toolkit
« on: November 26, 2014, 04:32:06 pm »
I'm using 2DToolkit mainly for the game itself (sprite, animations, ...) but am planning to use Unity's 4.6 UI. There are some overlapping function, of course. I advise you to try the unity first without 2D toolkit and find out if it is usable for you (I've been using the plain 2D features of unity and they weren't sufficient for me, therefor I bought 2D toolkit).

8
Support / Re: Multiple cameras
« on: November 26, 2014, 03:26:43 pm »
I'm using 3 cameras, 2 of them are tk2DCamera and didn't have any problems with it. The 2. tk2DCamera inherits the config from the 1. one. Does the application crash or you've got some exceptions? What's in the .log?

9
Support / Re: Interested in 2D Toolkit
« on: November 26, 2014, 03:21:21 pm »
This is my opinion. Unity 4.6 primary focus was on UI. The 2D stuff was added earlier (4.3?). But I do think that 2D Toolkit is useful, and not only useful, but *necessary* for any advanced 2D game/application. The API for the unity sprite and animation classes is poor in my opinion and you will hit the wall if doing something more complicated than the some toy demo/tutorial.

10
Support / Re: tk2dSpriteAnimator.CurrentFrame lag
« on: November 04, 2014, 10:49:10 pm »
Ahh Nevermind, using the WaitForEndOfFrame in coroutine yield solved it. But then I'm animating the 1 frame late. I think I could solve it partially with the script execution order. But it would be great if I could connect to some frame-changed event (edit: but this would only work if the animation would be updated in the Update() method (?)).

edit: Anyway, why the tk2dSpriteAnimator is updated in LateUpdate() and not in Update()?

11
Support / tk2dSpriteAnimator.CurrentFrame lag
« on: November 04, 2014, 10:39:24 pm »
Hi,
I'm trying to move the sprite on each frame change using coroutines. I'm comparing the current and the last frame of the tk2dSpriteAnimator. But the "CurrentFrame" property is lagging the 1 frame after the actual sprite has been already changed (that is, I can see that the sprite has been changed, either visually or in game object inspector, but the value in the code is still the old one). Is this known behaviour or am I doing something wrong?

Thanks

12
Support / Re: Multiple Size Sprite Problem
« on: October 17, 2014, 01:05:52 pm »
I think you can set the custom pivot for each of the sprite in the sprite collection. Then every sprite will have the origin at the pivot point.

13
Support / Re: Create Sprite Collection from code
« on: October 17, 2014, 07:15:12 am »
The link looks interesting (I was sure I have seen it somewhere but couldn't find it:) ). As it is unsupported (data-driven), where could I found the code? Should I extract the beta package and extract the files from there? Or is it somewhere on the github as you mentioned in the release notes?

Thank You

14
Support / Create Sprite Collection from code
« on: October 16, 2014, 09:19:53 pm »
Hi,
Is it possible to create the sprite collections purely from the code in the editor?

 I was poking around the sources and found the tk2dSpriteCollectionEditor and tk2dSpriteCollectionBuilder which could possibly create the sprite collection prefab. Then I think I would need to obtain the tk2dSpriteCollectionData somehow and add the sprite definitions there. Should I jut create new tk2dSpriteDefinition array and associate it to the "spriteDefinitions" field in the tk2dSpriteCollectionData ? Then after everything is done, I would call the tk2dSpriteCollectionBuilder.Rebuild() for committing the changes. Is this right? Or is there any other workflow?

Thank You

15
Support / Re: Sprite distortion in pixel perfect setup
« on: October 02, 2014, 08:24:37 am »
So I've been playing with it once more and found the in DX9 it's actually working fine IF the screen resolution is even (which is logical, because otherwise rounding errors could happen). Also I've noticed that even the editor was in DX9 mode, the player was generated in DX11 mode and the bug was persistent in the player. After setting the player to the !DX11 (DX9?) mode it is working also in the player.

Pages: [1] 2