Author Topic: tiled sprite offset? and random tile?  (Read 1067 times)

Reflection

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
tiled sprite offset? and random tile?
« on: April 30, 2014, 08:14:17 AM »
Hi,

Two questions which hopefully someone will be able to help with...


1.

Is it possible to set a sprite to be tiled, and then offset it with separate horizontal and vertical values?

For example, say I have a diamond shape image with a transparent background...
To cover the sprite, I'd have to offset both horizontal and vertical values 50%

I know I could edit the image in Photoshop so that instead of a transparent background, it has the bottom left of the diamond in the top right corner etc.. but there will be other more complex shapes, so want to save time, and keep images sizes down.


2.

Any idea if it's possible to select multiple images and have it tile with random images from the selection?

For example, a brick wall with variations of brick.




Thanks,

Pete

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: tiled sprite offset? and random tile?
« Reply #1 on: April 30, 2014, 05:38:25 PM »
Some pics of what you're trying to do would help. I have a hard time understanding it from words.

Reflection

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: tiled sprite offset? and random tile?
« Reply #2 on: May 01, 2014, 05:38:36 AM »
Hi,

Thanks for your reply... I've attached some pics which will hopefully help.

(The actual graphics would be png's with a transparent background)


1. An image (diamond) which i'd set as a tiled sprite.

2. An image of how it would look if i set it as a tiled sprite.

3. An image of how i'd like to be able to offset the tile.

4. An option to randomize the tiled image from a selection (3 in this example).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: tiled sprite offset? and random tile?
« Reply #3 on: May 01, 2014, 07:40:28 AM »
No, there is no way to do this with NGUI. If you want that kind of tiling then simply create a tileable source texture that will look like you want it to.