Here: (put the attached font in the same directory with this code)
`just a reminder
IF YOU_USE_THIS_CODE_GIVE_ME_CREDITS_OR = 1
ELSE WHO_CARES = 0
ENDIF
`-------------------
scrWidth = Screen Width()
scrHeight = Screen Height()
GLOBAL imgWriteWhatW = 16 : imgWriteWhatH = 16 : s = 0.5
GLOBAL Alphabet = 1000
REM GRAB IMAGE FONTS
img = free_image()
LOAD IMAGE "w_fm2.png", img, 1
PASTE IMAGE img, 0, 0
rem Grabs the symbols and puts them in memory as seperate images
for a=65 to 74 : `first row
get image Alphabet + a, 2+(a-65)*imgWriteWhatW, s, imgWriteWhatW+(a-65)*imgWriteWhatW,imgWriteWhatH,1
next a
for a=75 to 84 : `second row
get image Alphabet + a, 2+(a-75)*imgWriteWhatW, imgWriteWhatH+s, imgWriteWhatW+(a-75)*imgWriteWhatW,(imgWriteWhatH*2),1
next a
for a=85 to 90 : `third row
get image Alphabet + a, 2+(a-85)*imgWriteWhatW, (imgWriteWhatH*2)+s, imgWriteWhatW+(a-85)*imgWriteWhatW,(imgWriteWhatH*3),1
next a
for a=48 to 57 : `fourth row
get image Alphabet + a, 2+(a-48)*imgWriteWhatW, (imgWriteWhatH*3)+s, imgWriteWhatW+(a-48)*imgWriteWhatW,(imgWriteWhatH*4),1
next a
get image Alphabet + 46, 2+(8*imgWriteWhatW), (imgWriteWhatH*2)+s, imgWriteWhatW*9,(imgWriteWhatH*3),1
delete image img
SYNC ON : BACKDROP ON
SYNC
REM SOME GOSUB HERE TO LOAD SOMETHIN
GET_LOADING_OBJECTS("LOADING MODELS") : SYNC
REM SOME GOSUB HERE TO LOAD SOMETHIN
GET_LOADING_OBJECTS("LOADING IMAGES") : SYNC
REM SOME GOSUB HERE TO LOAD SOMETHIN
GET_LOADING_OBJECTS("LOADING SOMETHING IMPORTANT") : SYNC
GOSUB Camera_Setup
position object objCamera, 500, 10, 500
`Make matrix 1,1000,1000,50,50
GET_LOADING_OBJECTS("CREATE MATRIX") : SYNC
SYNC ON
DO
ImgWrite("LOW FPS IS NOT BECAUSE OF THE IMAGES",5,5)
ImgWrite("ITS BECAUSE OF THE WIREFRAME MATRIX",5,21)
ImgWrite("SPEED " + Left$(str$(camMoveSpeed#),4),scrWidth-scrWidth, scrHeight-(imgWriteWhatH))
ImgWrite(str$(screen fps()), scrWidth-(imgWriteWhatW*2), scrHeight-(imgWriteWhatH))
GOSUB camera_Free_Loop
SYNC
LOOP
`---------CAMERA DUMMY OBJECT----------
Camera_Setup:
objCamera = free_object()
MAKE OBJECT BOX objCamera, 5, 5, 5 : HIDE OBJECT objCamera
camMoveSpeed# = 1.0
RETURN
`---------PROGRAM CAMERA LOOP----------
camera_Free_Loop:
if shiftkey() > 0
inc camMoveSpeed#, 0.1
if camMoveSpeed# => 10.0 then camMoveSpeed# = 10.0
else
if camMoveSpeed# > 1.0
dec camMoveSpeed#, 0.1
if camMoveSpeed# =< 1.0 then camMoveSpeed# = 1.0
endif
endif
if keystate(17)=1 then MOVE OBJECT objCamera, camMoveSpeed#
if keystate(30)=1 then MOVE OBJECT LEFT objCamera, camMoveSpeed#
if keystate(31)=1 then MOVE OBJECT objCamera, -camMoveSpeed#
if keystate(32)=1 then MOVE OBJECT RIGHT objCamera, camMoveSpeed#
rem camera rotation
camAngX# = wrapvalue((mousemovey() / 2.0) + camAngX#)
camAngY# = wrapvalue((mousemovex() / 2.0) + camAngY#)
rem stops mouse from going upside down
if camAngX# > 80 and camAngX# < 180 then camAngX# = 80
if camAngX# > 180 and camAngX# < 310 then camAngX# = 310
ROTATE OBJECT objCamera, camAngX#, camAngY#, object angle z(objCamera)
camPosX# = object position x(objCamera)
camPosY# = object position y(objCamera)
camPosZ# = object position z(objCamera)
camAngX# = object angle x(objCamera)
camAngY# = object angle y(objCamera)
camAngZ# = object angle z(objCamera)
POSITION CAMERA 0, camPosX#, camPosY#, camPosZ#
ROTATE CAMERA 0, camAngX#, camAngY#, object angle z(objCamera)
RETURN
`---------------------------------------------------------
`TODO IMPROVE THE LOADING FUNCTION
Function GET_LOADING_OBJECTS(Entry As String)
x = Screen Width() / 2.0 - Len(Entry)/2*imgWriteWhatW
y = Screen Height() / 2.0
ImgWrite(Entry, x, y)
WAIT 3000
EndFunction
`---------------------------------------------------------
Function free_image()
Repeat
Inc i
Until Image Exist(i) = 0
EndFunction i
`---------------------------------------------------------
Function free_object()
Repeat
Inc i
Until Object Exist(i) = 0
EndFunction i
`---------------------------------------------------------
Function ImgWrite(writeWhat$, x, y)
for a=1 to len(writeWhat$)
nr = 1000 + asc(mid$(writeWhat$,a))
if image exist(nr)=1 then paste image nr,x+(a-1)*imgWriteWhatW,y,1
next a
EndFunction
`---------------------------------------------------------