Author Topic: 123 basic - HTML5 for GLBasic  (Read 113858 times)

Offline pinete

  • Mr. Drawsprite
  • **
  • Posts: 98
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #45 on: 2012-Jun-03 »
Amazing!!!!!! I cannot believe it!!!!!!

Offline theprotocol

  • Mc. Print
  • *
  • Posts: 22
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #46 on: 2012-Jun-14 »
Very impressive. Well done!

I must say though, a huge credit should go to Gernot for designing the GLBasic API in such a straightforward way. It's abstracted just the right amount, such that it's similar to native OpenGL conceptually, but much easier.

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: GLBScript - HTML5 for GLBasic
« Reply #47 on: 2012-Jun-14 »
Thanks.

But I'm not (yet) using OpenGL at all ;). HTML5 provides its own drawing functions, which are "similiar" to GLB 2D command set, but not equal. Sadly HTML5 does not provide a lot of drawing functions that GLB does. For example: Drawing of textured polygons is a pain in the ass in HTML5 - same with image tinting.

 And on the language side, there are a lot of language features that are very difficult to port to other languages (ALIAS, All types on the stack, Not static dimension count at compile time, ...).

Don't get me wrong, the API of GLBasic is awesome, but the only reason why it runs on the browser is my hard work and "perfection" :D
« Last Edit: 2012-Aug-01 by coolo »
That's no Bug, that's my project!

http://programming-with-design.at/

Offline theprotocol

  • Mc. Print
  • *
  • Posts: 22
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #48 on: 2012-Jun-15 »
Don't get me wrong, the API of GLBasic is awesome, but the only reason why it runs on the browser is my hard work and perfection :D

Of course! I'm just commenting that the GLBasic API is so nicely structured - not to discount the work that you've done.  =D

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3375
  • Integrated Brain
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #49 on: 2012-Jun-15 »
Coolo!!! when we can purchase about the "plugin" for GLbasic, you are thinked about lauch a pre - release and when 3D it´s done, launch this module?¿...

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: GLBScript - HTML5 for GLBasic
« Reply #50 on: 2012-Jun-15 »
Coolo!!! when we can purchase about the "plugin" for GLbasic, you are thinked about lauch a pre - release and when 3D it´s done, launch this module?¿...
When it's done!

I don't want to rush. I want GLBScript to be stable and working well. So it will take its time. And the plugin will also be its own "chapter". So please don't expect it too soon.

Code: (glbasic) [Select]
Fixed: LOCAL E; FOREACH E IN Arr[]; NEXT <- reused variable "E" instead of declaring a new one.
Fixed: Default seed is not 0, it is the unix timestamp
Fixed: LOCAL a; ...; LOCAL a <- does not generate buggy JavaScript code
Improved: Lexer is much faster* (8000 lines in about 8 seconds instead of 16 seconds)
Improved: Parser parses in less than 1 second
Improved: Precompiler precompiles in less than 1 second
Fixed: RND returned sometimes values out of range
Fixed: GLOBAL foo; FUNCTION Bar: LOCAL foo[]; ENDFUNCTION <- threw syntax error
Fixed: Compiler shows correct character position in errors
Improved: Again! The lexer is much optimized and does its really fast! Compiling of the compiler itself takes now around 7 seconds (from 150 seconds to 7 seconds, a huge step forward :D) - GLBScript compiling time is now as fast as GLBasic's
Improved: Type creating much faster.
Improved: Function calls much faster (unref() calls are reduced) -> needs some debugging
Fixed: GOTO works again!!
Fixed: myArray[0.5] works
Fixed: ROTOSPRITE / ROTOANIM works as expected - rotates in the middle.
Fixed: Internal array cloning works again
Fixed: FOR has variable declaration is correct
Fixed: LEN with Kerning works (but no "real" kerning is performed...)

Faster Compiling
I made the compiler now as fast as the native GLBasic compiler. It compiles 8000 lines of code in around 6 seconds on my PC. I'm quite happy about this, because a few weeks ago, compiling of 8000 lines of code took around 140 seconds.

Further I also fixed a lot things and optimized the HTML5 code!

I'm working on a little "present". I don't want to spoil too much, but GLBScript will then the first time being usable for the first time!!

Next week, I am not at home, so I can't really work on GLBScript :(
That's no Bug, that's my project!

http://programming-with-design.at/

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3375
  • Integrated Brain
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #51 on: 2012-Jun-15 »
ok Coolo, don´t care when it´s done, it´s done...
I hope stay finished before 2013, I don´t want see the world finish whitout using Html5 in GLbasic  =D =D

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 361
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #52 on: 2012-Jun-16 »
Maybe you should make a GLBasic game about the world ending and dodging meteors or something, Mental Think.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4411
    • View Profile
    • FUED
Re: GLBScript - HTML5 for GLBasic
« Reply #53 on: 2012-Jun-16 »
There should be any problem. As long as our missile commanders are put, there is nothing to fear... :-[

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: GLBScript - HTML5 for GLBasic
« Reply #54 on: 2012-Jul-19 »
Hey guys!

(Un)fortunatly Gernot has decided to make his own HTML5 target for GLBasic(would have been nice if he mentioned it before...). So I can't take the name "GLBScript" anymore, the confusion wouldn't be very good... So I have to find a new name...

In the meantime I was very busy and was not able to continue GLBScript development as far as I wanted, but I continue stadily!

Code: (glbasic) [Select]
Version: 0.4
Improved: Google Closure update
Fixed: Charset problem
Added: Experimental bitmap font system - kerning is missing!
Added: Font Kerning
Fixed: "Super" in methods functions again
Fixed: Compiler crash when using ABSTRACT
Fixed: CREATESCREEN threw "Image not yet loaded", but it was already loaded!
Added: DRAWRECT x,y,w,h,TransparentColor <- "clears" the pixel of the Screen - useful for terrain destruction in worms style!
Added: GETPIXEL - slow as hell...
Fixed: Transparency with fonts
Added: INKEY$
As you can see just minor things...

Don't wonder: The samples are not available anymore - I have to restructure my whole concept.
« Last Edit: 2012-Jul-19 by coolo »
That's no Bug, that's my project!

http://programming-with-design.at/

Offline diceless

  • Mc. Print
  • *
  • Posts: 6
    • View Profile
Re: GLBScript - HTML5 for GLBasic
« Reply #55 on: 2012-Jul-19 »
Nice, the demo worked in Opera without a hitch. I'll take that at meaning that there aren't compliance issues. Congrats!

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3971
    • View Profile
    • Space Fractal
Re: GLBScript - HTML5 for GLBasic
« Reply #56 on: 2012-Jul-19 »
I have not seen any post as gernot have ported to html5? Mightbeen he found a good compiler recently?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10829
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
GLBScript - HTML5 for GLBasic
« Reply #57 on: 2012-Jul-19 »
Hi,

sorry for the silence. I was not sure this would be possible at all, so I didn't want to look like giving empty promises. I'm using Emscripten which translates the whole C++ engine to JavaScript. It results in pretty big html pages (4MB) currently.
Feel free to use GLBScript as a name, though. Your project has a quite different target audience, I think: Mobile development in a browser.
Also GLBasic as a scripting language is something really great, that I will never be able to provide.

As for those who don't know what this is about, see my youtube account.

I apologize if I did not treat you fair here. I should have PMed you about it, earlier. But I do think your work is of great value, anyway.




Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3971
    • View Profile
    • Space Fractal
Re: GLBScript - HTML5 for GLBasic
« Reply #58 on: 2012-Jul-19 »
Yes, if glscripts produce much smaller files, most people would use that for hold traffic download size down. 4mb is for me quite too large for most online use (which is alfa omega when using online).

But It's a really nice way to use its as dev (as example) and then finally or later produce with glscripts. Howover it's have it's own use of course.

So it's seen that gernot and coolo html5 uses is very different each their use, and they seen suit together very nice.

Dont forget glscripts could later compile to c#.

So I'm pretty sure both would been nicely used.

Nice effort from both :-).
« Last Edit: 2012-Jul-19 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: GLBScript - HTML5 for GLBasic
« Reply #59 on: 2012-Aug-02 »
I've made a little video about the IDE of the BASIC compiler: http://www.youtube.com/watch?v=1o2IIBZOEFA
That's no Bug, that's my project!

http://programming-with-design.at/