Search found 446 matches

by coco2
Wed Dec 24, 2025 5:18 am
Forum: Coding Questions
Topic: Initialising 3D changes screen behaviour
Replies: 9
Views: 379

Re: Initialising 3D changes screen behaviour

I'm using Windows 11 with a ultrawide screen 1.5x scaling.
by coco2
Wed Dec 24, 2025 4:48 am
Forum: Coding Questions
Topic: Initialising 3D changes screen behaviour
Replies: 9
Views: 379

Re: Initialising 3D changes screen behaviour

Fun little game, althought I had to change line 445 to:

Code: Select all

OpenWindowedScreen(WindowID(#MAINWINDOW_H),0,0,WindowWidth(#MAINWINDOW_H)*DesktopResolutionX(),WindowHeight(#MAINWINDOW_H)*DesktopResolutionY(),#AUTOSTRETCH_ON,0,0,#SCREEN_FLAGS)
by coco2
Wed Dec 24, 2025 4:26 am
Forum: Coding Questions
Topic: Initialising 3D changes screen behaviour
Replies: 9
Views: 379

Re: Initialising 3D changes screen behaviour

Ok thanks, I think I know what I need to do now. I'm creating a "retro" 3D game engine where it renders the 3D world, then enlarges it so the pixels are some multiple. ClearScreen() was causing the problem.
by coco2
Wed Dec 24, 2025 4:16 am
Forum: Coding Questions
Topic: Initialising 3D changes screen behaviour
Replies: 9
Views: 379

Re: Initialising 3D changes screen behaviour

I couldn't get that working, can you show me?


Define Quit.i = 0
InitEngine3D()
InitSprite()
OpenWindow(0, 0, 0, 256, 256, "Test Window", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 256, 256)
CreateCamera(0, 0, 0, 100, 100)
CameraBackColor(0, #Black ...
by coco2
Wed Dec 24, 2025 1:34 am
Forum: Coding Questions
Topic: Initialising 3D changes screen behaviour
Replies: 9
Views: 379

Initialising 3D changes screen behaviour


;InitEngine3D()
InitSprite()
OpenWindow(0, 0, 0, 256, 256, "Test Window", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 256, 256)
Repeat
Event = WindowEvent()
Delay(1)
ClearScreen(#Blue)
FlipBuffers()
Until Event = #PB_Event_CloseWindow



This code ...
by coco2
Tue Dec 02, 2025 10:12 pm
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Re: Updated controller support

Why does SDL2 correctly detect one controller with the correct name "Xbox One S Controller"?
by coco2
Tue Dec 02, 2025 9:33 pm
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Re: Updated controller support

When connecting an Xbox One controller via bluetooth it's seen as two controllers:

Code: Select all

Initialise: number of joysticks: 2
  Joystick 0: Bluetooth LE XINPUT compatible input device
  Joystick 1: XBox 360 controller 1
How do we fix that?
by coco2
Wed Nov 26, 2025 8:33 pm
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Re: Updated controller support

I tried working with SDL2 but I couldn't get it to read the GUID of the controller. If I had the GUID I could remember configurations every time the controller is connected. But I couldn't work out how to do that.
by coco2
Tue Nov 25, 2025 9:49 pm
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Re: Updated controller support

Hi Kenmo,
I still have the SDL2 wrapper but I would prefer if PureBasic had a good library built in, because I'm not so good at working with external libraries. I will take a look at your SDL3 wrapper, thank you.
by coco2
Tue Nov 25, 2025 8:51 am
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Re: Updated controller support

Thanks for the tip, I didn't know that pad meant access to all of the controls.
by coco2
Tue Nov 25, 2025 8:30 am
Forum: Feature Requests and Wishlists
Topic: Updated controller support
Replies: 12
Views: 1627

Updated controller support

The current controller/joystick support reads 3 analogue axes, but all modern controllers have 6 (left stick, right stick and triggers). Also there are more buttons I think.
by coco2
Thu Mar 20, 2025 10:16 pm
Forum: Coding Questions
Topic: Flickering in GUI application
Replies: 11
Views: 803

Re: Flickering in GUI application

I am using a full screen canvas so I can capture the mouse dragging. Unless there is some other way of capturing dragging?
by coco2
Thu Mar 20, 2025 10:11 pm
Forum: Coding Questions
Topic: Flickering in GUI application
Replies: 11
Views: 803

Re: Flickering in GUI application

Is there any way of capturing mouse button down (not click) on the window without a gadget?
by coco2
Thu Mar 20, 2025 10:07 pm
Forum: Coding Questions
Topic: Flickering in GUI application
Replies: 11
Views: 803

Re: Flickering in GUI application

It's OK, my entire code is ~5000 lines.

I think the problem is I am drawing a full screen canvas then drawing all my gadgets on top of that.

I will try to do it another way. And also I will try to draw to an image and paste the image on the window.
by coco2
Thu Mar 20, 2025 9:26 pm
Forum: Coding Questions
Topic: Flickering in GUI application
Replies: 11
Views: 803

Re: Flickering in GUI application


Procedure WindowResize()
Protected width.i = WindowWidth(0)
Protected height.i = WindowHeight(0)
StartDrawing(CanvasOutput(0))
Box(0, 0, 130, 300, RGB(200, 200, 200))
StopDrawing()
ResizeGadget(1, 150, 0, Width-150, height)
StartDrawing(CanvasOutput(0))
Box(0, 0, 130, 50, RGB(255, 0, 0 ...