This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-08 07:17:20

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Pen (1s1s) Optimizations

I'm sorry if this has already been talked about before, but I really can't find any straight out answers to it. I am writing a scratch program that reads in two lists, framebuffer and brightframebuffer, for hue and brightness, and then plots it out using the pen. Even in turbo speed, the program is very slow, and bound to be even slower once I hook it up to a practical application such as a real-time game (especially in 3D, like it should be able to handle) My question is, what kind of optimizations can I perform, as in turbo-speed it still runs like a snail.

Thanks again,
-bobbybee


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#2 2011-11-08 07:29:42

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Pen (1s1s) Optimizations

register less values?

Offline

 

#3 2011-11-08 07:39:15

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Pen (1s1s) Optimizations

What do you mean, roijac, by register less values? Put less things in the list, and do more at run-time?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#4 2011-11-08 08:19:19

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Pen (1s1s) Optimizations

Well... vector graphics, a smaller panel, lower resolution, random plotting are some I can think of.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5 2011-11-08 10:26:34

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Pen (1s1s) Optimizations

I'm working on an algorithm for lower resolution pictures, but I still will need some more advanced algorithms to pair with. Even at a pen size of 4 it still takes about a half second per frame. Just my thoughts.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#6 2011-11-10 14:23:10

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Pen (1s1s) Optimizations

well alot of programs (not scratch) can read in the data from a file so less data is stored... maybe convince ST to support I/O in 2.0?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7 2011-11-11 06:50:20

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Pen (1s1s) Optimizations

I don't think that would really change the speeds, and if it does it won't have a dramatic effect on it. Perhaps reading in images/models and using them as components of a final image that might make IO useful.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

Board footer