Hello Guest

Author Topic: Rendering Sprite within A box  (Read 3994 times)

vkerkez

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Rendering Sprite within A box
« on: September 29, 2013, 05:51:08 am »
Hello All,

I am working on something that is driving me crazy. I have a sprite that is 140 wide and 100 tall. I would like to add another sprite or 2 on top of it but within is bounds. Ex: if my object is is 120 tall only 100 will show. I understand there is a clipped sprite however I am looking to animate a large texture 500x500 within my 140 by 100 viewport.  What would be the best way to achieve something like this?

thanks

vkerkez

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Rendering Sprite within A box
« Reply #1 on: September 29, 2013, 06:03:26 am »
Here is an example im trying to do:

http://shokzsc.com/2011/08/

Instead of a circular area it will be a square, I will have a background and move a foggy texture in repeat over it.

Is this possible? Thank you so much for your help.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rendering Sprite within A box
« Reply #2 on: September 29, 2013, 04:45:06 pm »
You can code it yourself by moving a few clipped sprites around, but it might just be easier to do it with a shader, especially if you want to do the overlaid cloud effect as well. That way, you can simply use a clipped sprite and only have to worry about the effect itself.

vkerkez

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Rendering Sprite within A box
« Reply #3 on: October 08, 2013, 05:52:11 pm »
I will try this.  Thank you for your help.