Author Topic: Announcing BrowserBasic  (Read 36436 times)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: Announcing BrowserBasic
« Reply #45 on: June 15, 2013, 08:56:09 PM »
Really impressive. I hope I'll find some time this weekend to code a little example.
Keep up that great work!

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #46 on: June 15, 2013, 09:07:52 PM »
@steveOW
Fixed issue Q4 from above.

Will look into the Str$ thing.

Will post update later.

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #47 on: June 15, 2013, 09:38:16 PM »
Also fixed Str$.

new download can be found at the same link:

BrowserBasic

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #48 on: June 15, 2013, 10:20:28 PM »
A quick hack of my demo code to BrowserBasic.
Doesnt do justice to BB.
But shows how easy it is to knock something up in BB. :)

(Unpack zip to local disk and click on the .HTML file)

« Last Edit: June 15, 2013, 10:27:45 PM by SteveOW »

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #49 on: June 15, 2013, 10:33:03 PM »
Hey steveOW,

Thanks for trying BB and thanks for making the demo.

I can look into a JS filled triangle routine for ya.

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #50 on: June 15, 2013, 10:58:38 PM »
Hi Guilect,

I think the BB framework is superb.
It deserves a much finer demo than that one.

Filled Polygons would be nice. 
I have coded triangle fills in the past but its a bit much to expect of a casual programmer (IMO).

One point of interest - for the demo I had to use <Else If> in place of <Elseif>
The former requires an extra Endif.  I prefer the latter (its what I use in VB6).
Could your compiler stretch to handle both forms?

Anyway, thanks for a great product.
SteveOW.


ScriptBasic

  • Guest
Re: Announcing BrowserBasic
« Reply #51 on: June 16, 2013, 12:11:39 AM »
The Cat & Mouse demo was cool.

Aurel

  • Guest
Re: Announcing BrowserBasic
« Reply #52 on: June 16, 2013, 10:31:58 AM »
I have tried with Opera and work so..so...not very fast but work ok 8)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: Announcing BrowserBasic
« Reply #53 on: June 16, 2013, 10:56:17 AM »
For a maximum speed one should use Chrome. It's no secret that Chrome (or Chromium on Linux) has at the moment the fastest Javascript/HTML5 engine.

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #54 on: June 16, 2013, 12:58:24 PM »
for steveOW I have added 'elseif'.
Will try to add a few more things (e.g. filledpoly) and have a new release next weekend.

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #55 on: June 16, 2013, 03:49:01 PM »
Hi Guilect,

can I squeeze another bugfix request in please...
(Edit: *** This bug is from using original installation, so may already be fixed in second version ***)

var AA[1000] as array
var BB[1000] as array
var kkk as number
kkk=1
AA[kkk] = 1 + BB[kkk]  '...compiles OK

'...Compiler Errors with all these lines:-
AA[kkk] += 1              '...Expected: Match - = but got: + ...Fair enough += is not part of many BASIC's
AA[kkk] = BB[kkk] + 1  '...Expected: Get Name - Name but got: 0  ... Maybe a parsing problem?      
AA[kkk] = AA[kkk] + 1  '...Expected: Get Name - Name but got: 0

'=========================================

'...Also do you have any plans regarding buttons?
In Browzic prototype I have used html buttons but it might be nice and I guess fairly easy to make buttons in the canvas.
maybe you have some GUI library in mind?

'=========================================
'...btw for javascript triangles I have been using,
(here with 'canvas01_2Dctx' as the canvas context object)
//...Plot  Red Triangle
 canvas01_2Dctx.beginPath(); 
 canvas01_2Dctx.lineTo (moiRects_PosXmin[jjj], moiRects_PosYmin[jjj]);   
 canvas01_2Dctx.lineTo (moiRects_PosXmax[jjj], moiRects_PosYmin[jjj]);       
 canvas01_2Dctx.lineTo (moiRects_PosXmax[jjj], moiRects_PosYmax[jjj]);
 canvas01_2Dctx.stroke ();
 canvas01_2Dctx.closePath ();
 canvas01_2Dctx.fillStyle = "red";
 canvas01_2Dctx.fill(); 
Presumably same can be used for any (simple) polygon fill.

====================
Cheers,
SteveOW.
« Last Edit: June 17, 2013, 07:55:33 AM by SteveOW »

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #56 on: June 16, 2013, 11:40:51 PM »
Hi again Guilect,

I tried to link another JS library ( by putting a .js file into the js folder) and call its functions from within BrowserBasic source code.

Compiler gives: Function Call - Undeclared function: SOW_MyFunctionOne

Is there any way (present, planned or considered) to enable such extension of libraries?

cheers, SteveOW.
« Last Edit: June 17, 2013, 08:00:08 AM by SteveOW »

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #57 on: June 17, 2013, 10:38:01 AM »
Hi again Guilect,

(Sorry to keep pestering you!, no pressure intended  ;))

Ive made a slightly updated version of my BrowserBasic demo.
It runs fine in private from my local disk.
I used "Save as WebPage, Complete" from my browser(Firefox) which produces a Fred.html file and a Fred_files folder (as I'm sure you know).
Ive uploaded  Fred.html and Fred_Files to my scrap of Public webspace.
(Hope this is OK with you, if not just say and I'll drop it)
http://www.zen226082.zen.co.uk/BB_PO_v03_03.html

But Firefox/Save-As-WebPage function doesnt include the linked Sound files in the Fred_Files folder, for any sound-links written in javascript.
(It does alright for links written in html).
Obvious short-term solution is to manually edit the fred.html code and manually copy the relevant files into the Fred_files folder.
But this is a bit kludgy for a novice user (imo).
Do you have any thoughts about smoothing out this "Publication" process?

cheers, SteveOW.

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #58 on: June 17, 2013, 11:56:09 AM »
@steveOW,

I will check into the error you posted.

I had no plans for buttons.  I just imagined making fullscreen games.
Much like using DirectX, OpenGL, or SDL.
At some point I can look into a GUI library.
But first to squash the bugs before adding much more.

Thanks for the triangle/polygon code.
Should be easy enough to implement.

There is not presently a way to hook in other libraries.
The idea was to have the compiler know exactly what functions were allowed.
That way if a user mistyped a keyword or function  or the the parser came across an unknown command, it could through an error.
I thought this would be easier for a beginner.
This way errors would be generated at design time and caught rather than
no errors and then  trying to figure out way the javascript code was not running.
It is not as easy to debug in js.
If the user can just add 'unknown commands' that the parser should ignore then I can see many more programs not working and the user not knowing why.
I can look into some sort of 'declare external' type of command in which the parser would get passed the keywords from the external library.
Once most of the bugs are squashed I had intended to look into adding other libraries to BrowserBasic, e.g. Box2DWeb.js.

Thanks for uploading the updated demo.
Any example code I provide is to be considered open source, do with it what you want.
And obviously, hopefully, anything that you create and store on your webspace is yours to do with it as you want.

I had never considered using the 'save as complete website' as a way to bundle a project.
I had always thought that the html file and any needed folders would be uploaded, using FTP for example.  If anyone knows an easier way, please let us know.

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #59 on: June 17, 2013, 01:23:12 PM »
@Guilect,

Thanks v.much. :)
I completely understand you want to focus on final polishing of BrowserBasic V1 into a robust, rich easy-to-use product.
I dont want to get in the way of that at all.
And I appreciate that you sure dont want to get tangled up in debugging other people's middleware libraries.
The more control you keep on scope the more stable and successful the product.

I have a vision (for Browzic) which is slightly different (from BB V1) and mainly vaporware at present.
It could be that if BrowserBasic delivers a lot of what I need in short-term (and it is certainly looking that way) then I could simply park the Browzic endeavour.
I guess I am a bit conflicted about which route to go and trying to peer down the road a bit.
Should I stay on the Browzic jallopy or should  I park it up and hitch a ride downtown on the gleaming BrowserBasic bus?
Your recent comments are useful to me in this respect.

Anyway, my angst is not your concern, happy bug squashing!

Cheers, SteveOW.