Canvas or Array ?

Get help using Construct 2

Post » Sat May 11, 2013 10:08 pm

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 !
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sun May 12, 2013 6:37 am

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.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Megavolt, mnashwan, stylie1, Yahoo [Bot] and 19 guests