0 Members and 5 Guests are viewing this topic.
Its actually not that big. It's only about 16 or so lines, and it is faster. I'll post a screenie soon comparing both methods
much faster! hmm, I just noticed that your character slows down a lot when he is in the air...
Quote from: trevmeister66 on May 09, 2009, 09:48:16 pmIts actually not that big. It's only about 16 or so lines, and it is faster. I'll post a screenie soon comparing both methodsHow big is the new code? I just calculated it and it looks like ~336 bytes. If that's too large, you could use two loops. One to loop through the first layer, and the other to loop through the second layer. This would still cut out the extra seven StorePics and RecallPics and be much smaller.
The For( loop is slower because you have to calculate an equation (8A-8 or whatever) every time through,
Quote from: trevmeister66 on May 09, 2009, 10:14:50 pmThe For( loop is slower because you have to calculate an equation (8A-8 or whatever) every time through,You're neglecting the overhead of running the For( loop itself: it has to increment the index variable and the interpreter is searching for an End statement as well.[edit] This topic is growing pretty fast. Every time I look there's like two or more posts.
lol, I think the For( loop looks a bit more aesthetically appealing. then the way I did, and it's not that much faster