Does it slowdown performance?

0 favourites
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • I don't feel good creating a topic for those noob questions, but lets go.

    I'm creating a game in which each level is on a separate layer.

    Level 1 - Layer 1.

    Level 2 - Layer 2 .. and so on.

    All layers are invisible, except the one the player is playing.

    If I have like 100 levels, and level 88 is full of objects movind and shooting and jumping etc... Does it affect the performance when the player isn't on this level ?

    1-Do I get better performance, If after each level, I completely delete everything on the past layer (level) ? Or just setting invisible does the thing ?

    2-If my level 88 is full of objects but I just start playing their actions when its actually level 88, is it better than let they playing since level 1 startup?

    3-Should I create all the instances while on editor, or is it better to do - "Spawn object over point(x,y)" when each level starts ? And for that way I need to save the position for each object I want to create...

    I'm just afraid of lagging my game, by using many layers. The Final question would be: Does invisible layers waste processing or only when it's visible(drawing) ?

    Thats it, thx.

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • My question is: why can't your break things up into different layouts?

    For performance it depends on many factors.

  • hmmm interesting, Its dependant on every game i guess.

    But with ym experience in construct it shouldn't affect performance too much.

    Just a little lag in the beginning where its loading the objects.

         --> But you could allways do something like this:

            - On start of layout

                 -> Set loading sprite visible(true)

            - If(FPS <= 20)

                 -> Set loading sprite visible(false)

    That way users wont see the lag in the beginning.

  • Oh and, I'm using Firefox 9.0.1 and When on preview mode, it has a lag issue.

    Every 5 seconds it lags..

    It's seems to be a browser problem, dont know.

  • But you should really consider separate layouts for each level, but use the same event sheet. It will not lag, and its easier to edit.

    Why are you doing it the layers way?

  • My question is: why can't your break things up into different layouts?

    For performance it depends on many factors.

    <img src="smileys/smiley9.gif" border="0" align="middle" />

    Layouts..... I didn't know I could create more of them <img src="smileys/smiley9.gif" border="0" align="middle" />

    Lol

    I just bought Construct 2 because of Layer limitations...

    So I could have done this with Layouts... <img src="smileys/smiley7.gif" border="0" align="middle" />

    Layers isn't lagging at all.. I'm just wondering, that it might lag on future.

    Anyway, using layouts would be less recursive. I'm doing : End of Level, Go to Layer Level+1.

    I'm finishing level 10 right now. Maybe I could use a Layout for each 10 Levels, that wouldn't be that bad :p

    But still didn't get it. When going to another Layout does the other Layout unload ? Layouts are just loaded when we go to them ?

    And with layouts I can't find the action "Go to Layout Level". I would have to create a individual "Go to Layout N" for each level.

  • Ask this to developpers

    i think that it would be easy to change this

    ...

    But for now continue like that

  • SplashHunt: you should check out the manual, read about C2's interface and check out the system epressions very useful with how events work.

    'm just wondering, that it might lag on future.

    Performances should be fine, as long as you don't spawn 10 000 sprites on the screen.

    For the chopyness in FF, make sure in your C2 project's settings that webGL is turned to on and that your graphic card drivers are up to date.

    FF 9 as been the fluidest of all the versions so far to me. And FF 10 arrives by the end of january.

  • If you have a separate event sheet called vars and make a global variable called Level(Note, you can have the variable on any event sheet, Its just tidy to have some variables on a separate one, As there global any event sheet can access them)

    Then on the Event sheet for the level/game, for example level1:

    Depending on your set up for leveling do something like this:

    Player.OnCollision with (EndFlag)

         -> System.addTo(Level, 1) // Adding one to the level count

         -> System.GotoLayoutByName("Level"&Level) // Here were refencing the level variable, So if the level is 7 were basically saying "Level"&Level(7)

    Do you understand? or do you need me to knockup a example?

    If you share your capx, or PM it to me, I'll add it to your game for you, Or i can make a example to show you.

  • If you have a separate event sheet called vars and make a global variable called Level(Note, you can have the variable on any event sheet, Its just tidy to have some variables on a separate one, As there global any event sheet can access them)

    Then on the Event sheet for the level/game, for example level1:

    Depending on your set up for leveling do something like this:

    Player.OnCollision with (EndFlag)

         -> System.addTo(Level, 1) // Adding one to the level count

         -> System.GotoLayoutByName("Level"&Level) // Here were refencing the level variable, So if the level is 7 were basically saying "Level"&Level(7)

    Do you understand? or do you need me to knockup a example?

    If you share your capx, or PM it to me, I'll add it to your game for you, Or i can make a example to show you.

    Yeah I got it, just haven't seem that option.

    Bah. So I didn't had to buy C2 for now. As my project has only 35 events, and it's very simple. I could do 100 Levels and it would be less than 100 events.

    Now I don't know what to do. Keep doing on layers or transfering everything to separate layouts. Layout would be better to use layers for things that I'm using ZOrder.

    The game is quite simple, take a look:

    goo.gl/Rq13L

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Completed the game ;D!!!

    By the way i found a bug, its on every level i think.

    If you move the mouse really fast, the collision does not count on the red boundaries.

    If thats using layers then it seems to work fine.

    Its more convenient to use layout though, And as you dont have too many levels just yet i suggest transferring what you do have into layouts. Just in case you encounter any problems later on.

  • Yeah, and it's not that hard to transfer.

    And yes, this is some kind of bug.But it just works when playing with iPhone. Because on iPhone it runs slower, and if you move your finger fast, the ball will move to the finger position(jumping everything).

    My PC is faster and then it checks the ball position better.

    Your PC is slow or your mouse is really fast.Dont know how you did it.

    The only way to prevent this, is setting invisible "checkpoints" along the path.But For now I'm focused on ending the 10th level and rearraging this to layouts.

  • Yeah im on my Crappy PC right now.

    I'll play it on my laptop later(i5, 4GB of ram) so its pretty decent.

    I do all my art on this piece of crap, Its easier to operate than the laptop(Don't Have a graphics tablet)

    I'll also give it a go on my IPhone if you want :)

  • If you go iPhone, tell me how is the speed...

    I've updated to iOS 5.0.1

    It speeded up a little bit,but is way slower than PC.

    The trail effect gets messed up.

    EDIT: Even using copy & paste, it's not that easy to make it work. Don't know why, but the trail isn't working on the new layout. Must be some event problem.

    I'm thinking of letting the game with those multiple layers and only this layout. Transferring is causing many things to not work =/

  • What else is not working?

    How are you making the trail?

    ect explain in detail, Upload your capx, or print screen the code. It makes it easier to help you.

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