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

Pages: [1] 2
1
Support / Vertex lighting
« on: January 06, 2016, 04:22:14 pm »
My tk2dSprites are using the provided LitBlendVertexColor shader. When I place a point light in my scene that's using vertex lighting (rendering mode set to Not Important), I often get these hard lines (notice on the window)



I was just curious if there was anything that could be done about this, besides switching to per-pixel lighting?

Edit: Probably worth nothing those hard lines are were the tile map is partitioned. The light affects only one of the partitioned chunks.


2
Support / Getting particle systems to be lit
« on: April 22, 2015, 01:49:08 pm »
I have a sprite that I want to use in my particle systems (it's just 4x4 white square). I'd also like for the particles to be lit.

So I create a sprite collection of just the single texture, generating normals for it, set the shader for the atlas0 material that's generated to LitBlendVertex and attached the atlas0 material to the particle system.

However, the particles are not reacting to light. I've tried different shaders (both Unity and tk2d) but to no avail. I also messed with the particle systems normal direction setting but still nothing.

Is there something I'm missing to get particles in a particle system to be lit?

3
Support / Some sprites not being lit by directional light
« on: April 12, 2015, 11:20:03 pm »
I'm having an odd issue with some sprites in a scene not reacting to a directional light (they appear as if there's no light in the scene), yet a duplicate of the same sprite will be lit just fine.



As you can see, the tombstone and background silhouette sprites on the left are being lit, but the same (duplicate) sprites on the right are not. Their settings are exactly the same, minus transform position.

Any ideas on why this would be occurring? I can confirm that the sprite is setup properly, generating normals, and with the proper shader. I'm using latest version of both Unity and tk2d (2.5.1).

4
I upgraded my project to Unity 5 (was on 4.3.4 prior) and I'm now getting the following exception. It appears frequently, though I haven't pin pointed exactly how to reproduce yet. I'm actually not 100% sure which version of 2Dtk I'm using, I believe at least 2.4.

I'm curious if this is a known issue yet? A quick search didn't come up with anything.

Infinity or nan floating point numbers appear when calculating matrices for collider.
UnityEngine.BoxCollider:INTERNAL_set_center(Vector3&)
UnityEngine.BoxCollider:set_center(Vector3) (at C:\buildslave\unity\build\artifacts\generated\common\modules\NewDynamics.gen.cs:2210)
tk2dBaseSprite:UpdateCollider() (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dBaseSprite.cs:542)
tk2dBaseSprite:set_spriteId(Int32) (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dBaseSprite.cs:235)
tk2dBaseSprite:SetSprite(tk2dSpriteCollectionData, Int32) (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dBaseSprite.cs:277)
tk2dSpriteAnimator:SetSprite(tk2dSpriteCollectionData, Int32) (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dSpriteAnimator.cs:739)
tk2dSpriteAnimator:SetFrameInternal(Int32) (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dSpriteAnimator.cs:703)
tk2dSpriteAnimator:UpdateAnimation(Single) (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dSpriteAnimator.cs:588)
tk2dSpriteAnimator:LateUpdate() (at C:\workspace\Overtime5\Assets\TK2DROOT\tk2d\Code\Sprites\tk2dSpriteAnimator.cs:735)

5
Support / Mesh Leak
« on: November 21, 2014, 01:22:36 am »
I seem to have a mesh leak in my game. I noticed that memory wasn't being release between scene changes, and after running the memory profiler, it seems that meshes aren't being destroyed.

Take the following example. Running the memory profiler, it shows that there's 34 meshes in the scene at startup. The game plays for a minute, then reloads the same scene via Application.LoadLevel. The memory profiler now shows 69 meshes. This is even after I do Resources.UnloadUnusedAssets. Am I wrong to expect 34 meshes, since I did a scene reload?

Here's a screen shot of the profile after a scene reload. I really don't know what to make of it, other than here's a ton of nameless meshes, with a lot of references, in memory.



I don't know if this is a problem specific to 2D Toolkit, but since 2D Toolkit sprites and textmeshes are the only objects that use meshes, I figured I'd ask here to rule out any possible known issues with the framework. Feel free to tell me to buzz off if this has nothing to do with the framework! But any help in general is appreciated :)

6
Support / Tiles in tile map appearing in-game, even though deleted
« on: August 09, 2014, 01:47:19 pm »
I have tiles that I've deleted and committed the change from to tile map. The tile doesn't appear in the scene or game view prior to running the editor. However, when I start the game in the editor, the tiles appear. When I stop the game, and it goes away again.

How can I prevent this from happening? I'll sometimes also experience the opposite (tiles that are suppose to remain disappear when running the game).

7
I have a tk2dSpriteAnimator with a collection of tk2dSpriteAnimationClips. For some reason, an empty tk2dSpriteAnimationClip (empty being that the Empty property is true, there are no frames, and the name is empty string) is being inserted into the Library.clips array. Since I randomly choose a clip to play within the library, if this empty clip is selected I receive a DivideByZeroException in tk2dSpriteAnimator, line 686 (
Code: [Select]
int frameId = (int)clipTime % clip.frames.Length;).

Why is an empty clip being inserted into the clips array? I do not have this clip specified in the sprite animation editor.

8
Support / Rigidbodies falling through tile map mesh colliders
« on: May 31, 2014, 01:12:11 am »
I'm having an issue with rigidbodies easily falling through the mesh colliders of a tile map (not always, but usually). I've read http://2dtoolkit.com/forum/index.php?topic=3039.0 and the recommendation then was simply to use Physics2D, which I did do, but it actually made the problem worse.

I'm curious if there's anything else that can be done? I have the collision detection mode set to Continuous, which according to the Unity docs should detect collision for any static mesh geometry.

9
As the title says, I need to set the renderer material of a particle system to match the current image of a particular tk2dSpriteAnimator. Since the sprite is animated, I have to do this programmatically at run time (I assume).

My initial assumption was that this would be a simple case of syncing up the ParticleSystemRenderer.material with the tk2dSpriteDefinition.material, however tk2dSpriteDefinition.material returns the sprite atlas, which isn't what I want. Browsing the documentation, I don't see any properties that would return the current frame image as a material. So what's my alternative?

10
Support / Any way to increase TileMap.Build performance?
« on: May 03, 2014, 10:20:53 pm »
As the title says, other than decreasing the chunk size (I'm currently set to 8x8), is there anything else I can do to help increase the performance of performing a TileMap.Build? I'm currently deploying to Ouya, and there's a bad, noticeable hitch when I call TileMap.Build to change some platformer tiles.

If not, what would be a good alternative to change the look of a tile? When a player dies, I want the tile to get bloody (similar effect to Super Meat Boy). Perhaps overlaying another sprite on the tile, instead of changing it?

11
Support / Tile map layer isn't showing up in standalone build
« on: April 17, 2014, 11:23:34 pm »
I have a layer in my tile map that's used with the tk2dParallaxCamera script. In the editor, the layer appears and behaves normally. However, when I run a standalone build, the layer doesn't appear at all. The camera and layer distances should be the same as when running the editor, so I'm really not sure what the problem is. 

12
This is probably a real noob question, but humor as we all have to learn sometime!

I have a sprite collection setup like so


Each sprite frame in the sprite sheet is 26x24, thought the sprite themselves are only 18x24.

However, I'm noticing when running the game, that certain pixels in the sprite seem to be shifting, or getting lost, and sections changing shape. Take a look at this example (taken from the game window in Unity), specifically the eyes


This is what it should look like (taken from my image editor)


I'm using a tk2dCamera with a native resolution of 1920x1080 with a wildcard override of pixel perfect, center.

I don't know if this is something specific to 2D Toolkit, maybe how it scales the sprites or something? Perhaps I have my sprites setup wrong? I really don't know why this is happening, so any insight would be helpful. Thanks!

13
I'm using the tk2dCamera to zoom in and out to ensure that all players are always within view as they move, as well as moving the camera so that it's center between the left and right most players. Basically, it's a camera very similar to Super Smash Bros or any other fighting game. You can read more about the specific implementation details here http://overdevelop.blogspot.com/2014/01/single-camera-system-for-four-players.html.

What I'd like to achieve is to make sure that the camera never moves or zooms out farther than the bounds of the tile map.

I've been banging my head on this for a few days and I'm failing to come up with a working solution. One possible solution was to obtain vectors to the corners of the camera bounds, and when its distance was negative to that of the corners of the tile map, stop moving. This worked, but zooming became an issue and it ultimately fell apart.

Has anyone implemented something similar? The fact that the camera zooms (increases in size) is the part that's really tripping me up.

As always, thanks!

14
Support / tk2dParallaxCamera script + tk2dTileMap, z-index issue
« on: March 09, 2014, 03:31:46 am »
I'm attempting to implement the tk2dParallaxCamera script with tk2dTileMap. The problem I'm facing is that the parallax layer is drawing on top of all other layers (instead of behind), and I can't figure out why. I've followed the example parallax project and everything seems to be in order as far as I can tell.

My tile map is setup as such:


And my cameras:



Do you notice anything wrong? Is there something else I'm not considering? Thanks.

15
Support / Tile base platformer collision detection?
« on: February 16, 2014, 02:01:04 pm »
A popular method for doing platformer collision detection in Unity seems to be by raycasting, however whenever I try this, I constantly run into bugs that result in the player falling through collision layers.

I'm at wit's end trying to resolve these bugs, thus since I'm using tk2d's tile map, I'm considering using a more "traditional" method of checking the player's position and desired move amount against nearby tiles, determining what type they are (are they passable, impassable, etc) and altering the player's final movement as appropriate.

I don't see people (at all) using this method, and considering that this method has a long history of being battle proven, I'm curious as why not? Is there some "Unity" road block I don't see that would make this not work? Has anyone here attempted something similar?

Pages: [1] 2