CPU : CloneObject VS CopyPaste

  • Hello

    I would like to create many buttons using "sprite font" with a unique font. It would be more handy if i can create new object each time so i can name every object.

    But I wonder if this would be more CPU intensive than just copy / paste. Somebody got information about that ?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would not be more cpu intensive.

    It would use more memory than just using instances.

    Keep in mind all instances share the same texture.

  • And the needed code will multiply out of control.

    Just give them a instance variable ... text .. 'name' .. and name them in the layout editor. (without " "'s)

    Then just use

    Sprite font > Compare Instance Variable > 'name' = whatever you named it between " ".

    Now that sprite font is picked, and actions run on that sprite font.

  • depends on how many buttons is "many" if its a large amount of anything(>500) it can get pretty cpu intensive or hard(RAM/HDD - reading and writting) usage going upper! however it wont make a difference for today's PC's. I cant say about mobile apps, depends what is your target as a device there, but if you plan a universal app for as many mobile platforms as possible... you wold need to keep things S&S and just create the illusion of many buttons! i always use sprites object as buttons, i know needs more download memory and ram ... but once its loaded any device can use it without much effort!

  • Ok so I finally used instances

    Thank you

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