I just made this as a test. Hope it helps.
// Project: minimap by ando
// Created: 20-06-18
width# = GetMaxDeviceWidth()
height# = GetMaxDeviceHeight()
SetWindowSize(width#,height#,1)
SetVirtualResolution(width#,height#)
SetSyncRate(30,0)
SetScissor(0,0,0,0)
UseNewDefaultFonts(1)
SetGenerateMipmaps(1)
SetAmbientColor(100,100,100)
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TERRAIN
terrain=CreateObjectPlane(1000,1000)
terraintex=LoadImage("dirt5.png")
SetObjectImage(terrain,terraintex,0)
SetObjectUVScale(terrain,0,50,50)
SetImageWrapU(terraintex,1)
SetImageWrapV(terraintex,1)
RotateObjectLocalX(terrain,90)
// xxxxxxxxxxxxxxxxxxxx CAMERA and PLAYER SPHERE
cam=1
SetCameraRange(cam,0.5,10000)
SetCameraRotation(cam,0,0,0)
camAngleX#=0
player=CreateObjectsphere(20,6,12)
SetObjectposition(player,0,6,0)
SetObjectColor(player,25,25,25,255)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ball=CreateObjectsphere(40,6,12)
SetObjectposition(ball,0,10,480)
SetObjectColor(ball,255,50,50,255)
ball2=CreateObjectsphere(40,6,12)
SetObjectposition(ball2,0,10,-480)
SetObjectColor(ball2,50,50,255,255)
ball3=CreateObjectsphere(40,6,12)
SetObjectposition(ball3,-480,10,0)
SetObjectColor(ball3,50,255,50,255)
ball4=CreateObjectsphere(40,6,12)
SetObjectposition(ball4,480,10,0)
SetObjectColor(ball4,50,255,50,255)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rendertex=CreateRenderImage(512,512,0,1)
rendersprite=CreateSprite(rendertex)
SetSpriteSize(rendersprite,height#/3,height#/3)
SetSpritePosition(rendersprite,0,height#-GetSpriteHeight(rendersprite))
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
arrow=CreateObjectPlane(100,100)
arrowtex=LoadImage("arrowup.png")
SetObjectImage(arrow,arrowtex,0)
SetObjectAlphaMask(arrow,1)
SetObjectPosition(arrow,0,5,0)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
setrawmousevisible(0)
SetRawMousePosition(width#/2,height#/2)
do
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx render to texture
SetRenderToImage(rendertex,-1)
setspritevisible(rendersprite,0)
SetObjectVisible(arrow,1)
SetCameraPosition(cam,GetObjectX(terrain),GetObjectY(terrain)+GetObjectSizeMaxX(terrain)*1.45,GetObjectZ(terrain))
SetCameraRotation(cam,90,0,0)
SetCameraAspect(cam,1)
ClearScreen()
SetSpriteImage(rendersprite,rendertex,0)
Render()
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx set render to main screen
SetRenderToScreen()
SetCameraAspect(cam,width#/height#)
setspritevisible(rendersprite,1)
SetObjectVisible(arrow,0)
SetCameraRotation(cam,camAngleX#,GetObjectAngleY(player),0)
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
mouseX# = (GetRawMouseX()-width#/2)*0.2
mouseY# = (GetRawMouseY()-height#/2)*0.2
RotateCameraLocalX(cam,mouseY#)
camAngleX#=GetCameraAngleX(cam)
RotateObjectLocalY(player,mouseX#)
SetCameraRotation(cam,camAngleX#,GetObjectAngleY(player),0)
If GetCameraAngleX(cam)>80 Then SetCameraRotation(cam,80,GetCameraAngleY(cam),0)
If GetCameraAngleX(cam)<-80 Then SetCameraRotation(cam,-80,GetCameraAngleY(cam),0)
SetCameraPosition(cam,GetObjectX(player),GetObjectY(player)+3,GetObjectZ(player))
SetObjectPosition(arrow,GetObjectX(player),GetObjectY(player)+3,GetObjectZ(player))
SetObjectRotation(arrow,90,GetObjectAngleY(player),0)
if GetRawMouseLeftState()
MoveObjectLocalZ(player,2)
endif
if GetRawMouseRightState()
MoveObjectLocalZ(player,-2)
endif
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SetRawMousePosition(width#/2,height#/2)
framerate=ScreenFPS()
Print(framerate)
Print("use mouse")
Sync()
if GetrawKeyPressed(27) then exit
loop
Never play leap frog with a unicorn.