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

Pages: [1]
1
Support / Updating old project for Android
« on: August 03, 2019, 05:43:03 pm »
I'm trying to update an old project for Android that I haven't touched in a few years.

I last built it with Unity 5.0.1 and whatever the latest tk2d was at the time.

It no longer functions on Android. I assume something in Android broke older versions of Unity, and they must have since fixed that. But if I download the latest Unity, update my project, and import the latest tk2d, I have lots of shader errors and many of my sprites look pure black.

Is there an older combo version of tk2d and Unity I can use to update this "easily"?

I never had more than 50 downloads of this free app, but Google has started sending out notices that old apps must be fixed (even if unpublished) or your developer account can be suspended!!!

2
Support / Understanding draw calls
« on: January 30, 2013, 12:16:12 am »
I've read in the past (a couple years ago so this probably relates to 3GS era hardware) that you can have up to 10 draw calls per frame before it starts becoming your bottleneck.

So with tk2d, are the following assumptions of mine correct?
  • There is one draw call per frame per sprite collection sheet that has at least one sprite at least partially in the camera frustrum. So tk2d batches all visible sprites of each sprite collection sheet into one mesh, which becomes one draw call.
  • A sprite is on screen if any part of it is in the frustrum of the camera, or if it belongs to a static sprite batcher that has any part of itself within the frustrum.

Does Unity basically take care of all of this for tk2d using its built in dynamic batching? Or does tk2d handle frustrum checks?

One thing I don't understand about Unity's dynamic batching is: doesn't it bog down the CPU for Unity to be checking every single dynamic mesh against the frustrum every frame?  I know older game engines used the VIS system to block out the maps so only a few large blocks had to be checked against the frustrum. Maybe that old method is analogous to occlusion areas in Unity Pro. I'm still not clear on Unity Pro's static batching. How does it decide whether objects are close enough to each other to group together, or does it even bother with separating objects with the same material into multiple groups to prevent the giant group from always being partially visible?

With tk2d, should we be messing with the "static" checkbox at all, or just use the tk2dStaticSpriteBatcher to handle that kind of thing?

3
Support / Deformable sprites?
« on: January 28, 2013, 02:06:25 am »
I'm wondering how a game like Rayman Jungle Run handles world sprites.  There are lots of curved paths for the ground, but it some areas, I can see repeating patterns if I look closely.

My best guess is that a tile map is used for most of the middle sections, while tile strips are used for the sides and top. These tile strips could be placed on top of the edges of the middle tile map to hide them. But this method would require the tile map edge sprites to be croppable, and the tile strips to be deformable (like how I marked in red).

Are these possible future features for 2D Toolkit, or is that too complicated to work into the system?  Are there other ways to do this?

When I look closely at the screenshot, it looks like maybe only the top surface that you run on uses an overlayed tile strip, and for the rest of it maybe they just used a very high-resolution tile size and came up with many variations of tiles to get all the different edge possibilities. Not sure.


4
Support / Source texture dimensions
« on: December 30, 2012, 04:07:03 am »
I've run into a few issues when I import textures to Unity to be used as sprites.

Ideally, a texture should be set to Non Power of 2 = none in its import settings, and it should not be distorted.

Here are problems I've run into. Wondering if there are work-arounds:

1. If the texture is non-square but does have power-of-two dimensions (for example, 128x256), then Unity forces it to be square (the NonPowerOf2 settings is grayed out and set to ToNearest), and it will be distorted into a square in the SpriteCollection. This may be more of a Unity problem than anything else.

2. This is just an annoyance. Most of the time, non-power-of-two textures are imported with the Texture Type set to Texture, so I have to manually change it to Advanced and change the Non Power of Two setting to None. Can this be automated somehow by tk2d? Sometimes new textures do get imported with the settings I want, but I'm not sure why.  For now I'm just going to write a menu command that fixes texture settings for me.

5
Support / Sprite button event firing
« on: August 25, 2012, 03:31:30 am »
Unikron, this isn't so much a usage question as it is me trying to understand a bit better how Unity works, and your tk2dButton is a great example.

I noticed that in tk2dButton, events are called like so:

Code: [Select]
if (ButtonDownEvent != null)
ButtonDownEvent(this);

However, I have read (I'm relatively new to C#), that it is good practice to assign your delegate to a temporary variable and then calling that, in case your last subscriber unsubscribes between checking for null (first line above) and calling the event (second line above).

But in Unity is that an unnecessary precaution?  I'm not sure if co-routines are actually called asynchronously as part of the Update() sequence or if they are happening synchronously in another thread.  Also, I'm thinking maybe it doesn't matter because when you destroy MonoBehaviours, the MonoBehaviours will actually still exist until the Update() step is complete. So in that case you would never have a situation where the last subscriber would disappear right before you try to call an event.

6
Support / Feature request: built-in option for trilinear filtering
« on: August 20, 2012, 02:53:01 am »
I use trilinear filtering for most of my Collections so it doesn't look terrible on certain Android devices. Since Android devices come in dozens of different dpi's and screen sizes, you can't just always make it pixel perfect, so you have to rely on trilinear filtering to make it look decent when graphics are scaled down.

Anyway, after I manually change the texture setting to trilinear, it is often swapped back to bilinear filtering when I make modifications to a Collection.  I'm afraid in the future I might miss switching one of these back to trilinear, since I have many Collections in my project.

7
Support / Mipmapping based on platform
« on: March 26, 2012, 01:10:24 am »
I'm making an iPhone/Android game that has a static camera.

It's been easy to set up the graphics so they are pixel perfect on iPad, and then still pixel perfect on iPhone4 by cropping a little off the sides (smaller orthographic size on camera).  And the iPhone 3gs is also pixel perfect because I set the camera to the same orthographic size as I do on iPhone4 so the first smaller mipmap is used and is pixel perfect.

But on Android, there are way too many resolutions to support. I don't want to have to allow any more cropping than I do now, or the scenes will have a bunch of unimportant space around the edges because I need to account for them possibly being cropped off. So on devices that do not have resolutions in between iPhone4 and iPad, I just scale to fit and rely on linear scaling to keep the graphics decent. 

This is where the problem is.  On Android devices that are slightly smaller in resolution than iPhone4, it drops to the lower mipmap and scales up, so it looks really blurry.  For these devices, it looks better to turn off mipmapping so it's always working with the higher resolution sprites.  The problem is that for smaller resolution devices, the lack of mipmapping is very apparent, i.e. tearing/aliasing in the sprites.  And this affects the iPhone 3gs also, since it's pixel perfect rendering was relying on mipmapping.

So my questions are:

Is there any way to set whether mipmapping is used based on the platform (iOS vs Android)? Then it would look good on all iDevices plus high-res Androids, which would cover the great majority of users.

Is there a way to get mipmapping to pick the higher resolution mipmap and shrink it if the resolution is close?  Not sure what the cutoff is for deciding whether to display the higher or lower resolution texture.  When I did OpenGL programming myself, you could pick mipmapping independently for maximizing and minimizing filters.

8
Support / Projectors?
« on: February 25, 2012, 05:33:50 pm »
Is it possible to get a projector to work with sprites? By default, it doesn't seem to. I have a projector set up and it only projects onto an FBX mesh I have in the scene, not the sprites.

9
Support / bug when looking at source texture
« on: February 25, 2012, 04:57:41 pm »
I was modifying the compression settings in the inspector for one of my source textures (already in a sprite collection).  I was curious about how much memory it was saving to dice this sprite.  But once I committed the change to the texture's import settings, Unity went into an endless loop of trying to load assets.

As far as I know, there isn't normally any reason to mess with the import settings of a source texture, so maybe this doesn't matter.

10
Support / Are source textures automatically excluded from a build?
« on: February 11, 2012, 08:06:10 pm »
The textures I am dragging into the Sprite Collection to build an atlas with are in my Assets directory, so does Unity know not to include them in the build?  I could see this adding up to a lot of excess file size if all those source textures are in the build but go unused in-game.

Pages: [1]