IT-Berater: Theo Gottwald (IT-Consultant) > Brians Board

New "Powerbasic-like" (Syntax) X64 Compiler from BRIAN ALVAREZ?

<< < (2/2)

Brian Alvarez:

--- Quote from: Theo Gottwald on August 25, 2019, 09:06:27 AM ---When can we Beta-Test your product, Brian?
--- End quote ---

 Hopefully soon. :)

Chris Chancellor:
Thanxx a lot Brian

maybe allow me to do beta testing too, you would need someone like myself who is learning programming
to test your product, the more beta testing the better.

i heard that O2 is already in beta stage? i maybe wrong

Brian Alvarez:

--- Quote from: Chris Chancellor on August 25, 2019, 03:13:46 PM ---i heard that O2 is already in beta stage? i maybe wrong

--- End quote ---

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".


--- Code: ---#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
--- End code ---


 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.




Chris Chancellor:
Good to have a double checking features by both Pluribasic and O2 . 

 What commercial users really  do need is an IDE that can do something like in VB6 something that can create forms -- arrangement of buttons, textboxes  and dialogs for rapid software development.

We want OpenGL graphics but not like games (Dr Mario ) but  something that can replace PB Graphics and XPRINT statements


regarding PB DDTs ,  my programs already resolved this matter so this is not an issue anymore. 

So i would say that you would need to work on the IDE too for O2  (something that Chris Boss had stated many times
that he could provide but nothing showing )   ;D

Users want a RAPID development IDE , they are not interested in getting entangle with intricate codes and calling WINapi










Brian Alvarez:

 The idea is that you (at some point) will be able to use any IDE you want, Firefly, WinFBE,
JK's IDE, PB's ide, one of Chris' ones... even PB forms, with no special modifications by their
authors.

 The IDE i am using has very powerful features, for example it allows to monitor variables,
the Logcat (Android), the internal working of the guts (compilation processes for all targets),
edit core functions, sort tabs, resie panels... it even has some special mechanics to interact
with the source code (clicking keywords).

If you want you can use any other IDE though, even one that supports project structures.

 Of course, you will need to compile and link resources manually if you do that. No problem
though, PluriBASIC generates automatically an RC file for you to compile and link in case you
want to handle it yourself.

Navigation

[0] Message Index

[*] Previous page

Go to full version