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

Pages: [1]
1
Support / Re: alignment in tk2d UI?
« on: July 20, 2014, 08:18:36 pm »
Can you go into more details on your first paragraph? I'm not quite following. What does your usual object hierarchy look like? How does that help you center objects?

2
Support / alignment in tk2d UI?
« on: July 18, 2014, 08:10:38 pm »
I'm trying to make some production-quality UI with tk2d and struggling a bit.

I like the anchoring of the layout containers very much, but I'm struggling to do simple stuff like centering and aligning element.

For instance, I have a large panel, with a background sliced sprite. Inside that panel is a button, with a UI item at the top level. With the UI item, the button's anchor is in the top right:

https://www.dropbox.com/s/c78x2in3pfbck8d/Screenshot%202014-07-18%2020.08.55.png

I want this button to be central to the containing panel. Because of where the anchor is, I can't just child the button to the panel and set the X value to 0. I have to just do it by hand.

I'm not expecting Keynote-levels of alignment snapping, but is there some way for me to line this up reliably? Am I missing something?

Cheers.

3
Support / Re: Best practices for large scrolling terrain?
« on: October 22, 2013, 11:26:59 pm »
So I got pretty far using a scriptable static batcher: http://www.2dtoolkit.com/docs/latest/advanced/scripting_static_sprite_batcher.html

There's a hard limit of 128x128 on these. Via twitter Unikron told me to aim for ~20x20 batches for best performance, but ofc YMMV, always profile this type of partitioning.

4
Support / Re: Best practices for large scrolling terrain?
« on: October 22, 2013, 07:14:01 pm »
I think a corollary question then is, how do you manage rendering large dynamic or procedural worlds in tk2d? A gameobject per on-screen tile with a custom back end managing the current sprites seems like it's not going to batch well, especially with a smooth-scrolling camera.

5
Support / Best practices for large scrolling terrain?
« on: October 22, 2013, 06:50:00 pm »
Hi folks,

If you wanted to develop a top-down RPG, like Zelda or Realm of the Mad God, with tk2d, what would be the best approach to rendering terrain?



I'd like to use the tilemap editor to place a few items of interest in a sparse world, and leave large gaps. These gaps would be filled in at game start with one of a selection of grass sprites. Obviously the whole terrain could then be statically batched. Instantiating a prefab for each empty tile in the world is unfeasible. Even one per tile on the screen, and then scrolling as the camera moves, is too much with a sufficiently zoomed-out camera! At a lower level, I could just decide on sprites at draw time and batch them appropriately, but this is Unity and I'm not allowed to do that. :)

Any help much appreciated.

Pages: [1]