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

Pages: 1 ... 3 4 [5]
61
Support / Re: Using Tilemap Editor for Top Down RPG
« on: June 30, 2013, 12:34:24 am »
Hmm that's pretty much what I said I am already doing (lots of foreground sprites with a script that maps their y->z on startup).

I was thinking that painting them on a layer would be a lot easier to manage than masses of gameobjects, and 'simply' having each mesh row on that layer offset it's Z when built would give the same result. Like the existing Z separation for layers, but for each row within a layer.

Could you point me to the right place to make a change like that, or is it totally unfeasible?

62
Support / Re: Using Tilemap Editor for Top Down RPG
« on: June 29, 2013, 05:24:13 am »
This thread is slightly old but since it's relevant to what I am doing I thought I'd post comments here rather than start a new one. I'm also attempting an angled top-down game with a camera view much like an old jrpg, Phantasy Star IV for example:


In point 2, I think Sundaerae is trying to deal with sorting by having a layer for each row. By setting each row of tiles at a different height your characters can pass in front/behind tiles that overlap other tiles (like trees) easily, if the characters Z are also based on their Y position.

I'm trying to do something similar - have a layer for flat terrain and on top of that a layer for props and structures that moving objects like characters should be able to pass behind and in front of. At the moment I am using freely placed sprites for these structures, and a script on each that sets their Z value based on the Y position.

However, it's somewhat unwieldy compared to just painting tilemaps so I was wondering if there is another way ... is there another method you can think of, or perhaps a place in the mesh gen code where I can add an offset to the Z position on a row-by-row basis for a particular layer?

Another question: accessing layers through code - I see that layers are int based, but in the UI the layers all have string identifiers. Is there a way to tell which layer is 0,1,2 etc if I have given them all readable names, and no longer have numbers there? Are they numbered by their order in the inspector maybe?

edit: Ok I see the layer number can be inferred from the tk2dTileMapData asset, by the ordering of the array in the inspector.

63
Support / Re: Tilemap sprite doesn't display when prefab is attached
« on: June 26, 2013, 02:08:21 pm »
Heh excellent, thanks. :)

64
Support / Re: Tilemap sprite doesn't display when prefab is attached
« on: June 26, 2013, 01:58:16 pm »
Cheers, so I just call Build() on the tilemap after I've made my changes? Nothing layer-specific? Would it be better maintaining a second tilemap rather than a layer since layer 0 won't be changing?

65
Support / Re: Tilemap sprite doesn't display when prefab is attached
« on: June 26, 2013, 01:45:32 pm »
I was thinking ease of prototyping rather than efficiency, so was just going to use Easytouch to return the object you tap on. :)

But yeah probably best to do it properly - I can get the world position from the Easytouch screen point via a plane raycast as you suggest. So that gives me the XY of the tile and the type of tile.

For highlighting tiles (showing pathing/attack ranges) - I am thinking another layer above the tiles I have, I can use the same XY and use SetTile on this layer to swap between showing/hiding various overlays. Sound a reasonable method?

66
Support / Re: Tilemap sprite doesn't display when prefab is attached
« on: June 26, 2013, 11:06:11 am »
At the moment I am testing for a tile-based tactics game. I have a set of ground tiles (painted with the tilemap editor) and want each tile to be it's own object with it's own box collide and script (but have the visuals that I painted combined into a single mesh), the aim being to easily pick individual tile objects with touch and send messages to them for highlighting etc.

67
Support / Re: Tilemap sprite doesn't display when prefab is attached
« on: June 26, 2013, 10:30:18 am »
Is there any other way to achieve this and still have the sprites combined into a single mesh?

I am basically looking to spawn individual collide boxes for each tile (the prefab attach system is awesome) but want the sprite visuals to stick around and be combined into a single mesh.

68
Support / Re: Farseer support?
« on: June 22, 2013, 06:59:42 am »
You're right. I did up a not-very-scientific test for my iPad based on large numbers of interacting physics boxes and seeing how many could spawn before the frame rate died, and Physx smoked Farseer 3:1. On desktop Physx wins out 2:1.

69
Excellent, thanks again. All good now.

My problem with the layers came down to it working backwards to how I expected. I was trying to shift background layers along +Z away from the camera by typing in positive numbers. But it actually works by shifting foreground layers along -Z towards the camera by typing in positive numbers. Now I know.

I grabbed the beta from the pre-release forum and will take it for a spin, cheers.

70
Support / Re: Farseer support?
« on: June 21, 2013, 11:24:46 am »
Oh no, I had no idea the mobile performance was bad. I haven't personally tried it outside of desktop builds.

71
Support / Farseer support?
« on: June 21, 2013, 02:24:23 am »
I read that at one point Farseer integration was planned for 2d toolkit. Is this still in the pipeline?

72
Thanks for that, I bought the software and have had a bit of a play now. I do have some follow up questions:

1. In the sprite collection I set target height and ortho size - what should the ortho size be if I am not using ortho camera? 1? Irrelevant?
2. Where/how do I actually set the scale value for tilemaps?
3. In the tutorial interface pictures under Tile Properties there is a 'Layer Offset' parameter that doesn't seem to exist in the version I have. Is that coming back, or is there a workaround for setting layer separation?

Thanks again, looks to be a quality product.

edit: Regarding #3, I see the tileMapData asset has a "Z" parameter for each layer, but changing it doesn't seem to do anything.

73
Hi, continuing on here from the Unity forums as requested:

Quote
There isn't an equivalent of the 1:1 function, but it really is quite easy to work out what the scale should be. Post on the support forum (www.unikronsoftware.com/2dtoolkit/forum) and I'll be happy to help - it'll likely just get lost in this thread. You can work out exactly what the scale should be to be pixel perfect at a set distance.

So if you could assist and inform me how to go about setting a tilemap to be pixel perfect in perspective that would be great, thanks. :)

Pages: 1 ... 3 4 [5]