More scenes & less actors or one scene & more actors?

CapCap Member Posts: 225
edited November -1 in Working with GS (Mac)
Hello,

at the moment I'm planning a game with about 12 levels (landscape, no scrolling). The background image would always be different, and every level would have 80% the same actors, but 20% unique actors.
Now... should I have a different scene for every level? Or is it better to have only one scene and change the background image all the time, while hiding/showing the not used/used actors?
I guess the number of all actors would be around 50.

Thx.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Use a differnt scene for each level. Too many actors moving and such drop fps

    what u would want to do if u can is put your main menu and setttings and how to section and all that in one scene so theres no scene load when you go from instructions back to main menu or something
  • MotherHooseMotherHoose Member Posts: 2,456
    agree with John ... if a lot of activity... then separate scenes

    and for programming separate scenes are easier to manage

    but if the actors are static.. i.e. they may be placed on different coordinates in each level but they are not moving in level unless by user input... then one scene is less system intense...

    my Art in the Louvre is all one scene... from Logo to Credits...

    you can use a gameAttribute levelIndex to track what player is Level on and the actors position for that level
    EX: Rule when levelIndex = # ... changeAttribute self.Position.X To: whatever

    Try it both ways with about 5 levels (5 bg Images) and 20 square Actors (different colors) and check in Viewer the fps for each method.

    MH
  • StusAppsStusApps Member, PRO Posts: 1,352
    Depending on how many actors and how many rules they are going to have then using one scene could be a benefit to you. GS does not release memory always correctly between scenes and by using one scene you will have zero loading times after the initial load. Seeing as how you are reusing 80% of your actors then actually using one scene would be much less memory intensive as the actors can be moved to each new scene and recycled. Of course doing this needs a lot more planning and work, but could be better.
  • CapCap Member Posts: 225
    Some more infos: at the moment I have only two constrain behaviours and not a single spawn behaviour. So I really try to use actor recycling. But I really do have a lot of instances of a single actor that is really rule heavy.
    At the moment I think using one scene may be better, but I don't know what happens if GS needs to load 12 different background images and stuff like that at one go.
  • StusAppsStusApps Member, PRO Posts: 1,352
    My last game had 8 full background images in one scene and managed ok (where possible I made them about 75% size and stretched out, quality looked ok for cartoony images).

    image
  • MotherHooseMotherHoose Member Posts: 2,456
    for background use 1 place holder actor... that is display size...
    you could put the image for the title in it... or use a transparent image.

    as you want/need you changeImage of that actor... the pix are already in memory as part of your application's images.

    MH
Sign In or Register to comment.