Hey, let's make it more exciting, not less. Here are my performance tips, and the patch. What do you think?
(these tips are on the patch too, and are easier to figure on the right context)
- Use Begin and End coordinates too, not just Move. Tapping the device once doesn't give you the M event.
- Don't use line or other ways to create more drawing than is neccessary. With enough heavy drawing version 1.1 will make such slide effect for you, unless you prevent it with speedlim.
- Separate screen refresh from drawing commands, and speedlim the refresh.
- speedlim the individual controls too, this makes a better multitouch experience.
- Create images to their intended size.
- Use a computer-to-computer network when concerned about lag. Going through a base station 10 meters away adds a noticable delay.
And, in 1.1 the touch events are prioritized over drawing, which improves the response.
best,
j
max v2;
#N vpatcher 200 44 1009 773;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 389 213 13 196617;
#P window linecount 1;
#P comment 410 215 249 196617 5. Create images to their intended size.;
#P message 246 678 309 196617 image http://pinktwins.com/fantastick/3sl1tr2_320x480.jpg \, @;
#P window linecount 0;
#P message 389 188 13 196617;
#P window linecount 2;
#P comment 410 184 249 196617 4. speedlim the individual controls too \, this makes a better multitouch experience.;
#P window linecount 1;
#P newex 90 466 64 196617 speedlim 50;
#P newex 283 466 64 196617 speedlim 50;
#P newex 476 465 64 196617 speedlim 50;
#P newex 50 263 40 196617 t l l l;
#P window linecount 3;
#P comment 410 242 249 196617 6. Use a computer-to-computer network when concerned about lag. Going through a base station 10 meters away adds a noticable delay.;
#P window linecount 0;
#P message 388 156 13 196617;
#P window linecount 2;
#P comment 410 152 249 196617 3. Separate screen refresh from drawing commands \, and speedlim the refresh.;
#P window linecount 0;
#P message 388 110 13 196617;
#P window linecount 4;
#P comment 410 95 249 196617 2. Don't use line or other ways to create more drawing than is neccessary. With enough heavy drawing version 1.1 will make such slide effect for you \, unless you prevent it with speedlim.;
#P window linecount 0;
#P message 388 68 13 196617;
#P window linecount 1;
#P newex 154 572 70 196617 speedlim 100;
#P message 154 552 16 196617 @;
#P newex 154 530 45 196617 route @;
#P newex 155 196 83 196617 prepend address;
#P newex 155 173 46 196617 route IP;
#P comment 497 632 100 196617 3/ set sliders color;
#B frgb 0 4 232;
#P message 495 615 72 196617 color 255 0 0;
#P comment 201 621 173 196617 of course set your ip address here;
#B frgb 9 70 255;
#P message 414 573 84 196617 clearimagecache;
#P message 414 546 79 196617 clearimages \, @;
#P comment 528 564 100 196617 2/ set image's size;
#B frgb 0 4 232;
#P message 526 582 157 196617 set 3sl1tr2.jpg size 321 484 \, @;
#P message 112 642 210 196617 image http://kasper.free.fr/3sl1tr2.jpg \, @;
#P message 7 564 48 196617 clear \, @;
#P number 476 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 476 315 162 196617 if $i2 > 214 & $i2 < 310 then $i1;
#P newex 552 469 40 196617 line;
#P message 552 451 37 196617 \$1 22;
#P message 501 496 212 196617 clear 6 212 310 310 \, rect 6 212 \$1 306 \, @;
#P user multiSlider 476 354 45 99 10. 310. 1 2921 47 0 0 2 0 0 0;
#M frgb 255 14 9;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P number 283 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 283 315 162 196617 if $i2 > 107 & $i2 < 208 then $i1;
#P newex 367 462 40 196617 line;
#P message 367 444 37 196617 \$1 22;
#P message 283 496 212 196617 clear 6 109 310 204 \, rect 6 109 \$1 204 \, @;
#P user multiSlider 283 354 45 99 10. 310. 1 2921 47 0 0 2 0 0 0;
#M frgb 255 14 9;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P number 90 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 90 315 150 196617 if $i2 > 6 & $i2 < 101 then $i1;
#P newex 177 470 40 196617 line;
#P message 177 452 37 196617 \$1 22;
#P message 90 496 188 196617 clear 6 6 310 101 \, rect 6 6 \$1 101 \, @;
#P user multiSlider 90 354 45 99 10. 310. 1 2921 47 0 0 2 0 0 0;
#M frgb 255 14 9;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 50 137 62 196617 route B M E;
#P toggle 216 51 15 0;
#P newex 216 89 29 196617 gate;
#P newex 215 115 32 196617 print;
#P newex 38 533 74 196617 r toFantaStick;
#P newex 102 604 267 196617 mxj net.udp.send @address 169.254.230.25 @port 6662;
#P newex 50 36 144 196617 mxj net.udp.recv @port 6661;
#P comment 110 661 100 196617 1/ go get the image;
#B frgb 9 70 255;
#P window linecount 2;
#P comment 210 164 100 196617 FS sends its IP on launch \, use that.;
#P comment 410 63 249 196617 1. Use Begin and End coordinates too \, not just Move. Tapping the device once doesn't give you the M event.;
#P window linecount 1;
#P comment 410 29 100 196617 Performance tips:;
#P window linecount 4;
#P comment 98 247 100 196617 Send both numbers as list \, otherwise max can mess them up.;
#P connect 5 0 11 0;
#P connect 44 0 11 0;
#P connect 11 2 50 0;
#P connect 11 1 50 0;
#P connect 11 0 50 0;
#P connect 50 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 12 0;
#P connect 12 0 53 0;
#P connect 53 0 13 0;
#P connect 15 0 13 0;
#P connect 41 1 6 0;
#P connect 43 0 6 0;
#P connect 40 0 6 0;
#P connect 37 0 6 0;
#P connect 7 0 6 0;
#P connect 30 0 6 0;
#P connect 31 0 6 0;
#P connect 34 0 6 0;
#P connect 35 0 6 0;
#P connect 56 0 6 0;
#P connect 25 0 41 0;
#P connect 19 0 41 0;
#P connect 13 0 41 0;
#P connect 48 0 41 0;
#P connect 41 0 42 0;
#P connect 42 0 43 0;
#P connect 5 0 39 0;
#P connect 39 0 40 0;
#P connect 46 0 15 0;
#P connect 14 0 15 0;
#P connect 9 0 8 0;
#P connect 10 0 9 0;
#P connect 5 0 9 1;
#P connect 58 0 56 0;
#P connect 50 1 22 0;
#P connect 22 0 23 0;
#P connect 23 0 18 0;
#P connect 55 0 52 0;
#P connect 18 0 52 0;
#P connect 52 0 19 0;
#P connect 21 0 19 0;
#P connect 20 0 21 0;
#P connect 50 2 28 0;
#P connect 28 0 29 0;
#P connect 29 0 24 0;
#P connect 24 0 51 0;
#P connect 51 0 25 0;
#P connect 27 0 25 0;
#P connect 26 0 27 0;
#P pop;