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

Pages: [1] 2 3
Support / Flip Camera?
« on: January 06, 2014, 07:41:18 pm »
The title says it all: any simple way to make the camera be x or y inverted/scaled in negative? Thanks!

Support / Flashing white - inconsistent with Android
« on: December 06, 2013, 07:55:11 pm »
Hi there, I wanted to know if you had an explaination why this happens on certain android devices (only on several devices), and if you know of an effective fix to this:

All my materials using a shader I've made to flash white, tweaked from your basic shader, appear black and messed up.

Here is the shader
Code: [Select]
// unlit, vertex colour, alpha blended
// cull off

Shader "tk2d/BlendVertexColorWhite"
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}

Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend SrcAlpha OneMinusSrcAlpha
LOD 110

#pragma vertex vert_vct
#pragma fragment frag_mult
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"

sampler2D _MainTex;
float4 _MainTex_ST;

struct vin_vct
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;

struct v2f_vct
float4 vertex : POSITION;
fixed4 color : COLOR;
half2 texcoord : TEXCOORD0;

v2f_vct vert_vct(vin_vct v)
v2f_vct o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
return o;

fixed4 frag_mult(v2f_vct i) : COLOR
fixed4 col = tex2D(_MainTex, i.texcoord);
col.rgb += i.color.rgb;
col.a *= i.color.a;
return col;

Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off Fog { Mode Off }
LOD 100

Bind "Vertex", vertex
Bind "TexCoord", texcoord
Bind "Color", color

Lighting Off
SetTexture [_MainTex] { combine texture * primary }

If you don't find what could be wrong at first sight, please don't bother with this problem, as I know this problem has nothing to do with your product.

Support / Re: Color on runtime, some bug
« on: November 26, 2013, 02:52:02 pm »
yeah... that may be it... sorry for that, I forgot about this functionality, I surely copied a static sprite to start my assets, then I wanted to make my assets static and I noticed. Like always you are such a pro at diagnosing!

Support / Color on runtime, some bug
« on: November 25, 2013, 04:59:51 pm »
Here is a video depicting the bug;

As you can see, I set the color of some sprites and the color is not changed, this happens only at runtime, what I see is there is some weird mesh phenomenon "Combined Mesh (root: scene) (Mesh Filter)"

Support / Re: My Collection, what do I do to reload it?
« on: August 08, 2013, 01:57:28 pm »
haha yeah that's strange, but in the meantime this "bug" makes life sooo much easier! I don't even have to destroy/change my sprite and it all works perfectly only with 2 calls!

Support / Re: My Collection, what do I do to reload it?
« on: August 07, 2013, 09:53:54 pm »

public void ReloadTextures() {
      renderer.sharedMaterial.mainTexture = renderer.sharedMaterial.mainTexture as Texture2D;

did the trick... it's working even easier than I ever dreamed of!

Support / My Collection, what do I do to reload it?
« on: August 07, 2013, 09:17:10 pm »
The textures now are unloaded, Great Job! :D

But I can't reload them :/

I have to unload textures from my UI, which are sprites that are directly in the scene, I manually delete in the editor the instance that uses the texture, unload the texture, then I put back another instance that uses the texture, the texture won't come back. Even worse, when I stop the test, the texture won't come back either, I need to save the project, then everything is reset to normal. Anything I could to to reload the texture?

okay thanks, yeah that's what I did, commented out all of UpdateCollider, but that would be great to leave control to the dev in one way or another, like you said ;)

Support / Re: General mobile performance
« on: June 06, 2013, 04:40:42 pm »
as Unikron said, one dark enemy of mobiles is overdraw, to prevent this you can use "SolidVertexColor" Shader on graphisms that use much space on screen and/or have simple edges, then you can use, in the sprite collection sprites, Render Mesh: Custom and you can make fit the outlines of the geometry to your sprite, you can also change the texture compression (the atlases) to RGB24 bits or anything that does not have alpha, makes space in the memory ;)

Support / Help, tk2d is beign a control freak with my collisiders!
« on: June 06, 2013, 04:22:30 pm »
I have 2D Toolkit 1.92 final and I have two problems that are a result of one feature of tk2d.
It seems that even when I set the sprite base's Collider Type to "User defined" in the sprite collection, it wants to control the collider.

I'm trying to have buttons that have a collider larger than the graphism, so I manually add a Collider, then I enlarge it, but here's what happens:
If I check the "Create Box Collider" checkbox, the collider becomes adjusted to graphism, not good.
If I uncheck it, the collider simply disappears... forever, even in the editor.

And I have a button that I need to swap the graphism, when the create box collider is checked, it "works" (even though the problem above occurs), when it is unchecked, it destroys my dynamically created collider.

I'm using Sliced Sprites, if it is important...

Any way to nullify tk2d's control over the colliders? Thanks.

Releases / Re: 2D Toolkit 2.0 final
« on: June 03, 2013, 01:17:06 pm »
Nice! Hey I wonder, is the memory management/ manual atlas unloading still a work in progress?

Support / Re: And yet another memory question!
« on: May 14, 2013, 03:25:14 pm »
yes, I load a dummy level with nothing in it, it works for the gameplay, everything is unloaded, but not for my stub... it happens a little after I load my UI with LoadLevelAdditive.

Support / Re: And yet another memory question!
« on: May 14, 2013, 02:40:52 pm »
I may very well have references to the sprite collection somewhere... Aaaaand it's done! No more references to those sprite collections and gained a little 20MB! What a relief! It was some temporary dev script that I forgot to delete that kept those references so no sweat on deleting it ;)

So now one of the issues is fixed, is there any info you could provide me on how, when I load a scene to replace my stub scene, no texture that was in this scene is unloaded? (I tried with my gameplay cache sprite bunch that is unloaded for sure with every gameplay and it still remains in memory when in the stub)

Support / And yet another memory question!
« on: May 13, 2013, 02:54:19 pm »
Hi there, just asking: have you been playing around with the new memory profiler? This tool makes the memory profiling usable at last! But the infos it shows me makes me wonder why are there source images in the memory of my .exe? isn't there supposed to be links to the atlases only?

Also, theres a texture I'm trying to unload but I'm not able: only one sprite uses the collection, the sprite is not referenced anywhere, there is no special script on it (it is a still image, the splash screen) it is loaded in the stub scene, which is replaced by a dummy scene (to unload the stub) when my UI takes the place, I changed the sprite collection before deletion. My tests suggest that only the starting collection and the one that is applied on the sprite upon deletion are kept in memory, any intermediate collections are effectively cleaned from memory, do you have an idea of what is happening?

Oh also, this is no support material, but as always, I'm giving you some feedback so you may (or may not) improve your user experience: I find myself using alot of textures with no alpha ( improves greatly GPU performances on some mobile devices and optimises memory), the only compression without alpha that tk2d offers is dithered and I'm no fan of dithering ;) I noticed the User defined checkbox right under, could be cool if this checkbox was right over instead?

Thanks for your time!

Showcase / Toto Temple, a jam game made possible by tk2d
« on: May 08, 2013, 03:56:42 pm »
Hi there! Here is a game made in 40 hours by Juicy Beast, for the TO Jam in Toronto, without Tk2d it wouldn't have been possible to make such a polished game in such little time!


Pages: [1] 2 3