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
16
Add-ons and Extensions / Re: 2D Platform Controller
« on: July 24, 2013, 01:23:44 pm »
2 questions. Does this work with tilemaps? Also does it use tk2dCamera or a standard camera?

17
Contract Work / Re: [paid] Tilemap pathfinding
« on: July 05, 2013, 09:05:06 pm »
Obviously import simple A *, then create a script called PathFinder2DTileMap.cs and add the code in the link below.

All you need to do is set Toolkit2DTileMap to a tk2dTileMap object and it should do the rest (if you click "Draw Map In Editor", you'll see the red areas that aren't walkable, and green which are).

You can then use simple A *'s Pathfinding functions. Be warned, this script was created for a 32x32 tile, and simply selects tiles if they have a collider or not, so you might need to tweek it a lil.

http://pastiebin.com/51d7253305569

18
Contract Work / Re: [paid] Tilemap pathfinding
« on: July 05, 2013, 10:03:37 am »
I ended up editing simple a* to run my own method a create an array of nodes. I essentially looped over ever tile, if it had a collider mark it as unwalkable, if it doesn't mark it walkable. I then pumped that array into simple a* and let it run it's own pathfinding. It worked well for me. I had a map about 100x100 tiles, each tile being 32px X 32px. I had about 50 pathfinders running without a hitch. This was on i7 retina macbook pro.

I'll send the code across later when I get home from work.

19
Contract Work / Re: [paid] Tilemap pathfinding
« on: July 03, 2013, 11:37:10 pm »
I got it working with Simple A* (http://forum.unity3d.com/threads/164003-Released-BFGames-Simply-A*-Pathfinding!) if you're interested?

20
Yeah, after I posted this message I thought the best way would be to use getTileByPosition (or whatever the method is called), then loop it. I thought there might be an array holding all tiles and their position. I was hoping to be able to loop an array then check that tile.

21
Hello, does anyone know how to loop through a tilemap to find out if a tile has a collider or not?

24
Support / Re: What is an atlas?
« on: March 17, 2013, 05:30:32 pm »
All your seperate sprite textures are put onto a single texture (so Unity only needs to load 1 image, instead of many images). That texture is an atlas.

25
Contract Work / [paid] Tilemap pathfinding
« on: March 17, 2013, 03:53:53 pm »
Hello all.

I've been trying to implement pathfinding using 2dtk's tilemap system and I'm failing miserably. I've tried to write one myself (and failed) and I've tried to implement arongranberg 's aStar plugin (and failed). I'm getting frustrated, so if anyone would be interested in doing this for me, I'm sure we could come up with a fair price.

If you're interested, drop me a PM.

Just a couple of needs.

1) The package needs to scan through ALL layers and find collidable tiles.
2) Needs to be lightweight and quick
3) Needs to support quite large maps 512x512
4) Needs to support multiple tile sizes (32x32, 64x64, etc)
5) Only needs orth tiles (no need for iso tiles)
6) Ideally collision arrays need to be saved so they don't get created on runtime.

I think that's about it at the moment, again if you're interested drop me a PM.

26
Support / Re: Recently got 2D Toolkit, little lost
« on: March 14, 2013, 01:51:46 pm »
animationCompleteDelegate is used to define which method to run once an animation has been completed. In the linked example you can see that animationCompleteDelegate = HitCompleteDelegate and there's a method called HitCompleteDelegate().

As for animationCompleteDelegate = null, that's being set to null so that nothing gets called when the animation gets completed.

As for the FlipX() / FlipY(), you can just grab the scale of the sprite to determine which way it's current direction. By default the scale is (1,1,1), however when it's flipped on it's X (using FlipX()), the scale becomes (-1,1,1). (See http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1268.msg6074.html#msg6074).

As for the repeating sprite, that's being worked on. If you're a paid customer, the latest beta has this function (see http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1284.0.html).

27
Support / Re: tk2dcamera scale
« on: March 12, 2013, 09:35:37 pm »
What will be the differences between tk2dOrthoCamera and tk2dCamera?

28
Support / Re: Has anyone used astar pathfinding with tile map?
« on: March 12, 2013, 09:18:07 pm »
Just an update on this. I got it working!

I created a gameObject and wrote a script which takes a tk2dTileMap object and a AstarPath object and did something like this...

Code: [Select]
// Get the tilemaps' collider layers' mesh
Mesh mesh = mapData.Layers[1].GetChunk(0,0).colliderMesh;

// Create a new mesh graph
NavMeshGraph newMeshGroup = new NavMeshGraph();
newMeshGroup.sourceMesh = mesh;

// Add it
aStar.astarData.AddGraph( newMeshGroup );


29
Support / Re: tk2dcamera scale
« on: March 11, 2013, 05:15:23 pm »
the camera can be moved like a normal gameObject. I think it's default Z is -10, so move your sprites back so that they're not so close. As for the editor camera, why not zoom out? I use tk2dCamera all the time, and the editor is pretty much useless. You might as well switch to the "game view" then using the properties panel to move stuff around. At least that way you'll get a decent idea about whats going on.

30
Support / Has anyone used astar pathfinding with tile map?
« on: March 10, 2013, 03:59:02 pm »
I'm having trouble getting this working. The astar pathfinding unity plugin (http://www.arongranberg.com/astar/docs/index.php) the free version.

Has anyone used these together?

Pages: 1 [2] 3