Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

Results 1 to 5 of 5

Thread: Cube_Slot_Demo1

  1. #1

    Cube_Slot_Demo1

    hello tbgl friends. this is my first little tbgl game. I have had in my mind to create a kind of slot machine last week but didn't know where to start. this project is work in progress so I placed it here at board. this is my first result, but first demo it's only for start/stopping four boxes with textures in correct horizontal line order.

    => your aim should be to get all four cubes in one straighten line. by starting the app three cubes are rotating (right top, left bottom, right bottom). F1/F11 for going on, F2/F12 for stopping boxes and F5 to stop other one

    more to come next days. the tbgl example based upon the entity example with "tbgl_customFanEntity" by petr schreiber's explorations some month ago.

    have fun with this first, very easy (level) of game

    note: 2. update of new version with a) second light source, b) fonts for bb) fps rate and bbb) mouse coordinates

    bye, largo
    Attached Files Attached Files
    Last edited by largo_winch; 07-12-2011 at 17:27. Reason: update

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,444
    Rep Power
    655
    Interesting gallery of women of science

    It seems to me the textures are a bit dark, do you use light in your scene?


    Petr
    Last edited by Petr Schreiber; 06-12-2011 at 20:04.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  3. #3
    hello petr. do you have played to get all cubes in right horizontal order (after the rules?)
    yes, the girls are really beautiful! my son looked at the soccer girl and decided to apply they for the cube faces

    a) there is from beginning a light source in my example, I add another one, so it's getting brighter.

    b) but I have problem with displaying text with

    1)
    
    TBGL_ClearFrame 
          ...
        TBGL_UseLighting %FALSE
        TBGL_UseDepth %FALSE        ' -- So text will be always rendered on top of other objects
        
        TBGL_Color 50,255,50    
          TBGL_PrintFont "FPS:"+Str$(FrameRate), 8,1,1.9 
          TBGL_PrintFont "MouseX: "+Str$(MouseX), 8,1,1.4 
          TBGL_PrintFont "MouseY: "+Str$(MouseY), 8,1,1.9 
          
          TBGL_PrintFont "Mouse3D X: "+Format$(Pos3Dx, "#.00"), 8,0, 0.0
          TBGL_PrintFont "Mouse3D Y: "+Format$(Pos3Dy, "#.00"), 8,0,-0.5
          TBGL_PrintFont "Mouse3D Z: "+Format$(Pos3Dz, "#.00"), 8,0,-1.0
          
          TBGL_PrintFont "BoxPlayerX: "+Str$(PlayerX), 8,1,4.4
          TBGL_PrintFont "BoxPlayerY: "+Str$(PlayerY), 8,1,3.9
        TBGL_UseDepth %TRUE
    
    I think I've set this block to wrong place. I've used tbgl bitmap fonts as good alternative.

    2) the BoxSlotmachine should work for next issue to rotate cube in y-axes to show different texture faces, you have to stop like a boxSlotmachine I know from a game my son is playing last week on xbox.

    bye, largo
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	boxSlot_demo1b.jpg 
Views:	46 
Size:	68.1 KB 
ID:	7677  

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,444
    Rep Power
    655
    Largo,

    without seeing complete source code, I am afraid I can't help with your text issue.

    I think one light source should be enough, when positioned correctly.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  5. #5
    I solved the problem with

    TBGL_RenderMatrix2D
        TBGL_SetActiveFont 1
        TBGL_Color 250,0,0    
        TBGL_PrintFont "mouse Coordinates: " & MouseX & " Mouse " & MouseY, 10, 335,0
        TBGL_Color 250,255,0
        TBGL_PrintFont "Frame rate is: " & FrameRate & " FPS", 10, 30,0
    TBGL_RenderMatrix3D
    
    that takes only half an hour to find the problem with adding TBGL_RenderMatrix3d at the end.

    addendum: I will change next days my tbgl example content with new "actor_entity" for better performance and overview of boxes with textures! (new edit: 15.12.2011)

    bye, largo
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	boxSlot_demo1c+fonts.jpg 
Views:	60 
Size:	65.5 KB 
ID:	7679  
    Last edited by largo_winch; 15-12-2011 at 09:37.

Bookmarks

Posting Permissions

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