GLBasic forum

Main forum => GLBasic - en => Topic started by: ampos on 2018-Oct-04

Title: What is HTML5 and what can I do?
Post by: ampos on 2018-Oct-04
Hi!

I have been a bit disconnected from GLBasic for the last 5-6 years, so excuse me if my question seems stupid.

What is HTML5 exactly? Perhaps the name "hmtl" confuses me... HMLT, as far as I know, is the language in which the web pages are done, and its like a ascii text with a .htm at the end.

My problem is that I need to do a little utility to be run in a web page (if you are interested, some thing like this: https://galleries.iws.imaxel.com/gallery/S4SNgM3TY2PMrZkPwjApZg/set/43tWzx8M5Dd1/home (https://galleries.iws.imaxel.com/gallery/S4SNgM3TY2PMrZkPwjApZg/set/43tWzx8M5Dd1/home) or https://mykiosk.io (https://mykiosk.io)) and I wonder if it could be done in GLBasic html5 compiler. It has to run in iOS (safari...), Android (chrome?) and desktop.

I can do most of the programming, but I want to know if it can be done before wasting my time trying to program something that can not be done. (I have another questions, like ftp upload and image file requester, but this would be for later).
Title: Re: What is HTML5 and what can I do?
Post by: MrPlow on 2018-Oct-05
Hi Ampos

For something like what you just linked to GLB is not ideal for it and neither are most other HTML5 game engines.

You can do that with HTML, Javascript and JQuery or JQuery mobile (or other javascript frameworks)

You can perform your testing on localpages or using something like jsfiddle.net - which I use a fair bit.

You most likely need to learn javascript or jquery (easier)

Hope this helps...




Title: Re: What is HTML5 and what can I do?
Post by: r0ber7 on 2018-Oct-09
https://html5gameengine.com/ (https://html5gameengine.com/)
Title: Re: What is HTML5 and what can I do?
Post by: MrPlow on 2018-Oct-10
Babylon looks nice
Title: Re: What is HTML5 and what can I do?
Post by: dreamerman on 2018-Oct-14
In general HTML5 is just next iteration of standards for web development in browser based environment (end client). Previously many advanced features like video playback, 2d/3d graphic, audio needed external plugins (Flash/Java) or browser specific extensions/coding, so that complicated cross platform app/page coding. Now with standards brought by HTML5 and it support from all web browser developers you can use one code base to have you site with same features on all modern browsers. Like for example Canvas for 2d graphics or WebGL for 3d stuff. It’s up to browser devs to have all such features to work properly.
Taking that into consideration, as MrPlow already specified, you should use JavaScript and one of many popular JS libs like Jquery, that have many webpage / app features already built-in. There is really ton of it, but I’m not an expert so can’t advise what would best fit your needs.
As development tools you can use for example VS Code / Brackets as editor, Xampp for server.

Title: Re: What is HTML5 and what can I do?
Post by: spacefractal on 2018-Nov-10
the best for glbasic in future is really to do a good html5 javascript port, which can been base for ports for various platforms. The reason is native code has been quite annoying to meanstream and cause a lots of annoying updates to catch up the changes.

html5 could been a good platform as base for ports to extracty iOS, Android and other platforms. The platform here should been much better than its have been in recent years as well we have much better performing platforms as well.

Howover with HTML5 in mind, newer Android versions would been required, property Android 5 or 6 and up.
Title: Re: What is HTML5 and what can I do?
Post by: r0ber7 on 2018-Nov-16
If I make a web game some day, it will probably be in Phaser (assuming it still exists by then).

http://phaser.io/examples/v2/category/arcade-physics (http://phaser.io/examples/v2/category/arcade-physics)
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Nov-17
I left a little upset some time ago  =D But I worked on GLBScript (aka 123basic, thank you metzzo for your very very good job), I'm worked on it a while ago, and fixed a lot of bugs.
I have not been working on it for a long time, but for 2D, it works very well. Very adaptable.
I even thought to make a webgl version with pixi.js and in the future three.js.

Maybe a solution for the GLB community.

Title: Re: What is HTML5 and what can I do?
Post by: erico on 2018-Nov-17
I tried your files, the html only displayed a black screen, the .exe worked fine.
Am I doing something wrong? I use chrome.
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Nov-17
Work fine on last firefox. But Firefox has an internal web server.

Title: Re: What is HTML5 and what can I do?
Post by: MrPlow on 2018-Nov-17
I uploaded the files and rotate sprite works!
Title: Re: What is HTML5 and what can I do?
Post by: dreamerman on 2018-Nov-20
Works without problems on local apache server/xampp.. This is a little off topic but what's current status of 123script? As GitHub sources are 3+ years old, I didn't test them, but if it can use Polyvector and more complex code that could be good alternative solution for hmtl5 target output.
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Dec-29
2.5D test ... Works fine online or with a browser with an internal web server (like firefox).

Happy New Year everyone, GLB is the BEST !
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Dec-29
2D with sound test... Works fine online or with a browser with an internal web server (like firefox).
Yes I repeat, but it's in case the comments disappear. This often happens on this forum  ;)

GLB + HTML5 is the BEST !

PS : The Javascript source code is not obfuscated for this sample.
Title: Re: What is HTML5 and what can I do?
Post by: Qedo on 2018-Dec-29
In fact GLB + HTML5 works.
See this simple calculator for runners I wrote for testing

http://ebianchi.byethost32.com/STUFF/HTML5/MEDIA/media.html

HAPPY NEW YEAR TO EVERYONE
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Dec-29
Qedo what's the problem ?

GLB works fine with HTML5 ?  It's cool ... Make an application for Android or IOS will not be a problem then.

My samples is just for the communauty.

Title: Re: What is HTML5 and what can I do?
Post by: Qedo on 2018-Dec-29
You did not understand, I'm saying the opposite and that GLB + HTLM5 works
Title: Re: What is HTML5 and what can I do?
Post by: Snoopy on 2018-Dec-31
Yes I understood so it's useless that I continue to work on a HTML5 translator if everything works well already (and therefore that there is no problem for Android and IOS apps).
If it's useless for the community, I stop, I have something else to do  ;)
Thank you Qedo for informing me  :good:
Title: Re: What is HTML5 and what can I do?
Post by: Qedo on 2018-Dec-31
But your commitment is welcome.
We always need to learn about the HTML world and understand how we GLB users can use it.
I thank you and I hope in your other projects.
HAPPY NEW YEAR TO EVERYONE
Title: Re: What is HTML5 and what can I do?
Post by: dreamerman on 2018-Dec-31
Nope, built-in html5 target for GLBasic works only with simple stuff, it's rather germ of what it could be. It works with tutorials, basic showcase projects.
At least in my feeling, throw any larger project, complicated code and that will crash. As code is compiled with emscripten, obfuscated and packed into binary (or whatever that process is called) there is no simple way to trace bugs, make workarounds and so on..
For example, for drawing I'm using only PolyVectors, with render2texture/page drawing for some effects all code written in GLB, working even on android, crashing with html5.
Current html5 target may be sufficient for someone, but at least I would be interested in any working alternative :-) Maybe not as main target/platform, but rather additional/bonus, but it would be nice if it could be also used to port games to other not supported platforms.

Happy New Year ;-)
Title: Re: What is HTML5 and what can I do?
Post by: Qedo on 2018-Dec-31
But you are sure? some examples?
Title: Re: What is HTML5 and what can I do?
Post by: spacefractal on 2019-Jan-06
Im believe Gernot is testing a newer SDK for this, still not working but is working with it. A good JavaScript/HTML5 target can give better possible for doing ports to various targets. Such as the depreacted iOS using PhoneGap or such wrapper. This is my main personally hope.

Linux and mac ports could also been do something similar. The platform has been better in the recent years.