i heard that O2 is already in beta stage? i maybe wrong
AFAIK, Oxygen is stilll alpha (version 0.x), there are still a few wrinkles here and there, but it is already very powerful. Charles is very quick fixing small errors that i can report, for big issues it takes longer but it is in non-stop development. Big applications are already posible. Take a look at this for example:
https://www.oxygenbasic.org/forum/index.php?topic=1946.0 I have since fixed 2 bugs in the game (not oxygen's fault) that i havent uploaded, but you will get the idea. The two bugs are that if you rotate in the first column with something blocking to the right, the pill moves left going to column zero, the second bug is that if you are going too fast and the game tries to speed up... the game gets too fast and the speed breaks. The pill stops falling, allowing to control it at will, with no gravity.
Anyway, this shows that although in an "early" stage, Oxygen already allows to do good things with it.
The game uses MANY API calls, as well as many of the BASIC features, macros and "DDT".
#COMPILE EXE
'#COMPILER pbwin
#COMPILER oxygen 0.2.6
#OPTIONS X64
'#OPTIONS developer (CONDENSES STYLES: CONSOLE, CAPTURE, DISCRETE, DEBUGTOOLS)
#DIM ALL
' ****** MANY INCLUDES HIDDEN ******
FUNCTION PBMAIN() AS LONG
CALL InitGame()
' if isfalse(TestBGM("sfx21")) then
' msgbox "Music resources could not be extracted.", %MB_ICONERROR, "The game cannot start"
' exit function
' end if
LOCAL hDlg AS DWORD
DIALOG NEW PIXELS, 0, "DrMario - " & Exe.compiler$,,,512,448, %WS_OVERLAPPEDWINDOW TO hDlg
Config.hMain = hDlg
DIALOG SET ICON hDlg, "DLGICON"
DIALOG SHOW MODAL hDlg CALL DlgProc()
END FUNCTION
CALLBACK FUNCTION DlgProc() AS LONG
STATIC HTIMER AS HANDLE
STATIC HTIMEM AS HANDLE
STATIC HFRAME AS LONG
LOCAL RC AS RECT
SELECT CASE CB.MSG
CASE %WM_INITDIALOG
Config.hiscore = 10000
Config.speed = 1
Config.level = 0
Config.music = %MUSIC_FEVER
Config.focused = -1
HVIRBG = LoadBitmap(EXE.INST, "VBIG")
HVIRSM = LoadBitmap(EXE.INST, "VSML")
HMARIO = LoadBitmap(EXE.INST, "DRMA")
HNUMBR = LoadBitmap(EXE.INST, "NUMR")
HBACKG = LoadBitmap(EXE.INST, "BACK")
HTITLE = LoadBitmap(EXE.INST, "TITL")
HSELEC = LoadBitmap(EXE.INST, "SELE")
HHIGHL = LoadBitmap(EXE.INST, "HLTH")
HENDIN = LoadBitmap(EXE.INST, "ENDS")
hTimer = SetTimer(CB.HNDL, %TIMER_REFRESHSCREEN, 20, BYVAL %NULL)
hTimem = SetTimer(CB.HNDL, %TIMER_musiccheck, 500, BYVAL %NULL)
changeGameScreen(%SCREEN_title)
'changeGameScreen(%SCREEN_ENDING)
CASE %WM_DESTROY
IF hTimer THEN
KillTimer CB.HNDL, hTimer
END IF
IF hTimem THEN
KillTimer CB.HNDL, hTimem
END IF
SLEEP 100
DeleteObject HVIRBG
DeleteObject HVIRSM
DeleteObject HMARIO
DeleteObject HNUMBR
DeleteObject HBACKG
DeleteObject HTITLE
DeleteObject HSELEC
DeleteObject HHIGHL
DeleteObject HENDIN
CASE %WM_TIMER
SELECT CASE CB.WPARAM
CASE %TIMER_musiccheck
' local temp as asciiz * 255
' stdout "CLS"
' mciSendString("status mp3file position", temp, 255, BYVAL %null)
' stdout trim$(temp)
' stdout " "
CASE %TIMER_REFRESHSCREEN
CALL execGameMechanics()
CALL GetClientRect(CB.HNDL, Rc)
hframe = 1
InvalidateRect CB.HNDL, RC, 0
CASE %TIMER_musicloop
mciSendString("seek mp3file to " & FORMAT$(Config.musicloop), BYVAL 0, 0, 0)
mciSendString("play mp3file", BYVAL 0, 0, 0)
IF Config.musictimes = 0 THEN
IF Config.mTimer THEN
KillTimer CB.HNDL, Config.mTimer
Config.musiclen = ((Config.musiclen - Config.musicloop) + Config.adjust)
Config.mTimer = SetTimer(CB.HNDL, %TIMER_musicloop, Config.musiclen, BYVAL %NULL)
END IF
END IF
INCR Config.musictimes
END SELECT
CASE %WM_KILLFOCUS
Config.focused = 0
CASE %WM_SETFOCUS
Config.focused = -1
CASE %WM_PAINT
IF HFRAME THEN
hframe = 0
drawGameFrame
END IF
END SELECT
END FUNCTION
I Havent prepared the full code but check the attached source. It compiles fine for PowerBASIC 32 bits, Oxygen 32 bits and Oxygen 64 bits.
The syntax errors that Oxygen does not yet catch, PluriBASIC does. This somewhat compensates for the alpha state of oxygen, because PluriBASIC only generates
code that has been tested to already work in Oxygen, not allowing you to code anything out of the working bounds.