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

Pages: [1]
1
Support / Re: Draw order with moving sprites
« on: September 07, 2012, 06:49:03 pm »
I had a similar requirement, I solved it pretty much the way unikron described.  In my case all my actor sprites are at -2 z, and I added a fractional component to the z based on y, so I didn't need a huge dynamic range for my colliders/triggers.

float newZ = -2.0f - ((playfieldHeight - newY) / 1000.0f);

this works for me with my range of Y values.

You do have to make sure that anything that repositions actors goes through your actor's "move" interfaces and don't change the transform directly.

2
Support / Re: tilemap partition size
« on: August 06, 2012, 07:37:24 pm »
Great :)  Thanks for the insight.  Something for the docs perhaps? (didn't see anything on this other than the bare bones interface in the script reference)

3
Support / Re: tilemap partition size
« on: August 06, 2012, 05:13:55 pm »
I see.  That makes sense.

So if your tilemap is smaller (like say 32x24) would a smaller partition size be more efficient or would it not really matter?

4
Support / tilemap partition size
« on: August 05, 2012, 11:23:38 pm »
I'm trying to figure out what this means exactly.  I thought it was the size of the tiles but that doesn't seem to be the case.  I figured if I got the width of the tilemap (which does seem to be in tile units) and multiplied it by partitionSizeX I'd get the width of the entire map in pixels (which is the unit I'm using for worldspace coords).  This doesn't seem to be the case.  My tiles in my little test program for exploring 2D toolkit are 64x64, but the partition sizes are 32x32.  If I try and change the partitionSize to 64x64 in the editor it just goes back to 32 (I checked the code and it looks like it definitely clamps it to the magic number 32).  Just wondering what it's supposed mean and what it's used for.

5
Support / Re: Tilemaps and tk2DCamera
« on: August 05, 2012, 12:40:08 am »
Glad I could help. :)

Sucks when you don't have a large QA department to point stuff out eh? ;)  We devs tend to get too close to what we are working on and miss what only a fresh set of eyes (like someone like me in this case, coming at the tool fresh) would see or run into issues with the workflow.

If other things pop up I'll post about it, or would you prefer email's for feedback?

6
Support / Re: Tilemaps and tk2DCamera
« on: August 04, 2012, 08:31:05 pm »
Could always track if the values have been manually set instead of automatically generated in that edge case (IMHO) throw up a dialog warning them what will happen, or give them an option to leave the values alone.  Just a thought.

7
Support / Re: Tilemaps and tk2DCamera
« on: August 04, 2012, 08:08:09 pm »
I did make the sprite collection first and set it to use tk2D camera first, however I figured out the order of things I need to do.  When I created the tilemap, I just went down the list of things in the editor that need to be changed, which isn't the order that the tilemap editor likes it seems.

By default it picked a different sprite collection that had different properties, not the one I wanted it to use.  I created the Tile Map Data, then the Editor Data, then finally set the sprite collection for my tile map.  That seems to be what caused it.  If I set the collection prior to creating the two data objects all worked well when I imported the TMX.

Perhaps changing the order that these options are displayed, or reseting the tiles sizes when the sprite collection gets changed would help others not fall into the same problem.  What do you think?

Keep up the good work!

8
Support / Re: Tilemaps and tk2DCamera
« on: August 04, 2012, 07:27:37 pm »
Ah ha!  That did it :)  Thanks for the prompt reply!  I knew buying into this toolkit was a good idea after seeing all the features and the great support you've been giving :)

Is this something that can be fixed so that I don't have to do that every time in a future release?

9
Support / Tilemaps and tk2DCamera
« on: August 04, 2012, 07:10:40 pm »
So I may have done something wrong here, since I'm both new to unity and 2d kit, but there seems to be a bug with tilemaps and a tk2DCamera.

Basically the tile map (which I did import from a TMX) came up way too small.  What's interesting is that if I set the sprite sheet for the tilemap to use the tk2DCamera the sprites themselves are the right size, but all jumbled together in one little spot.  If I set the sprite sheet to not use the tk2DCamera, the sprites are way to small, but if I zoom in on the tile map it looks like the map I expect.  It's just ridiculously tiny :).  Looks like the geometry for each quad is off in this use case.

  If I set the scale factor to something like 100 for X and Y and the sprite sheet doesn't use the tk2DCamera then it starts to look like something I can use, but guessing what scale factor to use just seems wrong ;)

This may end up being moot for me in the long run since I'm not sure I want to use tk2DCamera or not (I'm just exploring my options right now), but if I do want it, then I think tilemaps should behave like the sprites and be the right size :P

I can send my little test project if needed.

Pages: [1]