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

Pages: [1]
Support / iOS 8 Issues
« on: September 03, 2014, 01:33:46 pm »
Hey everybody,

Has anyone started adjusting their tk2d game to iOS 8?
I just received screenshots for my game on iOS 8 and everything is a mess... Specifically, things are not positioned where they should be.

If anyone can share tips or their experience, it will be great.

Support / Z position influences draw calls
« on: July 23, 2013, 05:56:56 pm »
Not sure if this is a Unity specific or tk2d specific question.

I noticed I have more draw calls than expected, so I started to investigate.
Bottom line, it seems that when instantiated objects have a different Z position, the result is a higher draw call count than if not.

The experiment is simple:
I instantiate object 1, followed by instantiation of object 2, then 1 then 2 again.
Each object uses a different sprite collection.
The result: With the same Z, 2 draw calls, with different Z, 4 draw calls.
Also, when instantiating at a different order (1 1 2 2) the result is 2 draw calls regardless of the Z.


Code: [Select]
using UnityEngine;
using System.Collections;

public class DrawCallTester : MonoBehaviour {

// Attach two sprites that use a different collection
public GameObject proto1;
public GameObject proto2;

void Start() {
// Result:
// When Z is the same, success  ( 2 draw calls )
// When Z is different, failure ( 4 draw calls )
// When order is 1 1 2 2, success ( 2 draw calls )
int x = 1;
Instantiate( proto1, new Vector3( x++*100, 300, x*10 ), Quaternion.identity );
Instantiate( proto2, new Vector3( x++*100, 300, x*10 ), Quaternion.identity );
Instantiate( proto1, new Vector3( x++*100, 300, x*10 ), Quaternion.identity );
Instantiate( proto2, new Vector3( x++*100, 300, x*10 ), Quaternion.identity );


Is this to be expected?
Is there anything I can do about it?

Thanks in advance.

Support / The new animation editor is awesome!
« on: April 30, 2013, 09:03:41 pm »

I just saw it now, the new shiny animation editor... boy oh boy oh boy oh boy!
I have not updated tk2d on my first game, as I wanted to maintain stability, but now that I have started working on the second one, working with the latest toolkit, I just first used this new sleek editor.

Love the new timeline-like view and the fact that I can work in a less confined space now.
Also, nice that you have unified the look and feel of the sprite and animation editors. Makes a lot of sense.

As always, well done and much appreciated.

Showcase / Chicks Ahead - Cartoon style game for iOS
« on: March 14, 2013, 08:41:46 am »
Hello fellow TK2D fans,

I would like to share my first and latest iOS game developed with 2D Toolkit.

The design intention behind Chicks Ahead was to provide an easy going and uplifting game play experience.

We have invested a lot of effort in animating the characters just right, choosing the right music and sound effects and adding many little things that we hope creates a more complete you-are-in-a-cartoon feeling.

Hope you like it.

ChicksAhead.com | On iTunes | @ChicksAhead


Support / Base size of a TK2D-powered project
« on: December 23, 2012, 01:20:02 pm »

I am trying to figure out why I have a huge size difference between what the build log reports (~60mb, uncompressed) and what I see in the iOS Usage screen (~110mb). The Unity Answer (open question) is here

More specifically, I am trying to figure out if it has anything to do with tk2d.

Does anyone know what is the base size of a minimalistic tk2d project? One with
1. A simple and small sprite collection
2. An animated clip
3. A font

I mean, to the best of my understanding, the extra 50mb on my project can only be caused by code libraries ("using" statements), so I am wondering if tk2d brings too much overhead with it.

Thanks for any info.

Support / Non power of two atlas
« on: November 13, 2012, 07:42:29 pm »

I understand that square shaped, power of two textures are only required on iOS when you are using compression.

If this understanding is correct - shouldn't there be a way for me to tell tk2d that I am not going to need compression, and therefore the generated atlas0.png should not have any extra padding? Won't that save some space?

Support / iPhone 5 texture best practices
« on: November 13, 2012, 06:59:44 pm »
Hello everybody,

I was wondering if anyone has any tips in regards to the handling of iPhone 5 textures.

To be less vague - up until now, I have developed assuming 1024x768 resolution, and then I was planning on doing some cropping on iPhone - so my textures would remain pixel perfect.

The introduction of the iPhone 5 with the 1136 pixel wide screen changes everything.
Now, as far as I understand, I have two options:

1. Either fit to scale ("fit width") - which will enlarge my 1024 pixel textures a little (I am not sure what is the quality loss here), or
2. Redo my "native" game textures to use 1136 wide, and then crop on iPad and iPhone 4.

As if this isn't enough of a headache, using 1136 as a texture size (e.g. for background) would mean that I have to use an atlas size of 2048x2048, and then I am not sure how it will all work on devices that limit texture size to 1024.

Any insights are appreciated.

Support / Camera Depth Performance Impact
« on: October 22, 2012, 02:15:48 pm »
Hello everybody,

I am now organizing the layers of my game, so each layer have enough room to add and remove elements.
So my background will naturally be far into the Z, and the HUD will be closer the camera, etc.

I was wondering if having a large camera depth - say 800 pixels - has any significant performance penalty I should worry about.

I mean, it is easy for me to say that Background layers all live in 600-700, the game itself happens at 200-600 and the HUD and overlays live at 0-200.

The primary reason I am looking to use these large numbers is that in the game I am sometimes using 3D particle effects, so they do take up more Z than needed, and I want them all to stay within their layer (for example, a sphere shaped explosion with a sphere of 100 pixels, will originate at 400 but will send particles to 350-450 - and I want them to not appear on top of the HUD).

Thanks in advance for any input.

Support / Creating a scalable overlay sprite
« on: October 13, 2012, 09:51:45 am »
Hello everybody,

I would like to create a semi transparent overlay, that I can use (for example) when the game is paused.
So, I am wondering what would be the best approach for me to have such an overlay in a way that I can easily scale to different resolutions.

One approach I am considering, is to have a 1x1 semi transparent pixel sprite, and then scale it by changing its transform scale. This way I get a direct ratio, where a scale a 1024x768 will cover the entire screen.

I also noticed there is a scale property in the inspector of a tk2dSprite, along with Bake Scale that I never used. I never touch this area, as I am using the tk2dCamera.

Can anyone share some thoughts on that? I mean, does my approach make sense? Is there a better / more efficient / easier way?

Thanks in advance.

Support / Unikron for President (and font outline question)
« on: September 10, 2012, 11:44:25 am »

I just started playing with the font capabilities of TK2D and they are legendary!
I love the ease of use and the awesome gradients feature, and the nice handling of kerning and everything.

Really well done!

In the Font Tutorial the screenshots show the text mesh with what seems to be a nice black outline.

Is there a way for me to achieve such effect? I could not find any setting for it so far. Am I misinterpreting the screenshots?


Support / Possible bug with multiple atlases
« on: July 30, 2012, 10:15:40 am »

I think this may be a bug:

I have created an atlas for some parallax background, and I checked the multiple atlases checkbox, since I knew it will be bigger than one atlas size.
It created two atlases for me and everything was good.

Now, I have created an UNRELATED atlas for animation, and then created an animation collection from it, and an animated sprite.

When I placed the animated sprite in the scene, it ran the loop of the animation but then it added another frame from the multiple atlases I used for the parallax background.

I checked and double checked that I do not have any wrong image in the loops.

After deleting the multiple atlases, it was back to normal.

It seems as if somehow, the multiple atlases influence other atlases / collections that do not belong to them.

Support / Automatic generation of animated sprite
« on: July 27, 2012, 12:48:42 pm »

As I am starting to work with tk2d, I noticed that one of the more time consuming actions is the creation of animated sprites.
I know there is the Auto Fill feature, which is very helpful, but my question / suggestion is this:

I would like to name my images in a way that they represent the name of the clip and a number, like:

And then, to press a button that will create the two clips for me: Running and Shooting.

Also, I am not sure if this is possible, it would be great to simply point the animated sprite to a folder, instead of dragging images to it. Like set up that "this animated sprite is using the folder Textures/Enemy1"

Even better would be if there is a settings screen for the animated sprite that lets me check a checkbox to "automatically rebuild when images change" and to set default framerate and other per-clip settings.

Then, the creation and editing of animation sprites would simply mean: change the images in the folder. Thats it.

Can this or something similar be done now? If not, perhaps add to the suggestion box?

Pages: [1]