Recent posts

#1
can anyone send the imput source? it would be an appreciated  :good:
thank you
#2
Tutorials / Re: Chat.GPT
Last post by Qedo - 2023-Nov-22
Great, but Chat.GPT needs to study the syntax of Glbasic better  =D
#3
Tutorials / Re: Chat.GPT
Last post by MrPlow - 2023-Nov-20
Hi I asked GPT to create GUI menu in GLBasic and it gave me

Code (glbasic) Select
// Set the screen dimensions
SCREEN 800, 600, 0, 2

// Define menu constants
CONST MENU_ITEM_HEIGHT = 50
CONST MENU_TEXT_SIZE = 20

// Define menu items
GLOBAL menuItems[2] = ["Option 1", "Option 2"]
GLOBAL selectedMenuItem = -1

// Main loop
WHILE TRUE
  // Clear the screen
  CLS RGB(255, 255, 255)

  // Draw menu items
  FOR i = 0 TO UBOUND(menuItems)
    LOCAL itemY = i * MENU_ITEM_HEIGHT + 10
    RECT 10, itemY, 790, itemY + MENU_ITEM_HEIGHT, RGB(200, 200, 200)
    PRINT menuItems[i], 20, itemY + 10, MENU_TEXT_SIZE
  NEXT

  // Check for mouse input
  LOCAL mouseX, mouseY, mouseButton
  MOUSESTATE mouseX, mouseY, mouseButton

  // Highlight the selected menu item
  selectedMenuItem = -1
  FOR i = 0 TO UBOUND(menuItems)
    LOCAL itemY = i * MENU_ITEM_HEIGHT + 10
    IF mouseX > 10 AND mouseX < 790 AND mouseY > itemY AND mouseY < itemY + MENU_ITEM_HEIGHT
      RECT 10, itemY, 790, itemY + MENU_ITEM_HEIGHT, RGB(150, 150, 150)
      selectedMenuItem = i
    ENDIF
  NEXT

  // Check for mouse click on a menu item
  IF mouseButton = 1 AND selectedMenuItem <> -1
    // Perform action based on the selected menu item
    SELECT selectedMenuItem
      CASE 0
        PRINT "Option 1 selected", 400, 300
      CASE 1
        PRINT "Option 2 selected", 400, 300
    END SELECT
    SLEEP 1000  // Display the message for a short time
  ENDIF

  // Refresh the screen
  SHOWSCREEN
WEND

// End the program
END



Needed some fixing but the example was close -  :o

Code (glbasic) Select
SUB main2:
LOADFONz("bigscore.png",1)
SETFONT 1
// Set the screen dimensions
//SCREEN 800, 600, 0, 2

// Define menu constants
CONSTANT MENU_ITEM_HEIGHT = 50
CONSTANT MENU_TEXT_SIZE = 20

// Define menu items
GLOBAL menuItems$[]
DIM menuItems$[2]
menuItems$[0]="Option 1"
menuItems$[1]="Option 2"
GLOBAL selectedMenuItem = -1

// Main loop
WHILE TRUE
  // Clear the screen
  CLEARSCREEN RGB(255, 255, 255)

  // Draw menu items
  FOR i = 0 TO LEN(menuItems$[])-1
    LOCAL itemY = i * MENU_ITEM_HEIGHT + 10
    DRAWRECT 10, itemY, 790, itemY + MENU_ITEM_HEIGHT, RGB(200, 200, 200)
    PRINT menuItems$[i], 20, itemY + 10, MENU_TEXT_SIZE
  NEXT

  // Check for mouse input
  LOCAL mouseX, mouseY, mouseButton,mb2
  MOUSESTATE mouseX, mouseY, mouseButton,mb2

  // Highlight the selected menu item
  selectedMenuItem = -1
  FOR i = 0 TO LEN(menuItems$[])-1
    LOCAL itemY = i * MENU_ITEM_HEIGHT + 10
    IF mouseX > 10 AND mouseX < 790 AND mouseY > itemY AND mouseY < itemY + MENU_ITEM_HEIGHT
      DRAWRECT 10, itemY, 790, itemY + MENU_ITEM_HEIGHT, RGB(150, 150, 150)
      selectedMenuItem = i
    ENDIF
  NEXT

  // Check for mouse click on a menu item
  IF mouseButton = 1 AND selectedMenuItem <> -1
    // Perform action based on the selected menu item
    SELECT selectedMenuItem
      CASE 0
        PRINT "Option 1 selected", 400, 300
      CASE 1
        PRINT "Option 2 selected", 400, 300
    ENDSELECT
    SLEEP 1000  // Display the message for a short time
  ENDIF

  // Refresh the screen
  SHOWSCREEN
WEND

// End the program
ENDSUB
#4
Tutorials / Re: Chat.GPT
Last post by MrPlow - 2023-Nov-20
Wow! It knows GLBasic...
Yes, I have done a few assets examples too...
#5
GLBasic - en / Re: Android 13 Update
Last post by MrPlow - 2023-Oct-27
My previous sound issue for Android 6 - 10 was a non-issue - the platform involved for testing seems to have a sound bug for those versions.

My instructions and update steps above still follow---

I am now on my 5+ app update without any hitches...(using Android Studio 3.5.3 ) =D

API 33 (Android 13) and min 23

gradle 5.4.1, gradle plugin version 3.5.4

Admob 19.4.0

Soon with try to update to admob 20.1.0

#6
GLBasic - en / Re: Dropbox links
Last post by erico - 2023-Oct-25
Nice, thanks Space!
The HTML one is on my list to try out.
#7
GLBasic - en / Dropbox links
Last post by spacefractal - 2023-Oct-23
Many of the dropbox links, mostly by me has beem removed. That is include the newer html 5 project. Most important files can been found here:

https://1drv.ms/f/s!An17V5n5xcPmlkdpjiZiVMDR1CXD?e=vVc9ua

One Drive Link

They will all been dead as im currectly moving. Sorry about it. Im havent checked all links im have done on this page. But the html5 tool link is of course changed to the new on that page.
#8
GLBasic - en / Re: Android 13 Update
Last post by spacefractal - 2023-Sep-14
no idea. also im think make sure to uses full path and check if the file exists. Its long time ago im doing Android stuff really.
#9
Bug Reports / Re: Vsync Problem?
Last post by SnooPI - 2023-Sep-10
Yes I have to force VSync from the control panel, if I leave it on the application settings it doesn't work  :(
Fortunately, I use a deltatime for everything because otherwise I would have had a big speed problem in my programs.
The strange thing is that I had no problems with VSync until a Windows update.
Thanks dreamerman for confirming that the problem is with my computer.
#10
GLBasic - en / Re: Android 13 Update
Last post by MrPlow - 2023-Sep-10
Hi Gernot, Spacefractal

Any idea why sdl mixer might not work with android 7.1 to 10 ...but 11,11,13 all are fine??