Canvas or Array ?

  • I would like to address this question to all the experienced users with the canvas plugin and the creator of the plugin R0J0hound

    So ... I heard that the plugin could scan every pixel in it , If this is true then I would like to see the performance difference between cycling thru an array and cycling thru the canvas , the 2 should be 1280x720 or any other multiples of that resolution , equal or bigger than 320X240 (3:2)

    In General ;

    Looping thru the array gives me some bad results (10 fps) and I'm trying to find a way to edit every value of a given database without some bad performance shutdown

    Imagine this ;

    XXXX    0000

    XXXX to 0000 --> but at a bigger scale (320X240 or 1280X960)

    XXXX    0000

    If possible , I would be delighted to have an example of your method

    Why I ask ?

    I'm trying to make a small prototype where I can edit the database and invert all it's components

    Example

    Base: ---> Edited: ---> Inverted:

    000        010          101

    Cheers and thanks for reading !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It will be faster to loop through values in an array. And to be even faster don't invert the whole database. Just invert the values as you retrieve them.

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