Main Menu

Help & Donation

Started by Scott_Bro, August 16, 2022, 04:28:36 AM

Previous topic - Next topic

Scott_Bro

Here is some proggies for everyone to fiddle with.

The one I need help with is Motion Detection.
I would like to know how I would be able to spped this up?  The frame rate is really slow mostly due to filtering I think but it is not only used for removing unwanted noise as I will also need a function or something of sorts to capture amount of blobs to form square areas of interest.  So any ideas on formulating that would help too.

There is also a 2D-Tile Engine with pixel-perfect scrolling and sliding collisions I developed with the help of a few people on the subject.  It could be used for lots of various games. Have a look at the examples and have fun more often!!!

This is Scott Bro signing off for now...

Thanks!

stevmjon

looks like motion detection requires some images.

i like the bezier and frequency demo's too. you could use these for animating a 2d/3d character and motion.
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin


  Curves are a lot of fun there's an example in the Vector Library

Scott_Bro

I know that there is no pictures but I used VLC Player and separated film into .png frames and it works for the most part but I'm trying to improve it.
It's rather slow and I tried different things like memory banks and got a bit of a speed-up but the frame rate is really still low.
So, Any suggestions on how to maybe pre-process? Or some way I haven't thought of?
A bit of insight I am also trying to zero-in on targets but using circled groups for a follow the blobs algo to come up with areas of interest.  i.e. Movements boxed areas.

Kevin, Do you know of anything that could help me make this one better?

This is Scott signing out PEACE! for now.

kevin

#4
 Hey Scott

    There's a lot of over working in the routine..  I modded the code to load a series of frames on my HD already,  but if you think about this basic loop we're doing twice the work per frame..


PlayBASIC Code: [Select]
Do

Cls


LoadFXImage path$+"Anim" + digits$(Last_Frame_Number ,4) + ".bmp" ,Last_Frame
LoadFXImage path$+"Anim" + digits$(Current_Frame_Number ,4) + ".bmp" ,Current_Frame

ScaleImage Last_Frame,X_Screen_Res,Y_Screen_Res,1
ScaleImage Current_Frame,X_Screen_Res,Y_Screen_Res,1

GrayScaleImage Last_Frame
GrayScaleImage Current_Frame

Gosub Create_Bitmask_Image

//Print FPS()

Sync

//Waitkey

Last_Frame_Number ++
Current_Frame_Number ++

Loop spacekey()

End



      First loop we're loading Anim0001 and Amin0002   scaling them and converting to gray scale..  

 
      second loop we're loading Anim0002 and Amin0003   scaling them and converting to gray scale..  


       So my first question/hint would be why are we reloading Anim0002 if it's just going to be re-used ?


       
        If you mask the RGB's up front RgbMaskIMage then in your scanning routine this could be a table

PlayBASIC Code: [Select]
      Delta_Difference = Intensity_2 - Intensity_1
If Delta_Difference >= Threshold
Bitmask_Image(X,Y) = RGB(255,255,255)
Else
Bitmask_Image(X,Y) = RGB(0,0,0)
EndIf



             if Masked off the ARG and left the B channel, then these only range between 0 and 255.   So you can use the pair of values to look up the result from a remade table. Making it a fixed time calculation.   The table is built at start up and then just referenced during the loops.   



Scott_Bro

True,  Going from frame 1,2,3,4,5,ect...  Your right why? reload previous frames. 
I like the other ideas as well.  Are you meaning by turning off alpha,red and green channels that blue gives 0-255? If so why? blue?

kevin


QuoteAre you meaning by turning off alpha,red and green channels that blue gives 0-255? If so why? blue?

     You only need one channel, it could be RED  or  GREEN or BLUE.  But in gray scale all three values will be the same..

     Numerically BLUE has a range of 0 to 255 which fits nicely into a 2D table.    Then is doesn't matter how much work per pixel,  that's pre computed we just pull the result fom the pre-computed array.

Scott_Bro

Steve thanks for the comments.

Kev, Any thoughts on how I could count groups of circles/blobs and if over a certain amount add a boxed outline around them as targets? or areas of interest per-say in the study of micro-organisims?  hehehe
Which is what it could do but.. I am mostly concerned with targets or various movements not culled out example moving people or game wise shooting objects.
Other ideas are surveillance.  So this portions is the follow the blobs section for now.

Thanks for the tidbits for now and please don't think I'm afraid of doing the work!!! Still your pointers help out alot really so thanks for assisting me ahead of time.

As for Steve, Thanks for posting more 3D-help.  At some point I'd like to give that a whirl as my last big 3D-work was battlezone game but that was along time ago.

I'm also trying to learn the N.E.A.T. algorithm for A.I. research pretty intense stuff confusing as it is.  Not ready for it now but hopefully in near future but pick up new tricks here and there due to everyone's involvement.
So, I'll keep some things a surprise!!!

I was wondering also if anyone else on the board would free comfortable sharing some new code for me to check out like some of us have been doing here because I am interested with others progress as well.

Thanks,
Scottie B!



stevmjon

if you go into the 3D development section, i posted 'build a 3D render engine' where you can see the code.
i released the code in stages so you can start with small amount of code and see where it grows.

i have also been working on a 3D editor built into the ray tracer so you edit the 3D scene and objects then render this new scene. i am nearly done and will post this new version soon.
the way it is going you could actually expand this into a 3D editor stand alone program.

you should pick up ray tracing well, because you use ray casting in your demos. ray tracing is shooting rays from the camera into the 3D world, in the location the screen would be, and see what objects the ray hits.
the awesome thing is you can check surface diffuse, specular highlights, shadows and reflections. it really brings the scene to life.
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin

#9
     Example code expects a series of frames called "ANIM0001.bmp"  , "ANIM0002.bmp"  etc etc etc

    I have no idea what the filter routine is doing so a version of it is commented out..  but the logic is we load a pair of frames initially;  then swap them for successive frames.   To do the delta I apply a mask ($000000ff / ARGB(0,0,0,255) ) to the images removing the ARG channels,  it's the same as going ThisRGB = point(X,Y) and 255, then looking up the answers from a pre-computed table.

 

PlayBASIC Code: [Select]
   global path$="--FOLDER--WHERE-ANIMATION-FRAMES-ARE-STORED"

Dim ThresholdTable(256,256)

global X_Screen_Res = 1024
global Y_Screen_Res = 768


Color_Mode = 32
Windowed_Mode = 1

setfps 30
OpenScreen X_Screen_Res,Y_Screen_Res,Color_Mode,Windowed_Mode
TitleScreen "Motion Detection - One"

loadfont "courier new",1,40

global Threshold = 32

global X_Filter_Size = 4
global Y_Filter_Size = 4

Process_Frames(1,10)


end




Function Process_Frames(StartFrame,EndFrame)

// Create the Arrays
DIM MASK(X_Screen_Res,Y_Screen_Res)
DIM FILTERED(X_Screen_Res,Y_Screen_Res)

// ----------------------------------------------------
// ----------------------------------------------------
// ----------------------------------------------------

// Build All possible outputs for the threshold table
for OLD_RGB =0 to 255
for NEW_RGB =0 to 255

Delta = NEW_RGB-OLD_RGB
Result=RGB(255,255,255) * (Delta >= Threshold)
ThresholdTable(NEW_RGB,OLD_RGB)=Result
next
next


// ----------------------------------------------------
// Step through all the frames
// ----------------------------------------------------
For CurrentFrame = StartFrame To EndFrame

Cls

#print "Current Frame:"+str$(CurrentFrame)

if Last_Frame=0
Last_Frame =LoadFrame(path$+"Anim" + digits$(CurrentFRAME ,4) + ".bmp")
endif
Current_Frame =LoadFrame(path$+"Anim" + digits$(CurrentFRAME+1 ,4) + ".bmp")

Compare_Frames(Last_Frame,Current_Frame, Mask())


// Show the Current frame
drawimage Current_Frame,0,0,false

// draw ask to the screen for something to look at
RenderMask(Mask())

// apply filter pass ?
; FilterMAsk(Mask(), Filtered())

; RenderMask(Filtered())

ink $00ffFFFF
print Last_Frame
print Current_Frame
ink -1
deleteimage Last_Frame
Last_Frame = Current_Frame


Sync
Next


// ----------------------------------------------------
// ----------------------------------------------------
// ----------------------------------------------------

print "DONE"
sync
waitkey
end


EndFunction




Function Compare_Frames(LastIMAGE,CurrentIMAGE, Mask())

OLD_Surface=getsurface()
//
rendertoimage LastIMAGE

W=GetSurfaceWidth()
H=GetSurfaceHeight()

// get the address of this FX buffer and it's pitch (width in bytes)
lockbuffer
Pixel=point(0,0)
SrcAddress =GetImagePtr(LastIMage)
SrcPitch =GetImagePitch(LastIMage)
unlockbuffer


// Clear the array will zeros
ClearArray Mask(),0


// declare array we'll use to hold the current ROW in
Dim Row(w*2)
DestAddress = GetArrayPtr(Row(),true)

rendertoimage CurrentIMAGE
lockbuffer
Pixel=Point(0,0)

For Ylp=0 to H-1
// Copy Row of pixels from LAST FRME into the ROW ARRAY
CopyMemory SrcAddress+(SrcPitch*Ylp) , DestAddress , W*4

// Scan CURRENT FRAME ROW
For Xlp=0 to w-1
// read the NEW and OLD RGB values
New_RGB =Point(Xlp,Ylp)
Old_RGB = Row(xlp)
// USed them as indexes into our pre-computed array / table
Mask(xlp,ylp)= ThresholdTable(New_RGB,OLD_RGB)
next
Login required to view complete source code








Summary:

  The video describes a process for motion detection in a video stream. The motion detection is achieved by calculating the difference between a series of frames, and highlighting the differences in white. The code described in the text includes setting up a window and loading a font, as well as converting color information to monochromatic (grayscale) format and creating a mask. The main loop of the code involves comparing the current frame with a future frame, and displaying the resulting image with a blue tinge. The text also mentions techniques for optimizing the code, such as reducing the number of times surfaces are switched and unrolling loops.





Quote
Kev, Any thoughts on how I could count groups of circles/blobs and if over a certain amount add a boxed outline around them as targets? or areas of interest per-say in the study of micro-organisims?  hehehe
Which is what it could do but.. I am mostly concerned with targets or various movements not culled out example moving people or game wise shooting objects.
Other ideas are surveillance.  So this portions is the follow the blobs section for now.

    Hmm not sure I follow.   How about you explain what you're actually trying to do..  I don't have time to guess.  

    If you're trying to detect moving object in from footage that's not fixed then i've no idea..


Scott_Bro

#10
Hey! I'm back!

The Threshold is = If the delta diff is equal or above this adjustable variable then we will mark it as white all the rest black.  
So white is how much movement do we consider to concern ourself with? This is at the pixel level so don't confuse it with circles.

The filter is adjustable to a size we determine though speed-ups don't know?  but...
It filters out noise/ unwanted small movements we will not concern ourselves with.

The multipule on the filter is the amount of pixels we say will be enough to cap/cut off if to little or maybe too much?

That's also which I think will lead us to make the blobs. similar but noise is small and blobs are big areas we care about!!!

Also the filter I would like it to (NOT) loose per-pixel!!!  
It maybe don't look that way in demo but I was trying to work on below.

The circles are just me trying to figure out how???  Can we group an amount we will deem worthwhile to keep as a per-say cluster of circles/blobs for scalar/scaled up! but...
Not loose and maintain original stuff ?  So... We can markout "Areas"!  then outline boxes the follow the shapes/figures/objects we want to watch!!!  


kevin


    I'm not really following the logic but in order distill this down the biggest groups of changing areas,  you'd be scaling down the data.   Keeping stuff that's of interest and throwing away empty stuff.   

    What you could do I guess is during the mask creation pass,  the routine could creates a bit mask from delta of the two images.    So the mask is the 1 bit to 1 pixel.   So assuming there grouped into 8 pixels groups (ie bytes)  8 set pixels give you a 255  (%11111111)    Which is easy to use in look up table.

    Then pass this through some pre-computed sampling table.  So a table with all the precomputed combinations and the 'best'  outcomes are kept.        So bits that sit in rows would be make it through a scale and stray bits are tossed. 

    You'd prolly need to read a pair of rows and build the table from those.    So if you image a group of four pixels.  In the half scaler we only get an output bit when all four are set.  All other combos output a 0.

    So stray data gets filtered out and after a few passes any bits that are set represent regions in the original image.     
   
 

kevin

#12
     Bitplane Version Mock UP


    This version create a bitplane from MASK so we end up with eahc byte containing the status of 8 pixels.    Then to do scales we use a pre-computed table to do the reducing. The reducing in this version just keeps a PIxel if the group of 4 pixels are all set.    

    The demo support salcing down to 50% / 25% and 12.5% of the original size.   The more it goes down the more stray pixels (smaller pixel zones) get screened out.  I'll post a video later, since it's probably easier to explain it while looking at it.  


   




  Video Transcript:



all right hey guys um
just messing around with this uh
motion detection thing of scots and this
is my version of it anyway
the original version was working in rgb
colors it was doing a comparison between
the previous frame and the next frame
and
applying some logic and then
the pixel was either lit or not
so he was concerned about how do i
detect lit pixels and i thought well
if there are to be colors in other words
the values are just um either zero or
pretty much negative one which is going
to be
uh
in hex is going to be f f f
it's awkward to work with but we don't
need that anyway so if we can convert
each each
pixel to a bit
and pack the bits into groups then we
can do
so we can scan through the array of bits
and use the bits around where we are
as an offset i'm here i'm just using a
to do a scale
so i've got this thing called here a
scale table which is pretty much all the
combinations
of two bytes
um
if i look at the table it's created
uh where are we somewhere
here we're working in pairs of bits so
we're taking
uh one byte which is the equivalent of
eight pixels wide
and we want to take
this root this row of eight pixels and
the row of a pixels below us
then we want to work in blocks of four
so that's why i'm masking off these
pixels here or making the masks anyway
so on the row below us
we're comparing the mask if it equals
itself in other words
if that pair of bits is set
this will give us a true
and the inner loop we're looking at the
current row doing the same logic and
then ending the two results together so
if they are both
actually
equal to the mask then this gets output
as a set bit
so we're compressing four set pixels
down to one
if any one of the four pixels is not set
it ends up as a zero
so
it's a pretty ugly sort of truncating
method but but you can make it more
elaborate if you wanted to i guess
i didn't think about just my little
table to do it
uh we'll run the demo
anyway so this is the original method
working in rgb colors here
um
that's a bit i've sped it up a little
bit
comparing
the blue the background is the current
frame
uh
uh translated to
grayscale and then
we're masking off the r in
the green channel and just using the
blue channel so we can use the
that value as a lookup table for our
logic between the previous frame and
this frame
um
if we go through the next
the next one
this is the same thing but we're
converting
the rgb colors into a bit plane
and then rendering them out as bits
which is a lot more awkward to do
but performance wise there's no no
difference we haven't gained anything
here but the next for pass
we're doing a 2x2 reduction
then scaling it up to the screen size
what this does is it gets rid of some of
the noise as you can tell
and
still get lots of noise there
at four by four we get rid of a lot of
the noise because those
those outlying set pixels are now not
not falling through our entire box the
tables only keeping
uh bits where they're surrounded by
pixels
now if we make a little matrix or
better or a filter better i think we
could get a better result but the
principle working in bid planes
is actually not too bad
the beauty of doing the scale like this
is it there's no logic
that
the
you feed it
a series of bits
use that
that secret that that series of bits as
an offset into a table
that has the logic applied to it already
so
for one loop
we're doing four pixel scales
each pass
this is a scaling logic here
which is just relying on this table so
we're taking
uh taking
each eight eight bit
uh chunk of planer
using the
this row and the row below it's because
we want
each bit and the four bits around it
all the four pixels uh so with the
current pixel and the one to its right
we want the two pixels below it
they're not attached to other pixels so
so they will be truncated out
if they don't exist
um we probably can have a more elaborate
version of the same idea as well where
we have
the bits on either side of the current
bit
and we use nine
we end up with a table it's a bit larger
but
we could have
a bit of logic that precomputes
the best looking result in other words
it's all in how you build the table
initially not in how you do the runtime
translation
so here i'm just feeding it feeding
those values to the table and then
shifting it across
so whatever the output for this input
data is that's been pre-computed before
the the program is even running so each
time we do that we're doing
in this case here we're doing a sample
of
uh eight pixels down to four
then we repeat the process to get eight
pixels and we output the final eight
pixels in its place so we're doing
a halving uh of the horizontal
resolution of the image here
and vertically as well
um but i guess if we made the table more
elaborate
like i i don't really know i'm like
i'm just just making assumptions there i
guess
you know if we if we had uh
a better idea of what's what we're
trying to achieve
here i'm just chucking
the day through a table so
the actual routine itself the different
methods we're looking at before
this is the original routine
it's the the bit mask version we'll just
have a look at this one here
show you what it is
it's all the same
for one simple difference is the inner
loop
we're taking eight pixels across the row
and converting that to one byte
so we're using this the same principle
using
the rgb the blue value from from this
point and the
the blue value from the previous pixel
through our threshold table so
our logic is already pre-computed so all
the possible outcomes are known so we
can just feed it the two values and get
the result out
so whatever we convert this logic
convert this table oh sorry
however we set this table up initially
dictates whether we get a bit that's set
or not
there's no logic in here that that does
that even cares what the bits are
we're just pulling it out of the array
shifting a bit across to the high bit
of this byte and then repeating the
process moving to the next pixel across
doing the same process and then this
becomes bit six bit five except this is
unroll internally
once we have once we've computed all
eight bits we just source stores in our
array and move on
we don't care
so we're taking our image really and
doing a reduction
um
by eight
and
that's beneficial in terms of doing
processing products and then we don't
have to do
that stuff in the future
um
anyway
so that's doing doing our
this is uh conveying a bit mask or a bit
plain version of the
of the image and we've got
to compare is the same
code as it was before
didn't bother changing that where are we
so
this version is just a straight plainer
version of the algorithm and we're
reading the thing
to render it out we're going to do
something different that's why it's got
different methods then
applied here
this is the original method we're just
running through if the mask is set in
other words if it's a non-zero value we
just draw
this as an rgb color
after this other bit this bit plain
method we've got a bit more evolved to
do that
but the principles now they not that
complicated really
we're running down the y
running across the row except we're
running across the row in bytes so we're
taking the width divided by eight
so we grab a bite
off the uh on the current row
we multiply this out to compute its
actual pixel address on screen
because fast dots in working in screen
coordinates
and we do have a bunch of unrolled masks
we check a bit
uh if bit 7 is set which is 128 if it is
we draw a dot if it's not we do nothing
and this gives us this black and white
overlay pretty much this black and white
bit wise mars
so we've got less looping but more logic
inside here that's pre-computed
the other versions that are two by two
we're doing the same principle
we now have halved that space again
but now we're drawing
i'm actually using fast.2 to draw a pair
of pixels side by side and then drawing
another pair of pixels below that
the rest of it's all the same
and the last one is
i don't know there's a four by four by
four there
so we're drawing four pixels side by
side and doing four rows of it
and then down the bottom sorry down the
bottom
we're drawing 8x8 which is drawing the
just using the box to do those
um
uh so hopefully
it's like twigs some creativity really
with what we're trying to what you're
trying to do
in that you can build your tables and
then have
your filter routine
uh
the only complexity of that filter
routine needs to be
as it reads through the group of bits
that you're looking at and then
making it making
or reading some value that you can then
use to look up
an output result with
whether the bit that we're outputting
needs to be kept or removed
um so rather than do that logic for
every pixel you could
pre-compute the table up front and then
just just effectively look up the answer
as you're stepping through
uh if you've ever looked at um
contemporary
demo effects in particular
on uh
legacy platforms like 64s and amigas etc
you'll see a lot of tables
there's hardly any of it's real time
what sorry it's real time but
the
the trick is in how you build the data
and then how you fetch it out
and coming up with different ways of
storing the information and retrieving
it is part of the challenge
so this is the same principle if you can
come up with a way that
a table that
produces a nice result from what you
have or what you're what you're aiming
at
then
maybe you can do it this way i don't
know
anyway so coming back to here we've got
a
we're scaling it down by two
we're actually applying the scale
so we're doing a
reduction of this and then we're drawing
it
uh scale up
in software and we're doing we're
scaling it down twice we're doing it
it's going the original down by 50 and
then it's going that down to 25 percent
gives us a 4x4 and then the last is the
8x8
last time
it's pretty late pretty tired
that's just the original version of it
let it run through
it's the bit version of it so we can
build anything
the
[Music]
initial comparison speaking output as an
eight
eight bits per
uh rather than individual rgb colors
next time we're using that to do a 2x2
scale down i'm only keeping dots
like hitting the dots that are
when all four bits
around the current pixel are set
so we're filtering out some of this
extra data over here
as we go down to four by four
we're using the previously filtered
table to do the same thing again so a
lot of a lot of the noise in the field
is gone
and that's probably about where you need
to stop reckoning
because here we we're we're down to
eight by eight now and we're losing
we're losing a lot of the delta in the
image a lot of the change between frames
it doesn't help help with the camera's
moving and
you know everything's moving as well
yeah i think if you can
set up your tables to remove that
that noise for keep pixels that are
surrounded by other pixels uh that would
give you the best result and ideally i
think you could probably keep
a lot of that motion detail in the frame
don't i
just throw on the idea out there pretty
much
it's just fun playing with your planes
and biplanes are a weird idea that
sort of out of date
in modern computing but uh
they do have a use
anyway thanks for watching i'll see you
next time bye



PlayBASIC Code: [Select]
   global path$="-------LOCATION OF ANIMATION FILES--------"

global Render_METHOD =0


Dim ThresholdTable(256,256)
Dim ThresholdTable_BIT(256,256)


// This table is used to scale four nibbles
Dim ScaleDownTable(256,256)


global X_Screen_Res = 1024
global Y_Screen_Res = 768


Color_Mode = 32
Windowed_Mode = 1

setfps 30
OpenScreen X_Screen_Res,Y_Screen_Res,Color_Mode,Windowed_Mode
TitleScreen "Motion Detection - One"

loadfont "courier new",1,40

global Threshold = 32

global X_Filter_Size = 4
global Y_Filter_Size = 4


do

Process_Frames(1,100)

loop
end




Function Process_Frames(StartFrame,EndFrame)

// Create the Arrays
DIM MASK(X_Screen_Res,Y_Screen_Res)
DIM FILTERED(X_Screen_Res,Y_Screen_Res)


DIM MASK_50Percent(X_Screen_Res,Y_Screen_Res)
DIM MASK_25Percent(X_Screen_Res,Y_Screen_Res)
DIM MASK_12Percent(X_Screen_Res,Y_Screen_Res)


// ----------------------------------------------------
// ----------------------------------------------------
// ----------------------------------------------------

// Build All possible outputs for the threshold table
for OLD_RGB =0 to 255
for NEW_RGB =0 to 255

Delta = NEW_RGB-OLD_RGB
Result=RGB(255,255,255) * (Delta >= Threshold)
ThresholdTable(NEW_RGB,OLD_RGB)=Result

// Convert this to a single bit
ThresholdTable_BIT(NEW_RGB,OLD_RGB)=Result<>0


next
next

// create the table that contains all the
Create_Scale_Down_Table()




// ----------------------------------------------------
// Step through all the frames
// ----------------------------------------------------
For CurrentFrame = StartFrame To EndFrame

Cls

#print "Current Frame:"+str$(CurrentFrame)

if Last_Frame=0
Last_Frame =LoadFrame(path$+"Anim" + digits$(CurrentFRAME ,4) + ".bmp")
endif
Current_Frame =LoadFrame(path$+"Anim" + digits$(CurrentFRAME+1 ,4) + ".bmp")

// Show the Current frame
drawimage Current_Frame,0,0,false

Method$=""
Select Render_METHOD
case 0
Compare_Frames(Last_Frame,Current_Frame, Mask())
RenderMask(Mask())

Method$="RGB MASK"

case 1
Compare_Frames_Bit_MASK_VERSION(Last_Frame,Current_Frame, Mask())
RenderMask(Mask(),1)

Method$="Planar MASK "

case 2
Compare_Frames_Bit_MASK_VERSION(Last_Frame,Current_Frame, Mask())

Scale_Mask_Down_50Percent(Mask(),Mask_50Percent())
RenderMask(Mask_50Percent(),2)
Method$="Planar MASK - 2*2 resolution"

case 3
Compare_Frames_Bit_MASK_VERSION(Last_Frame,Current_Frame, Mask())

Scale_Mask_Down_50Percent(Mask(),Mask_50Percent())
Scale_Mask_Down_50Percent(Mask_50Percent(), Mask_25Percent())
RenderMask(Mask_25Percent(),3)

Method$="Planar MASK - 4*4 resolution"

case 4
Compare_Frames_Bit_MASK_VERSION(Last_Frame,Current_Frame, Mask())

Scale_Mask_Down_50Percent(Mask(),Mask_50Percent())
Scale_Mask_Down_50Percent(Mask_50Percent(), Mask_25Percent())
Scale_Mask_Down_50Percent(Mask_25Percent(), Mask_12Percent())

RenderMask(Mask_12Percent(),4)

Method$="Planar MASK - 8*8 resolution"

case 5
Render_METHOD=0

endselect

ink $00ffFFFF

print "Method:"+Method$

print Last_Frame
print Current_Frame
Login required to view complete source code

Scott_Bro

Nice work!  I like what you done with it.
What version of playbasic are you using for the source?


kevin


QuoteWhat version of playbasic are you using for the source?

     Whatever the current release is. 

     PlayBASIC V1.65C3 BETA #4 (login required)

     PlayBASIC V1.65C2b _Retail Upgrade_ Now Available (12th, Sep, 2021) (login required)