What makes the game run faster?

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • I'm making a visual novel and I'm at a crossroad on how to set up the layouts and sprite objects.

    Right now I have, for example, 1 sprite named "background" and multiple layouts for each room, each having the background_sprite object placed out. When you go to a new layout/room, the background_sprite just switch to the frame for that room. It's the same for all my assets with similar functions. 1 door, 1 left_character, 1 right_character, 1 UI_Button, etc. All determined with instance and global variables.

    Now, does that mean that the game has to load every frame of every sprite that exist in the layout? Would it be faster for the game if I split up frames into individual sprites that only exist in the the layout in which they are needed?

    Or is it the opposite? Would compressing it even more be what's faster? (Have 1 layout with everything in it, with as few objects as possible)

    Maybe using the Create/Delete object is fastest? 1 layout and then just create objects when needed and the delete them after.

    What makes the game run the fastest?

    Thank you for any help! :)

    Tagged:

  • Now, does that mean that the game has to load every frame of every sprite that exist in the layout? Would it be faster for the game if I split up frames into individual sprites that only exist in the the layout in which they are needed?

    Yes to both questions. If you have a sprite with 10 large frames, but only using 1 frame on each layout, then the remaining 9 frames will be wasting memory.

    You can experiment by running the project in Debug Mode and comparing memory usage by images. Of course, you should only start optimizing if there is an actual problem - if the images are using a lot of extra memory (hundreds of MB or more), or if you are making a game for web where loading time is important.

    Compressing image files (say, by using lossy format) will make the loading faster. Reducing their resolution will save memory.

  • What makes the game run the fastest?

    Thank you for any help! :)

    For a genre as undemanding as the visual novel, everything should work quickly, and only gross errors can get in your way.

    There aren't hundreds of physics polygons or thousands of collision polygons here.

    If you have backgrounds larger than 1920*1080 it is better to keep the backgrounds with different sprites. That it did not turn out that you loaded one background, but in the memory sits a lot of frames with other backgrounds that are not needed in this scene.

    You can make two scenes for an example and show us the project file, we will help optimize.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you guys for the help! I think that what I really needed to understand was the rules of loadouts. Hearing you guys explain that made the answer to what is most optimal pretty obvious. I guess compromising on some aspect are okay in my case since it's a VN, but I just really hate building on something that I know has a scuffed foundation so I appreciate this a lot.

    I will split things up more and lean over to the family functions. This helped me with some other decisions as well actually... Thank you! ^^

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