The default is 16 bit display.
Quote: "Is there a better faster alternative to point()"
It depends on what you are trying to do. If you are using the point() command in a loop, SYNC (refresh) is automatically called each loop. This example shows what happens. At a Sync rate of 60, it should take 16 or 17 ms to run through a 1000 iteration loop. If you SYNC each loop (which point does) it basically takes 16 ms to get through 1 loop iteration - that means it's about 1000 times slower to refresh each loop:
sync on
sync rate 60
tim=timer()
for n=1 to 1000
next n
a=point(0,0)
print timer()-tim
print
tim=timer()
for n=1 to 1
a=point(0,0)
next n
print timer()-tim
So, alternatives: if you need to call POINT() each iteration in your main loop, use it as the last command in your main DO LOOP instead of SYNC:
set display mode 800,600,32
sync on
sync rate 0
create bitmap 1,screen width(),screen height()
for n=1 to 100
x1=rnd(screen width())
y1=rnd(screen height())
ink rgb(rnd(255),rnd(255),rnd(255)),0
box x1,y1,x1+30,y1+30
next n
set current bitmap 0
ink rgb(255,255,255),0
do
copy bitmap 1,0
text 0,0,"FPS() = "+str$(screen fps())
text 0,20,"Color = "+str$(color)
color=point(mousex(),mousey())
loop
This runs at about 138 fps on my machine.
If your screen doesn't change or changes very infrequently, another alternative is to use a memblock or an array to store the screen information and then get the color of a position by getting the index from the array or the position from the memblock of the screen coordinates. Should be faster if you have to loop through all of the values at once checking for a particular color.
I once created a windows api as an alternative, it was significantly faster than point, but you have to use it in windowed mode.
Check out:
gdi_point
Enjoy your day.