LB Booster
« Speeding up graphics plotting »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:26am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Speeding up graphics plotting  (Read 385 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Speeding up graphics plotting
« Thread started on: Dec 26th, 2013, 11:59am »

You may occasionally find that plotting graphics in LBB is a little slower than in LB 4.04; this results from the overhead of the emulator. This can often be resolved by sending fewer, longer, graphics commands. For example this code runs noticeably more slowly in LBB:

Code:
    #gr "place ";x;" ";y
    for i = 1 to len(rest$) step 2
        x1=asc(mid$(rest$,i,  1))-34-45
        y1=asc(mid$(rest$,i+1,1))-34-45
        x=x+x1
        y=y+y1
        #gr "goto ";x;" ";y
    next 

But this simple modification makes it run more quickly in LBB than in LB4.04:

Code:
    gr$ = "place ";x;" ";y;";"
    for i = 1 to len(rest$) step 2
        x1=asc(mid$(rest$,i,  1))-34-45
        y1=asc(mid$(rest$,i+1,1))-34-45
        x=x+x1
        y=y+y1
        gr$ = gr$;"goto ";x;" ";y;";"
    next
    #gr gr$ 

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls