LB Booster
« Eliminating flickering »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:31am



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: Eliminating flickering  (Read 329 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Eliminating flickering
« Thread started on: Jul 3rd, 2016, 2:50pm »

Some while ago I explained that it is often possible to eliminate graphics flickering in LBB by concatenating an entire frame's worth of graphics commands into a single string. A good example of how well this works can be seen by modifying the Towers of Hanoi program recently posted to the LB group by bluatigro.

First run his program as published; you will probably find that the flicker is quite bad. Now modify sub show as below and see how much nicer it is:

Code:
sub show
  scan
  m$ = "fill black; down"
  for i = 0 to number
    m$ = m$ + ";color ";kl$(i)
    m$ = m$ + ";backcolor ";kl$(i)
    m$ = m$ + ";place ";x(i)-size(i);" ";y(i)-20
    m$ = m$ + ";boxfilled ";x(i)+size(i);" ";y(i)+20
  next i
  #m m$
 CallDLL #kernel32, "Sleep" _
 , 20   As long _
 , ret As void
end sub 

Richard.
« Last Edit: Jul 8th, 2016, 12:46pm by Richard Russell » 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