Cross project felexability !

0 favourites
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • - Layers do affect performance. They affect it a lot.

    Create a new project and run in debug mode. Don't add anything to the scene: no events, sprites, or anything. Note FPS and general CPU usage.

    Now add 15 layers with no effects or anything: 15 simple default layers. Now run the debugger. For a real performance "Kick in the groin" try adding an event to rotate the layout every tick.

    TLDR - Blank layers, without any FX, special blend modes, or objects, decrease performance markedly. Start doing things with those layers and the performance decline is sharp. The tests are easily created and I have made many of them.

    Regardless of what you do with a layer, there is a performance overhead. I don't know why the engine works like this, but something is being done to those layers or calculated every tick that slows things down.

  • codah - that is a good workaround! ... I general I have tried to stray away from global constants as they can quickly bloat the editor with a lot of stuff. To keeps things organized I create holder objects for variables. I would probably create an object called Function strorage or something. I have alot of objects whose sole purpose is to aid in organization.

    example:

    Player_Physics (is the actual collision object with the physics behavior)

    Player_State (tracks the players states such as in air, on ground, etc)

    Player_Abilities (tracks the players upgrades and potential upgrades, like fireflower or star power in mario)

    Player_Constants (a storage for unchanging variables such as walk speed, run speed, etc

    Player_CurrentStats (a storage container for tracking variables such as current max speed, jump pwer etc)

    Player_IsSwimming_collider

    Player_inventory

    Player_expandedMath (such as old position, vector maths, and so on - provides a way of knowing projection vectors and velocities in a direction other than x,y)

    Global_PhysicsConstants

    Global_currentPhysics

    Global_GameManager

    Level_State

    ...and on and on the list goes. Storing all those things as an event variable would be cumbersome to deal with. Keeping them all in one object, like all the player stuff in player would be a hassle too. Plus the player as well as many other in game objects are much more than one collision box.

  • - Layers do affect performance. They affect it a lot.

    Create a new project and run in debug mode. Don't add anything to the scene: no events, sprites, or anything. Note FPS and general CPU usage.

    Now add 15 layers with no effects or anything: 15 simple default layers. Now run the debugger. For a real performance "Kick in the groin" try adding an event to rotate the layout every tick.

    I made 30 layer and a For loop to add +1 degree constantly, and I see no difference in fps or cpu

    Bare in mind that debugger itself is taking a lot of your power because it need to display all available informations of your entire project in real time.

    Instead of debugging in "Inspect" tab try using "Watch" or "Profile" tab.

  • shinkan - HOLY FLIPPING Barbequed PANCAKES!!! YOU ARE right! I have been lamenting over that and struggling in the debugger for a while. Thanks for pointing that out.

    do you know if you can control max fps? Most of the time my laptop caps at 40fps but for a while it was 60 off and on?

  • codah - that is a good workaround! ... I general I have tried to stray away from global constants as they can quickly bloat the editor with a lot of stuff. To keeps things organized I create holder objects for variables. I would probably create an object called Function strorage or something. I have alot of objects whose sole purpose is to aid in organization.

    example:

    Player_Physics (is the actual collision object with the physics behavior)

    Player_State (tracks the players states such as in air, on ground, etc)

    Player_Abilities (tracks the players upgrades and potential upgrades, like fireflower or star power in mario)

    Player_Constants (a storage for unchanging variables such as walk speed, run speed, etc

    Player_CurrentStats (a storage container for tracking variables such as current max speed, jump pwer etc)

    Player_IsSwimming_collider

    Player_inventory

    Player_expandedMath (such as old position, vector maths, and so on - provides a way of knowing projection vectors and velocities in a direction other than x,y)

    Global_PhysicsConstants

    Global_currentPhysics

    Global_GameManager

    Level_State

    ...and on and on the list goes. Storing all those things as an event variable would be cumbersome to deal with. Keeping them all in one object, like all the player stuff in player would be a hassle too. Plus the player as well as many other in game objects are much more than one collision box.

    You can have local constants and variables in groups for some particular use that will not be listed outside of their scope, that can help a lot in bigger projects.

    I also prefer to have my global variables inside their own event sheet(s), you do not even have to include the event sheet where your variables are declared for it to work, so you have a list of variable and constant you can simply read and edit.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I also prefer to have my global variables inside their own event sheet(s), you do not even have to include the event sheet where your variables are declared for it to work, so you have a list of variable and constant you can simply read and edit.

    yea Aphrodite I was going to suggest that to Ruskul as well. Would also be nice to be able to 'fold' the globals, or put them in a Group, then you could even keep them in your event sheet. Currently if you put them in a Group they become locals.

  • shinkan - HOLY FLIPPING Barbequed PANCAKES!!! YOU ARE right! I have been lamenting over that and struggling in the debugger for a while. Thanks for pointing that out.

    do you know if you can control max fps? Most of the time my laptop caps at 40fps but for a while it was 60 off and on?

    Glad that is sorted for you. You can use heaps of layers to organize your project, as long as there's no effects attached to them, its all good.

    There's no way to cap FPS that I know of.

    The refresh rate normally stabilize at 60, 45, 30 etc depending on your hardware.

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