Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Fraxter3D Demo: Mandelbox Navigator

  1. #1

    Fraxter3D Demo: Mandelbox Navigator

    Hello community,

    I'd like to submit this TBGL+GLSL project as my contribution to thinBasic's code base. It isn't particularly Christmas-looking but I'm absolutely sure many of you will have quite a few pleasant moments flying through this beautiful oasis of stunning shapes and amazing colors.

    Despite its limited features, Fraxter3D Demo runs perfectly well for me and I hope it will run OK on your platforms too:





    This demo's big brother Fraxter3D Full can be found on the FBSL forum. It comes in a zip with full sources, compiled executable, and a bunch of loadable shaders for everyone to enjoy:





    Merry Christmas and a happy New Year, friends!
    Attached Files Attached Files
    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Holy monkey,

    this might the most impressive demo here up to date!


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Member sblank's Avatar
    Join Date
    Feb 2010
    Location
    Wayne City, Illinois
    Posts
    80
    Rep Power
    23
    I agree with Petr... really, really nice demo!

    Stan

    Quote Originally Posted by Petr Schreiber View Post
    Holy monkey,

    this might the most impressive demo here up to date!


    Petr

  4. #4
    Thanks gentlemen,

    It was my pleasure to share it with the thinBasic community. Do not hesitate to load the FBSL version too even if it's written in another language. The syntax isn't much different so that somebody may eventually go as far as extending the demo to a complete port. I don't have time enough to do it myself unfortunately though I'm planning to go on working on this project some time in the future if my time schedule permits.

    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Dear Mike,

    thanks so much for this astonishing script. It goes so far from my imagination of possible scripts made with thinBasic.
    It is so fascinating to navigate inside/in/out/up/down such beautiful math structures ... wow

    I have one question: when I use arrow keys to move inside the 3D world I get a "beep" at every key pressing.
    I didn't see any "beep" command inside the code and I searched all around my thinBasic development source code to see if I left some "beep" somewhere but I didn't find any.
    Maybe for some reasons it can come from the graphic card ?

    Ciao and thanks again
    Eros
    Attached Images Attached Images
    Last edited by ErosOlmi; 30-12-2013 at 10:29.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Eros!,

    I think the beeping is related purely to windows GUI, try to run the script below and press A,D... you will get beep. Try to press W, S - no beep.
    Uses "UI"
    
    ' -- ID numbers of controls
    Begin ControlID
      %cCanvas
      %bClose  
    End ControlID    
    
    Begin Const
      %MAIN_WIDTH   = 320
      %MAIN_HEIGHT  = 240
    End Const
    
    ' -- Create dialog here
    Function TBMain()
      Local hDlg As DWord
    
      Dialog New Pixels, 0, "Beep",-1,-1, %MAIN_WIDTH, %MAIN_HEIGHT, _
                    %WS_POPUP Or %WS_VISIBLE Or %WS_CAPTION Or %WS_SYSMENU Or %WS_MINIMIZEBOX To hDlg
      
      ' -- Place controls here
      Control Add Button, hDlg, %bClose, "Click to clo&se", %MAIN_WIDTH-105, %MAIN_HEIGHT-30, 100, 25
      Control Add Button, hDlg, %bClose+1, "&Wow", 10, %MAIN_HEIGHT-30, 100, 25
    
      Dialog Show Modal hDlg, Call cbDialog
    
    End Function
    
    ' -- Callback for dialog
    CallBack Function cbDialog()
    
      
    
      ' -- Test for messages
      Select Case CBMSG
    
        Case %WM_INITDIALOG
        ' -- Put code to be executed after dialog creation here
    
        Case %WM_COMMAND
        ' -- You can handle controls here
    
        Select Case CBCTL
        
          Case %bClose
            If CBCTLMSG = %BN_CLICKED Then
              Dialog End CBHNDL
            End If
        
        End Select
    
    
        Case %WM_CLOSE
        ' -- Put code to be executed before dialog end here
    
      End Select
    
    End Function
    
    I think Windows tries to tell the user there is not control which has &<letter> associated. Because I put &W and &s in the buttons, these keys don't beep, other letters will do.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7
    Dear Eros,


    Thanks a lot for your warm words of appreciation! There are very many beautiful visuals in thinBasic already so my submission will only make its existing code base just a little richer.

    Yes, now that I've turned my audio gear on, I do hear these ugly beeps you mention which I've overlooked before as I usually prefer to concentrate on my work in complete silence. IMO they appear because TB's forms are Dialogs. FBSL forms are just raw windows. Dialogs have prebuilt keyboard response logic while raw windows haven't.

    From this standpoint, Petr is correct in his findings. Since there isn't any control on Fraxter3D Demo's main dialog that's responsive to WASD key presses explicitly, the OS reports back with a system beep. Perhaps it might've been suppressed by putting some invisible dummy control on the main dialog that the WASD presses would sink in silently.

    I'm sorry for not noticing the bug in time. If somebody else of the peers has the nerve to experiment with my code some more in order to fix it, I would only be glad and thankful but I don't have enough time personally for that at the moment.


    Have a Happy New Year, Eros, and good luck with your wonderful project!

    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

  8. #8

    error

    a) the fraxter demo doesn't work here on my machine (win xp amd notebook), there's an error with "glcreateshader()", see screenshot. perhaps a fil is missing or updated tbgl version? I've downloaded last thinbasic 1.9.11.0.

    b) it's not very easy to find a link to last thinbasic version at this entry thinbasic website.

    bye, maurice
    Attached Images Attached Images

  9. #9
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    There is no checking for GLSL support in the example, it could be easily added by testing the handle value in GLSLInit function.

    I personally prefer CG over GLSL - it has a bit better support on older cards, especially Intel based ones, which is your case, I presume.


    Petr

    P.S. Mike, I discovered your note about my wrong declaration of uniform. Post a bug report or send me PM next time please, I found it by accident and could easily miss it.
    I just sent corrected version to Eros, fix will be present in next release.
    Last edited by Petr Schreiber; 15-01-2014 at 13:44.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  10. #10
    @Maurice

    It is my fault as I overlooked to notify the TB audience like I usually do on the FBSL forum that this is a GLSL script and it needs GLSL support and a very good video card to run satisfactorily. I also regret to say that unfortunate owners of on-board SiS video chips will probably be never able to run GLSL-based scripts on their laptops at all.

    @Petr

    I wasn't stressing this nuisance because it was easy to bypass. The solution didn't add noticeable overhead and the inaccurate declaration was just a nuisance rather than outstanding bug.

    OTOH there is also a glitch in TBGL proper that IMHO may be regarded as an ineffective implementation of the library's key function. I'm talking about the TBGL_ShowCursor() toggle which is criticized in the main project file, Fraxter3Demo.tbasic.

    Matter is, MS Windows' ShowCursor() API maintains an internal count of cursor toggles whereby the cursor may be shown or hidden only if the current number of off's is equal to the current number of on's for the entire lifetime of an application. The API is a black box except for its return value (difference between on's and off's) and cursor visibility cannot be queried directly either.

    The only way to guarantee programmatically 100% that the cursor will be switched on or off at a given point in time is to implement the toggle as follows:

    Sub CursorOn()
      While ShowCursor(%TRUE) < 0: Wend
    End Sub
    
    Sub CursorOff()
      While ShowCursor(%FALSE) >= 0: Wend
    End Sub
    
    TBGL's cursor toggle doesn't seem to be aware of that and behaves as if it would always rely on a single call to ShowCursor(%TRUE) to pop the cursor, and on a single call to ShowCursor(%FALSE), to hide it. This is of course not correct in a general sense. If this is how the cursor toggle is actually implemented in TBGL then it is a design fault that will be causing program malfunction and therefore should be fixed as soon as possible.

    Regards,
    Last edited by mike lobanovsky; 15-01-2014 at 15:42.
    Mike
    (3.6GHz i5 Core Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, x64 Windows 7 Ultimate Sp1)

Page 1 of 2 12 LastLast

Similar Threads

  1. Stick Demo
    By peter in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 0
    Last Post: 14-05-2013, 13:30
  2. Sdl Demo
    By peter in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 6
    Last Post: 13-05-2013, 16:54
  3. Fern Demo
    By peter in forum TBGL module by Petr Schreiber
    Replies: 4
    Last Post: 08-10-2012, 17:41
  4. Art Thankies Demo 1.1a
    By Lionheart008 in forum TBGL Scripts and Projects
    Replies: 7
    Last Post: 23-04-2009, 18:54
  5. Demo
    By peter in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 10
    Last Post: 12-03-2009, 15:39

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •