Yea, just 14 if you want sync'd FPS rates, controlled fog & controlled Ambient Light, otherwise, 10 with sync'd FPS rates as well!

Also, you might want to use Timer-Based Movement =) I've added this in for you in both versions, too! =)
Add a white fog color to it during the day, followed by a black fog color during the night, and a set ambient light 100 for day, and a set ambient light 25 , for night! =)
Also, remember to: Call Tbm_init() with the desired sync rate to start the system. Call Tbm_update() at the beginning of your game loop and after unpausing. If you want your screen fps, they can be found in Tbm.realfps, more accurate than using screen fps()
Credit for Timer-Based Movement system, goes to:
Code Dragon
Here is an example WITH Timer-Based Movement, Better FPS, key controlled fog, & key controlled ambient light:
+ Code SnippetREM Project: Map Generator
REM Created: 13/06/2007 11:09:11
REM
REM ***** Main Source File *****
REM
Set Display Mode 800, 600, 32
type Tbm
targetfps as float `this is the target fps of the system, if it is not running at this all movment values will be corrected
realfps as float `true fps the system is running at, more accurate than screen fps()
boot as dword `value of timer() when the system starts
factor as float `this is what all movment values need to be multiplied by to achive timer based movement
lastcheck as dword `value of timer() the last time the system was updated
endtype
Global FPS#
FPS# = 60.0
Sync on : Sync rate FPS#
Tbm_init(FPS#)
Global Fog_Dist# = 10.0 `Fog Distance variable - DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!
Global Ambient_Light# = 100.0 `Ambient Light variable - DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!
Fog on `Turn on fog
Fog color rgb(255, 255, 255) `Set Fog's color (In this case, it's white) (Switch to rgb(0, 0, 0) , for a midnight effect)
Randomize Timer()
Sizex = 1000
Sizey = 1000
Spacing = 200
Dim Grid(Sizex,Sizey)
For x = 0 to Sizex/Spacing
For y = 0 to Sizey/Spacing
If x > 0 and y > 0 and x < Sizex/Spacing and y < Sizey/Spacing
Height = Rnd(255)
Ink rgb(Height,Height,Height),0
Dot x*Spacing,y*Spacing
Grid(x*Spacing,y*Spacing) = Height
Else
Height = 127
Ink rgb(Height,Height,Height),0
Dot x*Spacing,y*Spacing
Grid(x*Spacing,y*Spacing) = Height
Endif
Next y
Next x
wait key
For y = 0 to Sizey/Spacing
For x = 0 to (Sizex/Spacing)-1
HorizontalSinWave(x*Spacing,(x+1)*Spacing,y*Spacing,Grid(x*Spacing,y*Spacing),Grid((x+1)*Spacing,y*Spacing))
Next x
Next y
For x = 0 to Sizex
For y = 0 to (Sizey/Spacing)-1
VerticalSinWave(y*Spacing,(y+1)*Spacing,x,Grid(x,y*Spacing),Grid(x,(y+1)*Spacing))
Next y
Next x
wait key
Get Image 1,0,0,Sizex,Sizey
Save Image "Image.bmp",1
Make Terrain 1,"Image.bmp"
Load Image "Grass.bmp",2
Texture Terrain 1,2
Tbm_update()
do
Fog distance Fog_Dist# `DO NOT CHANGE THIS, AS THIS IS WHAT CONTROLS THE FOG'S DISTANCE ONCE A KEY IS PRESSED!
set ambient light Ambient_Light#
If ControlKey()=1 then Fog_Dist# = Fog_Dist#+1.0*.05*Tbm.factor
If ShiftKey()=1 then Fog_Dist# = Fog_Dist#-1.0*.05*Tbm.factor
If KeyState(44)=1 then Ambient_Light# = Ambient_Light#+1.0*.05*Tbm.factor `SAME THING WITH THE AMBIENT LIGHT VALUE, IT IS RECOMMENDED TO KEEP IT AT THIS VALUE FOR SMALLER TERRAINS, OTHERWISE, USE THIS IN PLACE OF IT: Ambient_Light# = Ambient_Light#+1.0*Tbm.factor
If KeyState(45)=1 then Ambient_Light# = Ambient_Light#-1.0*.05*Tbm.factor `SAME THING WITH THE AMBIENT LIGHT VALUE, IT IS RECOMMENDED TO KEEP IT AT THIS VALUE FOR SMALLER TERRAINS, OTHERWISE, USE THIS IN PLACE OF IT: Ambient_Light# = Ambient_Light#-1.0*Tbm.factor
`CHANGE "Fog_Dist# = Fog_Dist#+1.0*.05*Tbm.factor OR Fog_Dist# = Fog_Dist#-1.0*.05*Tbm.factor IF NEEDED! IF YOU HAVE A HUGE TERRAIN, IT IS SUGGESTED THAT YOU USE Fog_Dist# = Fog_Dist#+1.0*Tbm.factor OR Fog_Dist# = Fog_Dist#-1.0*Tbm.factor instead, as this can cause the Fog to move VERY, VERY slowly because of the huge Terrain!
Control Camera Using Arrowkeys 0,3*Tbm.factor,3*Tbm.factor
Position Camera Camera Position X(),Get Matrix Height(1,Camera Position X(),Camera Position Z())+5,Camera Position Z()
sync
loop
Tbm_update()
Function HorizontalSinWave(X1,X2,Y,A,B)
D = b-a
Dis = X2-X1
For x = X1 to X2
sx = (x-x1)/(Dis/180.0)
Height = a+(Sin(sx-90)+1)*d/2
if height >255 then print "error" : wait key : end
if height <0 then print "error" : wait key : end
Ink Rgb(Height,Height,Height),0
Grid(x,y) = Height
Dot x,y
Next x
Endfunction
Function VerticalSinWave(Y1,Y2,X,A,B)
D = b-a
Dis = Y2-Y1
For Y = Y1 to Y2
sy = (y-y1)/(Dis/180.0)
Height = a+(Sin(sy-90)+1)*d/2
if height >255 then print "error" : wait key : end
if height <0 then print "error" : wait key : end
Ink Rgb(Height,Height,Height),0
Grid(x,y) = Height
Dot x,y
Next x
Endfunction
function Tbm_init(fps as float)
global Tbm as Tbm
Tbm.boot = timer()
Tbm.lastcheck = Tbm.boot
Tbm.targetfps = fps
endfunction
function Tbm_update()
local now as dword
local took as dword
local factor as float
now = timer()
took = now - Tbm.lastcheck
Tbm.lastcheck = now
Tbm.realfps = 1000.0/took
Tbm.factor = Tbm.targetfps/Tbm.realfps
endfunction
Here is an example WITH Timer-Based Movement, Better FPS, WITHOUT key controlled fog, & WITHOUT key controlled ambient light:
+ Code SnippetREM Project: Map Generator
REM Created: 13/06/2007 11:09:11
REM
REM ***** Main Source File *****
REM
Set Display Mode 1280,1024,32
Randomize Timer()
type Tbm
targetfps as float `this is the target fps of the system, if it is not running at this all movment values will be corrected
realfps as float `true fps the system is running at, more accurate than screen fps()
boot as dword `value of timer() when the system starts
factor as float `this is what all movment values need to be multiplied by to achive timer based movement
lastcheck as dword `value of timer() the last time the system was updated
endtype
Global FPS#
FPS# = 60.0
Sync on : Sync rate FPS#
Tbm_init(FPS#)
Fog on `Turn on fog
Fog color rgb(255, 255, 255) Set Fog's color (In this case, it's white) (Switch to rgb(0, 0, 0) , for a midnight effect)
Fog distance 1450 `CHANGE THIS IF NEEDED, THIS SETS THE FOG'S DISTANCE! THIS IS ONLY NEEDED THIS HIGH WHEN THE TERRAIN IS HUGE!
set ambient light 100 OR set ambient light 25 `Depends on if you want all day or all night in your game, really
Sizex = 1000
Sizey = 1000
Spacing = 200
Dim Grid(Sizex,Sizey)
For x = 0 to Sizex/Spacing
For y = 0 to Sizey/Spacing
If x > 0 and y > 0 and x < Sizex/Spacing and y < Sizey/Spacing
Height = Rnd(255)
Ink rgb(Height,Height,Height),0
Dot x*Spacing,y*Spacing
Grid(x*Spacing,y*Spacing) = Height
Else
Height = 127
Ink rgb(Height,Height,Height),0
Dot x*Spacing,y*Spacing
Grid(x*Spacing,y*Spacing) = Height
Endif
Next y
Next x
wait key
For y = 0 to Sizey/Spacing
For x = 0 to (Sizex/Spacing)-1
HorizontalSinWave(x*Spacing,(x+1)*Spacing,y*Spacing,Grid(x*Spacing,y*Spacing),Grid((x+1)*Spacing,y*Spacing))
Next x
Next y
For x = 0 to Sizex
For y = 0 to (Sizey/Spacing)-1
VerticalSinWave(y*Spacing,(y+1)*Spacing,x,Grid(x,y*Spacing),Grid(x,(y+1)*Spacing))
Next y
Next x
wait key
Get Image 1,0,0,Sizex,Sizey
Save Image "Image.bmp",1
Make Terrain 1,"Image.bmp"
Load Image "Grass.bmp",2
Texture Terrain 1,2
Tbm_update()
do
Control Camera Using Arrowkeys 0,3*Tbm.factor,3*Tbm.factor
Position Camera Camera Position X(),Get Matrix Height(1,Camera Position X(),Camera Position Z())+5,Camera Position Z()
sync
loop
Tbm_update()
Function HorizontalSinWave(X1,X2,Y,A,B)
D = b-a
Dis = X2-X1
For x = X1 to X2
sx = (x-x1)/(Dis/180.0)
Height = a+(Sin(sx-90)+1)*d/2
if height >255 then print "error" : wait key : end
if height <0 then print "error" : wait key : end
Ink Rgb(Height,Height,Height),0
Grid(x,y) = Height
Dot x,y
Next x
Endfunction
Function VerticalSinWave(Y1,Y2,X,A,B)
D = b-a
Dis = Y2-Y1
For Y = Y1 to Y2
sy = (y-y1)/(Dis/180.0)
Height = a+(Sin(sy-90)+1)*d/2
if height >255 then print "error" : wait key : end
if height <0 then print "error" : wait key : end
Ink Rgb(Height,Height,Height),0
Grid(x,y) = Height
Dot x,y
Next x
Endfunction
function Tbm_init(fps as float)
global Tbm as Tbm
Tbm.boot = timer()
Tbm.lastcheck = Tbm.boot
Tbm.targetfps = fps
endfunction
function Tbm_update()
local now as dword
local took as dword
local factor as float
now = timer()
took = now - Tbm.lastcheck
Tbm.lastcheck = now
Tbm.realfps = 1000.0/took
Tbm.factor = Tbm.targetfps/Tbm.realfps
endfunction
I hope this helps! =)
Good Luck with your game, mate! ^_^
~M.W~