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

Pages: [1]
Support / Editing Position inside Animation Editor
« on: July 07, 2015, 08:06:18 am »
Hello, I'm using your product for a long time now. I've always worked with very simple animations, like pixel-art characters walking in a pixel based world, or some basic enemies that didn't make complex movements.

My new project involves many frame-by-frame complex animations, for example.

In one frame, a Dragon enemy have its wings closed, resulting in a 100x200 sprite, for example.
In another frame, the Dragon have its wings opened, resulting in a 300x300 sprite.
In another frame, the Dragon, still with its wings opened, stands in one foot and is tilting to the right, resulting in a 280x320 sprite.

Let's say that in a complex animation, theses 3 frames represent the boundaries of the complete animation (300 is the max width, and 320 is the max height). If I would want that his right foot stays aligned to the ground during the entire animation, all my textures need to have a 300x320 size, consuming much more texture space than needed.

I could use the Diced feature in the atlas creation, but some of this animation textures are also needed outside of the atlas for other purposes.

So, my question is...:

Is it possible, inside of the Animation Editor, in a given clip, to edit the position of each one of the textures in each frame? Is there some known plugin that do that?


Support / Z-Order / Depth bug only when I build
« on: October 08, 2013, 07:36:17 am »
Well, the question is simple, but I'm afraid of the answer.

The z-order of my tk2dsprite components works great in the editor player. But when I export it (to web player, pc, android, doesn't matter), the z-order gets all messed up. The objects seems to "jump" randomly between z positions, sometimes one is behind another, sometimes not, and so on.

I'm using 3 cameras.

An ortographic one for my "main" objects, like the player
A perspective one for the "foreground" objects, that spawns above the player, to give a sense of speed and coolness :P
Another perspective one for the "background" objects, that spawns behind the players. I have lots of objects in this layer, and they will spawn randomly in randomly z-positions.

I've got a demo at www.playlouis.com/build/build.html

Click screen to begin. When the worm starts walking, press the UP ARROW to see the weirdness and press the DOWN ARROW to go back.

The strange thing is that this weirdness does not happen in the editor player.

So, could you tell me why does this happen and how may I fix it?

Thanks in advance.

Support / Black border around sprite.
« on: August 21, 2013, 03:15:07 am »
Hello. I'm getting black borders around tk2dSprites. The textures are just fine. But when I put inside a GameObject, it displays these ugly black lines.

I own another 2d plugin, not sure if I can say its name. But when I use the SAME textures, they display just fine.

I tried to change Filter Mode to point. The black borders are gone, but the softness of the sprite are gone too.

You know, I could use this another plugin, but it is VERY limited with animation. Your is much better.

I took some prints to show you.

So, is there a way to get similar results to the first print? (the other plugin)


Support / Mobile game - Too many atlases?
« on: August 09, 2013, 07:50:47 am »
Hello. I'm making a mobile game, but I'm not sure what to do with SO many textures.

First - There are 8 HUGE parallax backgrounds. If I do not put each one in a single atlas, it won't fit (at least not within the mobile limits)
Second - I have textures for : Player (many clips, each clip has tons of textures), Obstacles (each obstacle explodes, has lots of animation), Background, Enemies, and so on.

So, for more readability, maintainability, etc I keep tons of atlases

1 for the player and it's animations
1 for all the obstacles
3 for all the enemies
1 for each UI Screen
1 for each background parallax, and so on.

Is this "healthy" for my mobile CPU / GPU? Will it destroy the performance? Or is it better that I live with the insanity of editing every little texture in one huge atlas?


Support / Font outline - Changing color along with text.
« on: July 10, 2013, 08:38:04 am »
Okay. I took BMFont, exported some black-outlined fonts. Changed the black outline to green in photoshop. When I import the font to Unity, with tk2dFont, created a TextMesh Component and changed its tk2dTextMesh color, the border paints along with the text. Okay, tk2d doesn't know anything about borders, it only knows what's inside the texture, so it paints everything.

I'm doing something wrong? Is there a way to to this?

I mean, I could paint the white parts in photoshop to the color I want, BUT, is there a way to choose the color dynamically in 2d toolkit. but leaving the border color intact?


Support / Mobile - Atlas size - 4096 x 4096
« on: July 06, 2013, 10:29:28 am »
Okay, I know it's absurd. But read me out.

I had a big parallax background. It fiiled a 1024x1024 texture. I've used that "diced render mesh (64 x 64)" to minimize the draw calls (it was what I've read at least).
The game is often being tested in my mobile device. It worked just fine.
But then I decided to add a new parallax background! I used the same collection (for ease of use) and I had to extend it to 2048 x 2048... then two more - 4096 x 4096.
And now my mobile can't play my game anymore. The background DISAPPEARED!
So I deleted those extra backgrounds and got my game running again.

But I NEED those backgrounds. And apparently, my mobile run VERY slow when I put those backgrounds again (even in different collections). I think that, they are so big that they can't be loaded at the same time. If that's the case, is there any way to load images and create sprite collections at runtime? Even if I'm using mobile?


Support / Circular sprite - Outline appearing
« on: June 07, 2013, 10:18:02 pm »
Hello, I've got this problem before on a rectangular sprite, where all of the rectangle was filled by the image. I've had to duplicate that sprite to give a parallax sensation, but the sprite had that ugly thin black line.

All you've said to me was "Change the pad method to extend", and it worked great! Thanks for that.

Now I've got a very similar problem. I have to do some kind of a trail. The way I pictured it is creating a ball and duplicating it one after another, following the character.

Well... The outline is keeping me from getting a nice result. And I just can't get it off. Even with the "extend" thing, which I think it might work for full filled rectangle sprites. But what about a 'not-rectangle' one? As a circle? How can I do that?

Keeping in mind that... the "outline" are the alpha bits of the image, only visible when you put another very close to it (or if you have a very great eye). Not an actual outline.

Thanks man.

Support / General mobile performance
« on: June 03, 2013, 08:26:06 am »
Hello again, well... I'm designing for mobile, but I don't know exactly the best methods to improve performance on these devices.

Things like "enable or disable dynamic batching on 'Other Settings'"?

Inside collection settings, there's a lot of options, like Filter Mode and Compression.

I wanted to know IF there are good practices for everyone designing mobile games, generally speaking.


Support / SetSprite, polygon colliders not updating
« on: May 24, 2013, 10:19:58 pm »
First, sorry for my "questions spam". I've got A LOT of questions cos I'm newbie with unity and 2dtoolkit. Most of them I find easily in the forums, but some of them don't.

Well, ok. I got a Collection with 2 sprites in it. It's two 'pointy rocks'. The first one is bigger and the second is smaller. Since they're so pointy, I can't use box colliders. Then I used Polygon colliders.

I've created a tk2dSprite and selected the newly created Collection and selected one of the sprites.

Now, to Instantiate it randomly, I've created a Prefab with this Sprite, and linked the Prefab in a script.

This script is now responsible for instantiating the Prefab in the scene. So, I use the following code:

(I created more variables to make the code easy to follow)

GameObject go = (GameObject)Instantiate(rocksPrefab);

tk2dSprite sprite = go.GetComponent<tk2dSprite>();
int numSprites = sprite.Collection.spriteDefinitions.Length;

sprite.SetSprite(sprite.Collection.spriteDefinitions[Random.Range(0, numSprites)].name);

This is enough to instantiate the tk2dSprite with the RocksCollection in it. But when I do the SetSprite part, it changes randomly to one of the sprites nicely, BUT do not UPDATE the collider. I keep getting the collider which the prefab is set. Why is that? And how can I fix this?

Thanks again.

Support / Possible Bug
« on: May 24, 2013, 08:35:31 pm »
I've asked a friend to follow the same steps, and the bug still occurs.

1. Create a Sprite Collection, rename it to "SomeCollection" (doesn't matter)
2. Open it, drag 2 textures to it. Commit.
3. Create a tk2dSprite, select the collection "SomeCollection", select one of the sprites (does not matter which)
4. Rename the sprite "MySprite" (doesnt' matter)
5. Create a C# script and drag it to something on the scene (could be the camera).
6. On the 'Start' method of the script, write Debug.Log(GameObject.Find("MySprite").getComponent<tk2dSprite>().Collection.Count).
7. Test the game.

It should appear "2" on the Debug Log, 'cos the collection has 2 textures in it. Okay. Stop the game.

8. Open the "SomeCollection". Select one of the textures, do you see "Sprite ID" on the top? Well, select the texture with SpriteID "0". It must be the one with 0.
9. Delete the texture with SpriteID 0.
10. Test the game.

It should appear "1" on the Debug Log, after all, the Collection only have 1 Sprite, but it shows "2".

This is breaking the randomness of my random sprite generator.

Just want to expose it to see if it's a bug or not.


Support / Parallax scrolling
« on: May 21, 2013, 10:18:06 pm »
I've found some results on the search page, but none of them explains how to do this effect on 2d toolkit.

I've done the following. Created 2 tk2dsprite with the same sprite in it. I moved the second to the right side of the first and I keep moving the two of them at a constant speed to the left. When the first move off the left bounds, I move it to the right side of the second sprite. When the second one moves away from the left bounds, it moves to the right of the first sprite. And there you go. Theoretically, it works, but I keep getting a thin, perceptible, ugly line between the two sprites.

Is there a more "right" way to do it? Or another way that has proven to work? Thanks.

I'm doing my first professional game for Android, and I think your product was the best one for this situation.

I did some basic tests for Android. And I've got something VERY strange. When I first "build and run" with my device connected, the game ran JUST FINE. But when I quit it, and reopened, the sprites starts flashing forever (just the static-ones, not the animated ones). I thought it must be some caching problem. But even when I restarted my DEVICE, the sprites are STILL flashing. So, I uninstalled the app, installed again AND - first time running, perfect. Exit, open again, sprites flashing forever. What the hell? My game only works in the first time!

So I continued my tests, this time, messing with the "player settings". And I got something curious. When I turn OFF the "Dynamic batching", the game runs just fine. In the first time, second, third, well... the way it always should have worked. So I thought "well... let's just keep this box unchecked". But... It would be very good that this option stays checked, 'cos I know it increases the game performance. So, you guys could explain to me what these flashing are? And why do they happen? And how can I fix this?

So, the problem is that. I'm going to explain what my tests are - I have 2 prefabs, the first is a "Walls" prefab, and the 2nd is a "Powerups" prefab. These two prefabs are associated with two variables of a Scenario.cs script, which belongs to a GameObject in the scene.

The Scenario.cs script has...
public GameObject wallsPrefab;
public GameObject powerupsPrefab;

The scenario is responsible for creating the GameObjects of the prefabs and moving them along the x-axis. From the right boundarie of the screen to the left. When the sprites get all the way left, they are destroyed.

And that's it. Objects generated from two distinct prefabs that moves from the right side of the screen to the left. These sprites flash all over the scene when the game is run after the first time. And this does not happen when Dynamic Batching is OFF.

Oh yeah, my device is a Motorola Defy (kind of old, but still).

Waiting for an answer. Thanks.

Pages: [1]