Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Paul Smith

#1
I can't seem to use strings. This won't compile 
}, url$);  or {, url_Str);
The version I was supposed to show was  }); that just opens a new tab. It does compile but just a blank page.

This code does work and will open the correct page, strange thing is the // shows as comments after the https: but compiles fine.

INLINE
        EM_ASM({
       window.open('https://www.glbasic.com', '_blank');
    });
   ENDINLINE

Hope this helps
#2
Not used that command, but others like NETWEBEND dont work.

I've been short on time this month and was looking into using alternative inline for NETWEBEND. I have two methods that need Ironing out. This code is from a google search. And needs formatting correctly.

    INLINE
    #include <emscripten.h>
    emscripten_run_script("window.open(\"" + url$ + "\", \"_blank\");");
    ENDINLINE

the other is

INLINE
    #include <emscripten.h>

    EM_ASM_({
        window.open(url, '_blank');  // Open the URL in a new tab
    }, url$);
   
    ENDINLINE

Not tried the first one but the second one opens a page, just not the right link.  :D
Hopefully someone smarter than me will fix this is seconds.


#3
I think Wiki needs an update to keep it current.
#4
Confirmed your Bleep does not work on Android Firefox.

I noticed firefox can be a little particular with sound as can Chrome, I tried a few settings for a bleep and in the end I used WAV 8/16bit 16/22/41 khz stereo(Mono didn't work) and these works on all platforms so far.

My Key click sound works on Firefox on my android.

https://paulsmith6175gmailcom.itch.io/bc

This is a work in progress and once its sorted I will create a thread with all the little things I discovered on my journey like how to get the full phone resolution not the 360x760ish, Audio formats, reading the screen width and height
#5
I love it when updates and fixes are being worked on, But I have the same question as Qedo. Does a push to GIT mean it will start to roll out on a STEAM update or do we have to do something manually?
#6
Thanks Qedo. I think now it maybe because I have stuff open its trying to alter when compiling.
#7
Just reinstalled all my Steam stuff from Drive C to Drive D (free up my small 240g NVMe), I've installed HTML5Extras and know the HtmlPost script works as it shows in the console.
The problem I think I have is with HTML5Extra. If I use CheckCanvasSize() it returns with call to undefined function.

I know I could add it to my code and remove the DPRINT commands etc. But would love to know where i've gone wrong.
I dont think I got it working when it was on drive C and one of the reasons I reinstalled incase I corrupted something.

slightly off topic sometimes when I compile for Windows, the console shows LEAF duplicated ( or something similar ) but works. Any Ideas what this is?
#8
https://paulsmith6175gmailcom.itch.io/bc

If anyone want to report what their touchscreen stops at on a mobile
#9
Hi Spacefractal, been reading this thread again and you mentioned you solved the canvas size checking and resizing. I've installed your tool.zip again as some how it reverted back. I'm still getting 0,0 from GETSCREENSIZE and 300,150 from GETDESKTOPSIZE.

@gernot did you have time implement the HTML5 changes in an update? or is it on your todo list.

*UPDATE* In project options you can manually change the resolution to what you want rather than the listed ones in the dropdown.
Something I never knew. ( I bet everyone else did :). This now shows in GETSCREENSIZE in HTML.
300,150 still in GETDESKTOPSIZE.

The problem is Android has scaling like windows, so a canvas as 480x900 shows as 360,790 unless you go into the android display and change it to small.

#10
Off Topic / Re: how well :-D
2024-Jul-29
For me its 2 projects
This one is an educational tool, its an European intruder alarm keypad so learner can practice in preparation for there final exam. it 90% complete and the version linked below is not the latest and is full of bugs.
https://paulsmith6175gmailcom.itch.io/epa-pyronix-prep

engineer code is 1111 if you want to play.

The other I've just started is to work out the battery capacity requirements of Fire / Security systems.
All my student have Iphones so its all targeted for HTML5.
just working on the screen rescale but GLBasic respondes with 0s or 300,150 using GETSCREENSIZE or GETDESKTOPSIZE when compiled for HTML. Anyone knows a better way let me know.
#11
I use a 4K screen and I can adjust the font size to suit but the Icons toolbar is unreadable. I think it needs updating as the windows scaler also causes it problems.
#12
Thanks guys, I selected 800x480 in the project options. used Itch.io to force landscape mode and fullscreen.
Android rotates the screen and goes into fullscreen, Ios just rotates the screen. Browsers show the 800x480, android and Ios show 800x360.
I just rewrote the bit of code and made sure is all fits 800x360.

Just struggling re-writings the same code multiple ways. Its the same buffer problem I had that spacefractal solved for me last time to stop multiple clicks. However its not working for this.
Im making a menu with numbers you click, it require 4 numbers to be entered, but if I press 7 i get four 7s.

I miss my while/wend loops.

#13
Thanks Spacefractal. 

I spent 15min messing with the Itch.io settings and it allows apps other then games to be hosted which is what I need.. I am going to have to re-write most of my program due to using a fixed resolution and general poor programming. I find writing for HTML5 far more difficult, having no examples to learn from doesn't help. I even don't understand the code I wrote years ago :o
#14
Hi Spacefractal

How do you get the phone browser to force rotation and full screen in your games?
#15
Thanks this worked. So simple, I started off with something similar but it got out of hand with frustration. :nw:
Going to add it to the playsound so its not  being called 3-5 times a push.