Author Topic: Announcing BrowserBasic  (Read 40285 times)

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #60 on: June 17, 2013, 09:03:16 PM »
@Guilect
Another little bug for squashing (still using compiler v0.2)

   var Bnames[100] as array
   var Bnom as string
   
   Bnames[1] ="Fred"
   msgbox("Button name:" + Bnames[1])     '...OK
   
   Bnom = Bnames[1]         ' ==> String expression error Bnames

cheers, SteveOW.

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #61 on: June 17, 2013, 11:39:14 PM »
@steveOW
The 2 bugs you listed have been fixed.

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #62 on: June 17, 2013, 11:39:38 PM »
Added some buttons to BrowserBasic demo...

     http://www.zen226082.zen.co.uk/BB_PO_v03_03.html

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #63 on: June 17, 2013, 11:42:44 PM »
Simple, yet effective graphical buttons.
 :D

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #64 on: June 18, 2013, 12:16:23 PM »
@Guilect

(now using BrowserBasic Compiler v0.3)
(work-around-able) bug with string addition

   var usr_string as string

   var mxs as string
   var mys as string

      mxs=Str$(MouseX())
      mys=Str$(MouseY())
   
      usr_string = "Left mouse button pressed at " + mxs
      usr_string = usr_string +  ","
      usr_string = usr_string + mys

      
usr_string = "Left mouse button pressed at " + mxs + "," + mys '... ==> ERROR Expected: Get Name - Name but got: 0

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #65 on: June 18, 2013, 08:32:33 PM »
@Guilect,

 Is there any present/planned way to change Printed Text Size?
 
 Is there any plan for a simple text entry field e.g. for high scorers to type in their name?
   (suppose I could capture keystrokes and echo them...but...er...lazy  ;)).

 Re external non-core libraries...
 into the txt file read by BrowserBasic I can
     put dummy function definitions e.g. function Janet_release_chickens(fox as number)
 and then in the output html file I can
      insert my own library link   e.g.<script src="Janet_Lib.js"></script>
      and delete the relevant (translated javascript) dummy code .
  Not elegant, but do-able.
  So external function handling in BrowserBasic would be nice-to-have but not critical for me.
  However it might server to attract game (and other) developers who want to plug in easily to awesome libraries like ThreeJS.


 Re app/project bundling
 I like the idea of simple app portability, forking, evolution, memes (like the Scratch guys)
 Ideally for me an entire app would be contained in a single html (possibly accessing cloud-based libraries).
 Failing that having Fred.html and Fred_Files gives a neat easy-to-use standard format bundle.
 It is probably not too difficult to manually put together or write a script
 to examine the BrowserBasic Fred.html output
 and then copy relevant assets to a Fred_Files folder
 and edit the links in the Fred.html.
 For me such ability would be a nice-to-have option in BrowserBasic, but not critical.
 
 Ability to record games sequences, animation frame sequences to audio-video file (avi, mp4 etc) and upload to youtube.
 Now that would be ..........Sorry I am rambling!

cheers, SteveOW.
 

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #66 on: June 18, 2013, 09:38:46 PM »
@steveOW

I have fixed the bug you reported.
It will be included in the next release.

But for now another work around is to not put spaces after the +.

So instead of :
usr_string = "Left mouse button pressed at " + mxs + "," + mys
do:
usr_string = "Left mouse button pressed at "+mxs+","+mys

For now to size text, the method is to use the scale function.
See ex_translate.txt
   Scale( 4,4)   ' make things 4 times bigger
   Print("After scale", 20, 20)

I will look into a setfont function.

No plans for text field entry, so far.
I know it is not exactly what you want but I will add a vb-like inputbox for now.

Having a way to add external functions would be good.
It is on the road map but, a bit down the road still.

Project bundling :  What are the other guys doing? (Stencyl, Construct 2, GameMaker HTML5, etc.)
« Last Edit: June 19, 2013, 12:33:32 PM by Guilect »

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #67 on: June 19, 2013, 03:58:29 PM »
@Guilect

I have fixed the bug you reported. 
For now another work around is to not put spaces after the +.
Great/Fine.

Quote
For now to size text, the method is to use the scale function.
I will look into a setfont function.
Great/Nice.

Quote
I will add a vb-like inputbox for now
Fine.

Quote
No plans for text field entry, so far
Not completely sure what I want for text entry long-term.

[ramble]
In Browzic I was thinking to use it as a way for user to submit an entire multi-line textfile (by copy & paste) to a running Browzic app.
Rationale = a way to get around the sandbox restrictions on browser programs reading local disk files.  There may be more elegant ways.
Ive seen a couple of html5 apps where user can drag a local image file into a running javascript app which reads and processes the image data. Tres cool 8) But I'm not expecting that of BrowserBasic anytime soon.  Am also interested in user-selectable/copyable text output stream for similar reason.
[/ramble]

Quote
Having a way to add external functions would be good.
It is on the road map but, a bit down the road still.
Fine.

Quote
Project bundling :  What are the other guys doing? (Stencyl, Construct 2, GameMaker HTML5, etc.)
Way out of my current knowledge at present.  :-[
 
[ramble]
I guess I'm looking thru  "free and open-source software" lenses.
From a quick look at wikipedia those guys you mention all seem to have a commercial angle.  Maybe you do too and good luck to you if you do.  If I thought I could monetize Browzic I might have a go myself.  Anyway the point I'm getting at is that commercial considerations will not always spawn the most elegant technical solution for delivery and distribution.  For me right now this stuff is mostly just good-fun playtime and I'm interested in the idea of highly-portable/deittable apps akin to highly-portable and edittable jpg's png's wav's, mp3's and mp4's etc.  Of course if someone offered me a million bucks for Browzic ( ::) ha ha ha) I would probably suddenly become VERY interested in digital rights management.  But for now I probably want to steer clear of that potential messiness.
[/ramble].

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #68 on: June 21, 2013, 06:29:03 AM »
@Guilect (BrowserBasic)
I want to store a color definition as a single value (number or string)
and then recall that value and apply it ...using, for example, setColor(r,g,b).
But how?   ???

From BrowserBasic.pdf:-
   rgb  returns a value from three color inputs.  example:  rgb(255,0,255)

 TEST 1
var MyColorStr as string
MyColorStr=rgb(255,0,255) '... ==> String expression error rgb

 TEST 2
var MyColorNum as number
MyColorNum=rgb(255,0,255)
Msgbox("MyColorNum is " + MyColorNum )    '  ==> MyColorNum is rgb(255,0,255)
huh?

cheers, SteveOW

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #69 on: June 21, 2013, 11:25:19 AM »
@steveOW

That command's response is a left over from when I was using the codef library.
There are no other left overs.
I will update it to return a number in the next release.
If I have the time the release might be later today.

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #70 on: June 21, 2013, 12:08:46 PM »
@Guilect

  Good news. :)

  One last minute query:-
      in BrowserBasic can a user defined function return a string value to the caller?

cheers, SteveOW.

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #71 on: June 22, 2013, 12:00:13 AM »
@ steveOW

In the release below I had no issues returning a string from a user function.
Give it a go.

v0.4
added StrokePolygon and FillPolygon.
some bug fixes.
added elseif to if then else endif.
added foreach - next.
added step to for-next loop.
added inputbox.
added setfont and getfont commands
fixed RGB command

BrowserBasic

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #72 on: June 22, 2013, 11:12:25 PM »
@Guilect
Looking forward to getting in to v0.4 shortly.

Here an update of rough example made with v0.3.
http://www.zen226082.zen.co.uk/BB_v03_POND_v04.html

cheers, SteveOW.
« Last Edit: June 22, 2013, 11:27:46 PM by SteveOW »

SteveOW

  • Guest
Re: Announcing BrowserBasic
« Reply #73 on: June 23, 2013, 08:47:49 AM »
@Guilect
Strange bug when I try to compile attached TXT with BB v0.4.
(Same TXT compiles OK with BB v0.3)
I cant isolate it to a particular piece of code. ???

Guilect

  • Guest
Re: Announcing BrowserBasic
« Reply #74 on: June 23, 2013, 12:11:59 PM »
Sorry,

Before, most of the compile mistakes were due to the parser not removing enough whitespace, so then I made it remove pretty much all whitespace.  Well this caused another issue IF the BB program had a call to a user function AND used an inline comment.

This issue should be okay now.
There is a new release, v0.41.
BrowserBasic
I hope by a couple more releases the base functionality will be good and from there future releases will be for adding functionality and capabilities.

SteveOW I appreciate you trying BB.
I am interested in seeing what you can do with it.