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

Pages: [1]
1
Support / Re: Spine Modifying Skins
« on: October 08, 2014, 11:50:58 pm »
Okay thanks!

2
Support / Re: Spine Modifying Skins
« on: October 08, 2014, 02:27:27 pm »
Hey, just checking to see if anyone had a chance to glance at this and if there was any insight.

Thanks! :)

3
Support / Spine Modifying Skins
« on: September 30, 2014, 03:42:51 pm »
I'm utilizing Spine to create animations in Unity with tk2d. I can successfully get the animation to import and all the animations to run, but I had a few questions:

1) To change the sorting layer, do I need to add a tk2dSprite component to the game object?

To add the spine animation into the scene, I'm going to Create->Spine SkeletonAnimation. There is no spine selections in Create -> tk2d like some of the tutorials I've watched, so not sure if there should be and I did something wrong in the setup. Though everything works when I just do Create -> Spine SkeletonAnimation, but I can't change the sorting layer without adding a tk2dSprite. Just making sure there isn't another way.

2) What's the best way to go about changing individual pieces of an object's skin? For example, the artist sent me two different hair types for the character, though everything else is the same. When I look at the json txt file, in the Skins section, it says:

      "Hair": {
         "Male Hair": { "name": "Healer/Healer_0002_Group-27", "x": 53.1, "y": 72.37, "rotation": -0.44, "width": 74, "height": 54 },
         "Female Hair": { "name": "Healer/Healer_0003_Group-21", "x": 44.06, "y": 49.66, "rotation": -0.44, "width": 97, "height": 74 }
      },

I've done a lot of digging and couldn't find any tutorials or guides/examples on an easy way to swap out just the hair skins. What's the best way to go about changing this character's hair?

3) I'm using 1X & 2X graphics to support SD & HD. Will that work with spine animations? I've tried using the 1X & 2X feature in sprite collections, but it doesn't set the material automatically on the SkeletonAnimation. The material gets set to None. When I click "Reload" in the Skeleton Animation script in the inspector, then it updates the material to the proper resolution material. Is there a way to automate this so it changes the material automatically?

4) I have a single skeleton/animation in Spine with many many skins. Eventually, I'm not going to be able to fit all the skins into a single Atlas. I tried creating separate atlases, but then was getting errors from the JSON file saying it couldn't find all the sprites because they weren't all in one atlas. Is there a way to include multiple atlases for all the skins?


Thanks again!

4
Support / Re: Fading UI's In/Out
« on: September 30, 2014, 03:12:14 pm »
Great thanks! Will do!

5
Support / Re: Fading UI's In/Out
« on: September 27, 2014, 01:36:29 pm »
Great thanks! Since I'm using this for a lot of the UI components, I'd imagine many of them will use the same material, and I wouldn't really want to create a new material for each screen of a UI, so I'll probably go the second route.

When you say doing that in the editor script, would that just save the overhead in the loading of a scene? I'm populating all these lists in the Start() function, so after those lists are populated, while the game is actually running it really wouldn't matter whether I loaded them in the editor or at runtime, right?

Thanks!

6
Support / Re: Changing Sprite Color
« on: September 26, 2014, 04:03:52 pm »
I've noticed the tk2d automatically trimming the excess blank space like you indicated, but I'm running into a problem with some positioning due to that extra space.

My artist is giving me sprite sheets for each animation (each sheet containing all the frames in that animation). For the idle animation for this character, each sprite in the sheet is 151x178. For the attack animation, each sprite in the sheet is 328x246. The sprite character itself is the same size, but he is swinging a massive sword in the attack animation, so the entire box needs to be 328x246 to encapsulate everything. I know I could make the sword itself a separate animation, but still the characters arm movement would require a box bigger than 151x178.

So when I switch animations, the sprite jumps a bit on screen because of the sprite's position relative to its box. Is there any way to easily accomplish smoothing out those transitions other than adjusting the sprite's position each time the animation clip changes? Or should I just get a sprite sheet with each sprite in a box big enough for the biggest animation?

It seems like there would be a lot of "wasted space" by putting a sprite in a box 3x the size, but I can't really think of any other way. So just looking to see what the "best practice" is for this type of scenario.

Thanks!

7
Support / Fading UI's In/Out
« on: September 25, 2014, 08:04:42 pm »
Hey,

Is there an easy approach to fading complex UI's in/out? Currently, on Start(), I'm building a List of all Text Meshes, tk2dSprites, tk2dSlicedSprites, etc for all elements in the UI. Then, when the menu needs to fade in/out, I'm cycling through them all to run a HOTween fade. It gets the job done but doesn't seem to be very efficient  to accomplish this task. Just wondering if there was a better way to go about this.

Thanks!

8
Support / Re: tk2dSpriteAnimator.LateUpdate()
« on: September 24, 2014, 10:09:04 pm »
Great, thanks so much! Looked at the sample. Thanks again!

9
Support / tk2dSpriteAnimator.LateUpdate()
« on: September 17, 2014, 03:07:05 pm »
Hey :)

I have a question regarding the performance of the "tk2DSpriteAnimator.LateUpdate()" function. My game is experiencing considerable lag at times, and when viewing it through the Profiler, the biggest culprit is tk2dSpriteAnimator.LateUpdate(). For a single frame in one of the worst instances, it is getting 585 calls and its Time is 35.68ms.

In the game, I have "obstacles" that are made up of 2 tk2dSprites and 2 tk2dClippedSprites, each with the same animator (though I'm using 2 different clips for the 4 objects). These objects are rings with a background and border. The player object passes through the rings, so I needed to use two objects to create the back background & border, and then 2 more objects to create the front mask background & border. There is a parent empty game object for each obstacle that contains the 4 children. The parent game object has a box collider, but none of the 4 animating children do.

The reason why I'm separating the background and borders into separate objects is so I can change their colors independently (I'm using 9 colors total). I could simply create assets for each color, but then that would multiply the assets 9x, and then I'd have to have 9 animations instead of 1, so I figured it was more efficient having more game objects.

Anyways, that's my set up. I have 100 of these obstacles total in the scene, but at any given time only 4-8 are present on screen. I tried creating a script that would run through all the obstacles in a foreach loop every second that disables any objects left or right of the screen, but it creates a noticeable stutter each time that Coroutine runs.

Any tips to optimize this? Not sure if I'm approaching this problem the wrong way.

Thanks!

10
Support / Graphic Question w/ TileMaps & Texture Atlas
« on: September 09, 2014, 02:16:56 am »
Hey, I had a few questions regarding some "best practices" using the 2D Toolkit. I did a lot of research/experimentation to answer most of my questions, but I had a few that I couldn't get an answer to that I'm hoping I could get some clarification on :)

I've created a lot of simple games in the past that haven't required too much concern over CPU & GPU usage, but I'm taking on a bigger project now that I know I'll have to watch how I design it. I'm designing an simple RPG which will feature the player having characters of several different jobs (e.g. White Mage, Ninja, Assassin, Thief), each with their own set of sprites (idle, walking, attacking, casting, etc). My questions...

1) When setting up the Sprite Collections, should I made one collection per job type to include all the sprites? Like a White Mage collection, Ninja Collection, etc? Or should I try to combine them?

2) When designing a game for the iPhone/iPad, for each Sprite Collection for each job type, should I use the Platform Support to create a 1X and 2X texture atlas?

3) Is there a general rule of thumb for texture atlas max size for iPhone and iPad?

4) I created a TileMap following the tutorial on the 2D Tooklit site. The TileMap uses 3 layers and is using 9 Draw Calls. All the tiles are from the same texture atlas. Is 9 Draw Calls a typical amount? If that's high, are there things I can do to reduce that?

5) Should I be using the Sprite Collection "Platform Support" tool on all Sprite Collections used for things like Tile Maps, heroes, enemies, spells, etc? For every time I use that Platform Support tool, I would need to import into the project 2 or 3 sets of all the sprites at the different resolutions, correct?

6) Based on the project I described, are there any other best practices or rules of thumb I should be following when utilizing the 2D Toolkit to optimize the game's performance?

Thank you so much in advance for answering my questions! Am definitely loving this toolkit :)


11
Support / Re: Changing Sprite Color
« on: August 24, 2014, 07:28:40 pm »
Thank you so much :) Awesome toolkit by the way, just downloaded it and love it!

12
Support / Changing Sprite Color
« on: August 23, 2014, 05:45:08 pm »
Hey,

I know this is a painfully noob question, but I am not super graphically inclined. I created an image with a black circle and a transparent background, saved as .png, and imported into my Unity project. I created a tk2dsprite object. When I go to change the sprite's color, the circle stays black no matter what color I set. When I change the transparency, it does fade out/in properly, just the colors have no effect on the circle.

How do I make it so I can change the color of the circle when I change the color setting in the sprite editor? Not sure if I'm doing something wrong in Unity or when I created the image file.

Also, a less important question, but the mesh triangles fit perfectly around the circle. However, there is some excess transparent background in the image because the white box that surrounds the circle in the scene editor is much bigger than the triangles. Is there a way to trim the excess space?

Thanks!

Pages: [1]