Decorating a Level...image Actors...best performance?

What would be the best way to decorate a level using lots of small images e.g. flowers grass etc performance wise?

Im currently just using Actors with moveable set to false.

Thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you don't need rules and you don't need them randomally scattered, you could use the Replicate behavior every so often to create duplicate images. Or you could just import a single image file the size of the scene and use it as a background.

    But I'm guessing you also need rules on those actors and therefore what you've mentioned is probably best.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • POMPOM Member Posts: 2,599
    edited February 2013
    What would be the best way to decorate a level using lots of small images e.g. flowers grass etc performance wise?

    Im currently just using Actors with moveable set to false.

    Thanks!
    I use this method a lot in my project, But I wouldn't recommend creating a new actor for every tree or grass, I suggest making 1 actor - non movable - call it "landscape" or whatever you want, and use the same actor, drag it to the scene and simply change its image and size to whatever you want, even a 100 instances of an actors like that will not hurt performance..

    On a side note, you can also use replicate like tatiang suggested, I use it too, but keep in mind that from my finding using replicate hurt performance, thats in my project, IT DOESNT MEAN IT WILL HAPPEN TO YOURS as well, its just happened to me in my game, I used tiles instead whenever I could.

    Cheers
    Roy.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    You could try tiling as well. Again, as POM said you only need 1 generic actor. And you can adjust the tile size settings for each unlocked actor.

    Not sure what the difference in performance will be compared to replicate though - you'd have to get confirmation from a GS dev for that.

    Tiling is a newer feature in GS so at a complete guess perhaps it is a more simple solution in terms of the underlying code?
  • ImpactBlueStudiosImpactBlueStudios Member Posts: 53
    Thanks guys ill stick with using an actor since u cant place images directly in the scene. Apart from setting moveable to false is there anything else that needs to be changed to ensure maximum performance?
  • RPRP Member Posts: 1,990
    If you have images in your background/s that don't move and are static with the background, create them/ create the scene in a graphic app, flatten it all in one layer. No need having many layers of background objects if you do not interact with them, or have the player go behind them (for layer fx).
  • ImpactBlueStudiosImpactBlueStudios Member Posts: 53
    Problem with that is my levels are at least 900x900 pixels, with over 20 levels and retina resolutions ill end up with huge images.
  • RPRP Member Posts: 1,990
    Considering current iPhone resolutions this should be no problem. You'll want to double the size of your graphics for retina displays (and divisible by 2).

    Just start building and test your game as you go. There are various things that can effect performance besides graphic assets. It's wise to use test files (alpha builds) to see how thing pan out, before implementing them in your actual project.
Sign In or Register to comment.