How do I create screen-by-screen system to reload sprites?

0 favourites
  • 7 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • Hi guys, I'm looking a best practice to create screen-by-screen system to reload sprites then set state their current values as persistent, then if they aren't on screen, destroy or disable sprites, then we are returned to old position, recreate sprites.

    It's a method is used for super nintendo games like super metroid when the enemies aren't on screen, their AI are disabled, probably destroyed, otherwise on screen again, reactivate enemies.

    Thanks!

  • Hi guys, I'm looking a best practice to create screen-by-screen system to reload sprites then set state their current values as persistent, then if they aren't on screen, destroy or disable sprites, then we are returned to old position, recreate sprites.

    It's a method is used for super nintendo games like super metroid when the enemies aren't on screen, their AI are disabled, probably destroyed, otherwise on screen again, reactivate enemies.

    Thanks!

    Mostly, what I do (exemple with one ennemi type, also It is more the theoric part, you might have to tweak it):

    -First if no instance of them exist deactivate the group containing the AI (you do this by having a "Compare two values : Sprite.Count = 0, disable group" inside the groups itself)., just below the group, add an Else and a subevent that tell "if ennemy is created, activate group"

    -Have a boolean "Activated".

    -You check if the ennemi is Active and not on screen, if it is not on screen, change the "Activated" boolean variable to False.

    -You check the on screen ennemies, if one of them has "Activated" to false, you set it to true

    -then if the value is true you do stuffs, if false, you can deactivzte behaviors and collisions.

    I think that will help beginning.

  • Aphrodite I had to do something like that. It can be considered good advices, but we need complete.

    In this scirra forum, no one could explain how to implement "culling" for "screen-by-screen"

  • If you're going for a metroidvania like SM then you just have to treat individual layouts as rooms and learn how to use the persist behavior & global objects. It's not that hard, really...just not a very good way of going about it. You don't really have a choice with C2 though.

  • That's not I mean to use the "persist" behavior for enemies, Imagine C2 editor in layout has more than 200 objects, then runtime would appear 20 objects using culling screen-by-screen.

    Actually, is that true we don't really have a choice?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Eh it sounds like something that would have to be built into C2. Here is how I handle metroidvanias (overview in the video description)

  • That's really nice!

    I was wondering how you did design the effect from room to room as layout by blue door.

    I've read youtube description, it seems no info about culling objects, I thought your original post comes a feature culling objects.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)