NULL texture vs no texture

bazookaBenbazookaBen Member Posts: 318
edited March 2012 in Working with GS (Mac)
i was reading abt optimization

which one is faster?

1. create a null texture (transparent image) of 2x2, add it to the actor. Then add change image behavior to the actor when it loads.

2. don't create any null texture. Actor doesn't have an image. But we add change image behavior to it when it loads.

Answers

  • bazookaBenbazookaBen Member Posts: 318
    edited March 2012
    @tshirtbooth if pre-load image handles this well, what's the point of null textures?
    http://arcade.gamesalad.com/blog/2011/10/05/gamesalad-best-practices-asset-pre-loader/

    also, let's say i have a simple scene, with 10 actors. all without pre-load. I noticed the load time is always around 1 second. how do i shave this off more?
  • MotherHooseMotherHoose Member Posts: 2,456
    optimize your images: ImageAlpha and ImageOptim

    use the null image … (still seems to make things faster for me)
    add 1st behavior on the actors:
    changeAttribute: self.Image To: imageName

    changeImage behaviors … load image during sceneLoad
    changeAttribute self.Image does not load the image during sceneLoad

    and, of course, as @Tshirtbooth tells you … check your # of rules
    nest them and/or combine … try using Otherwise: conditions

    image MH
Sign In or Register to comment.