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

Pages: [1] 2 3
1
The code is actually very simple,  the file that need to amend is tk2dTileMapColliderBuilder2D.cs. Take a look at https://gist.github.com/kevdotbadger/fd2216c497495de5980d

Basically the BuildLocalMeshForChunk() method is responsible for making the edge collider, it has a bunch of if statements looking for collider types (spriteData.colliderType == tk2dSpriteDefinition.ColliderType.Box), in that branch is where you want to create the box colliders (instead of, or as well as the edge colliders).

My solution was to create (or empty) a parent game object every time the "commit" button was pressed (this is in the Build() method). Then add a shit load of box colliders into position (making the box colliders a child of the parent object - just to keep my level a little tidier). On line 195 is where the box colliders are made, inside the BuildLocalMeshForChunk() method.

Compare the original tk2dTileMapColliderBuilder2D.cs and my amended one at https://gist.github.com/kevdotbadger/fd2216c497495de5980d to see what's going on.

2
Support / Using Unity's sprite slicer to create sprites
« on: September 17, 2014, 09:37:06 pm »
Hello, as most of you know a lot of sprites online come on spritesheets. TK2D has a nice sprite slicer but only if the sprites are evenly spaced. They do have an "automatic" mode which perfectly slices the sprites and it works great. However, I can't use these sprites with tk2d.

Is there a way to use them at Unity has sliced them?

3
Support / Re: Hierarchy Create tk2d Missing from 4.6.0b17
« on: August 22, 2014, 03:01:42 pm »
4.6 is in beta, you do know that? So, I doubt TK2D has been updated for 4.6. I wouldn't expect TK2D to be 4.6 ready until it gets it's public release.

4
Support / Re: A* Pathfinding
« on: July 09, 2014, 11:03:43 pm »
Back before the 4.5.1 change came into effect I wrote a near little script that turned the edge colliders that TK2D uses back into box colliders, runs the map generation for a* and removed the box colliders.

https://github.com/kevdotbadger/BoxColliderGenerator

5
Support / Re: Memory leaks on iOS
« on: June 27, 2014, 06:49:18 pm »
..also are you not batching the sprites? I got your sample from 700+ draw calls to 4 when grouping each row into a single sprite batcher. I don't have pro so I don't have the profiling tools, but the simple 'stats' tells me that the it's doing less.

6
Support / Re: Memory leaks on iOS
« on: June 27, 2014, 06:36:06 pm »
You tried translating it, rather than just creating a new Vector3 each frame?

Like - http://pastebin.com/qEwreneX

7
Support / Re: Memory leaks on iOS
« on: June 27, 2014, 06:27:44 pm »
You might to take down that example, it appears to be bundling TK2D with it

8
Support / Re: Unreal 4?
« on: April 09, 2014, 08:16:48 pm »
Any update on this? I haven't tried UE yet, but I've been looking through loads of articles/videos and it does look very, very impressive. Plus we all know UE is much more polished (under the hood) than Unity.

I'm looking to try out UE next month, and the open sourcesness of UE is a huge plus. Like unikronsoftware said, if there's bugs, they can get fixed quicker! That means quicker released of TK2d, quicker bug fixes, and making TK2D better, quicker.  Remember how long we had to deal with the camera bug? It was months!

I'm all for an UE version, and I hope unikronsoftware decides this is a big, big deal. As I'm sure people will begin to migrate to UE from Unity.

9
Support / Re: Unreal 4?
« on: March 19, 2014, 10:39:49 pm »
Ohhhh! That'll be great. UE4 looks very interesting with their new pricing structure.

10
Contract Work / Re: [paid] Tilemap pathfinding
« on: March 13, 2014, 03:36:42 pm »
Just a follow up to this. I spent a lot of money on different a* solutions, and the best, by far, was http://arongranberg.com/astar/ .

There's a free version, but I opted for the pro versions ($100) as I'll be able to apply it to more situations (both 3d, and 2d).

The latest version of A* works with BoxCollider2D which is perfect! However, there's 1 downfall. When you create a tilemap with TK2D it create it's colliders using EdgeCollider2D. It uses EdgeCollider2D as it reduces the amount of PolygonCollider/BoxColliders needed. So basically you need to manually draw all the BoxCollider2D's for each 'solid' tile, then get the A* to generate a grid.

If your tilemaps have a consistent tilesize (32x32 64x64, etc) and each tile is either collidable, or not, then you can use my super handy UnityEditor plugin to automatically loop through your tilemap and place a BoxCollider2D in it's place.

https://github.com/kevdotbadger/BoxColliderGenerator

11
Releases / Re: 2D Toolkit 2.4 beta 3
« on: March 06, 2014, 12:57:13 pm »
Names for advanced colliders

So looking forward to using this. I didn't realise this release was going to come out so soon!

Great work as usual.

12
How about if kicks, jump kicks (jump, then kicks) are added to the mix?

13
Hello, I'm having problems manning multiple animations. Here's some pseudo code.

if( move left button ){
  play move left animation
}

if( move right button ){
  play move right animation
}

if( punch button ){
  play punch animation
}

if( kick button ){
  play kick animation
}

if( no buttons pressed ){
  play idle animation
}

Generally if no buttons are pressed I want to play a looping idle animation. However, if move right and move left buttons are pressed I want to play a looping moving animation. However, if I press the punch button I want to play the punch animation.

However, the punch animation isn't interruptible. So I can only punch once. Also if I hold the move right button, the move right animation should play, but if I hit punch that should happen, then revert to the right move animation.

I've tried to program all of this, but there's a lot of ifs and else that it's getting extremely messy for something that should be quite simple.

How would you do this? Are there any common patterns to follow?

14
Contract Work / Re: [paid] Tilemap pathfinding
« on: August 23, 2013, 12:22:39 pm »
-1 implies the tile has no collider.

However, I know the tilemap api/system has been recently updated, so the code might need updating. I'll take a look at it over the weekend and try to update it as soon as possible.

Do you have multiple layers? That could be the issue here.

15
Add-ons and Extensions / Re: 2D Platform Controller
« on: July 24, 2013, 04:53:36 pm »
I see that there's a sample scene made with tk2d. Could you export into a playable demo?

Pages: [1] 2 3