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

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

2
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"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}

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

Pass
{
CGPROGRAM
#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;
}

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

BindChannels
{
Bind "Vertex", vertex
Bind "TexCoord", texcoord
Bind "Color", color
}

Pass
{
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.

3
Support / Color on runtime, some bug
« on: November 25, 2013, 04:59:51 pm »
Here is a video depicting the bug;
http://www.youtube.com/watch?v=ymGWVJz1SAQ&feature=youtu.be

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)"

4
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?

5
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.

6
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!

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

https://www.youtube.com/watch?feature=player_embedded&v=CkQRdljCTWc

8
Showcase / Knightmare Tower on OUYA!
« on: March 28, 2013, 11:50:25 pm »
Juicybeast is proud to present Knightmare Tower as an Ouya Launch Title!

Here is the website, where all the info is!
http://knightmaretower.com/


9
Support / textmeshes and dynamic batching bug?
« on: March 25, 2013, 06:25:00 pm »
In my game, I set the max chars for a textmesh at 75 and it is batched correctly (and my test was a scene with 2 textmeshes), over that, it cannot be batched, is it a known phenomenon?

10
Hey there! Long time no see! So my question is rather simple: any way to get the name of animations at runtime? My researches led me to this sad answer: http://answers.unity3d.com/questions/192441/get-the-name-of-an-instances-prefab-at-runtime.html But maybe you have the name stored in a dark corner of your script?

I need this so I could easily include animated sprites to my memory manager...

Also I was wondering if you could think about this feature of memory management: nothing to manage, but only the part where , with a function call, you can make a sprite lose all links to it's texture so memory can be freed.
While the texture's gone, all scripts seems to run normally, but nothing that touches texture manipulation runs, so you could change spriteId and Play/Stop SpriteAnimations still works, but with no texture.
Then with a call, you put back the texture and it is updated accordingly.

As always, thanks :)

11
Support / Sprites, Atlases and memory management
« on: March 01, 2013, 02:06:36 pm »
I'll start off by telling you I'd find it normal and not rude at all if you don't answer this but since I don't know where to begin, I'm taking as many paths as possible to get my answers.

I've been making my first unity game for almost 5 months now and you did a great job guiding me through hardships, thanks.
But now I've discovered that (on IOS at least) the profiler is completely irrelevant, or that I'm doing something very wrong, I'm asking you this to make sure I'm not doing something wrong.
The game we're making is really texture heavy (we have over 30 jam packed atlases, most of 'em 1024x1024), at the title screen, the unity profiler tells me it uses about 20MB, the Instruments profiler tells me 90MB. What I understand from that, is that the unity profiler hides the textures that are currently used but not on screen from the memory profiler. This means that the unity profiler tells me that only the title screen is in memory and my other textures are somehow compressed, ready to be used, but in fact my whole UI is loaded with all it's textures fully uncompressed.

So this is it, is there some mojo I must do in order to make the iOS behave just as the unity profiler tells me it behaves, or must I manually manage all those atlases?

12
Support / Premultiplied white shader?
« on: February 20, 2013, 03:44:48 pm »
Hi!
Well, I already asked for a shader that flashes white, this saved my life, thank you! But now I got to make something with a white outline flash... I tried the same approach on premultiplied vertex color shader, it didn't quite give the expected result, tried some variants, did nothing good... How do you do it?

Once again, thanks!

13
Support / Accessing Commit command of a sprite collection?
« on: February 19, 2013, 06:03:13 pm »
Hi,
Since I've been messing around and rearranging my atlases many times for optimisation sake and as the scope of the game grows, I made a script that changes the sprite's Collection while keeping it's graphism, providing the image is in both, the source and target collection. Everything works fine but I can't get the sprite collection to commit the changes (to the collection data) automatically, which could lead to some unwanted effects if one forgets to do this. Any way to force or access the commit or Rebuild functions of the collections?

Thanks.

14
Support / Changing the color of a mesh using tk2d shaders
« on: January 29, 2013, 10:39:11 pm »
Hi there... beginning to be a little shy to take up all this time of yours, but I'm completely stuck.

I need to use one of your shaders on something that is not tk2d, then I need to change the color (trying to make some shadows...), I spelunked in your scripts and I think I found how you changed your colors, but then it does not seem to work. (it works with other shaders though)

here is the script (keep in mind it is testing script
Code: [Select]
using UnityEngine;
using System.Collections;

public class ShadowOnVaVoir : MonoBehaviour {
Color[] colors;
Color myColor;
void Awake() {
myColor = new Color(0, 0, 0, 0.5f);
Color[] colorsBegin = GetComponent<MeshFilter>().sharedMesh.colors;
colors = new Color[colorsBegin.Length];
GetComponent<MeshFilter>().sharedMesh.colors = colors;
}

void Update() {
renderer.material.SetColor("Color", myColor);
renderer.material.color = myColor;
int i = colors.Length;
while (i-->0) {
colors[i] = myColor;
}
}
}

As usual, thanks for your time and commitment

15
Support / Changing spriteId on runtime, bug while rotating?
« on: November 27, 2012, 08:05:34 pm »
Hi there, I was messing around with my timeline class when all of a sudden the wings of my monsters started to look really silly. After some investigation, I realized that they began to have a weird rotation when my wings were flashing, the flashing is a baked flash, so they switch to a lighted version of the image and return to their original graph and so on for an amount of time. So I figured that it is when I change SpriteId that the rotation is somehow resetted or altered.

Something I should make clear is that the rotation/position values of the offset sprite shown in the inspector (and the parent's rotation/position) are the same as a non-offset sprite, but visually, their rotation is clearly not the same, even stranger is if I manually set the rotation of the offset sprite, visually, their rotation becomes the same.

I don't know if you could help me sort this out?
thanks.

Pages: [1] 2