Author Topic: New release v0.5  (Read 4709 times)

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
New release v0.5
« on: 02. July 2013, 03:09:01 »
added ability to have multiple elseif statements
added ability to use Parentheses in mathematical statements
   ex: z = ((x + y) * (4/2)) - (11 * 1)
   and in logical expressions
   ex: If (foo = 3) OR (bar = "good") then
added setpixel
added getpixel
added strokeEllipse
added fillEllipse
added OpenURL
fixed comment character insertion in the editor

Download Here

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: New release v0.5
« Reply #1 on: 02. July 2013, 16:59:45 »
Keenly looking forward to giving v0.5 a go in the next few days. :)

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 573
    • View Profile
    • Home of EGSL
Re: New release v0.5
« Reply #2 on: 02. July 2013, 17:04:51 »
By the way how can I change the path settings for Chrome in the editor? The editor doesn't find it after hitting F7, only Firefox with F6 works.
Best regards,
Cybermonkey

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #3 on: 02. July 2013, 17:21:22 »
@Cybermonkey

instructions, complete with pictures, are in the help .pdf in the browserbasic root directory.

bolbo

  • Newcomer
  • *
  • Posts: 25
    • View Profile
Re: New release v0.5
« Reply #4 on: 03. July 2013, 03:07:27 »
I have the same problem as Cybermonkey, I put Chrome's path as explained in the tutorial an it just runs the browser without loading the script in question.
I would prefer Opera for testing since it is faster to load. I suggest to include Opera and perhaps Run with default system browser.

I have more suggestions or rather questions about possible features for BrowserBasic (BB, BroB..). Don't reveal all of them if the feature list is top-secret.  :-X

- Do you plan to support classes ?
- Is there a way to set the game dimensions ? it would be also handy a number of preset profiles to visualize the game in different resolutions, ratio aspect, etc for ipad, iphone, and other devices.
- What about showing performance indicators like frames per second ?
- Support of highscores to let the players compete online.
- Comment multiple lines in the editor.
- Physics engine, multiplayer, 3d..
 
« Last Edit: 03. July 2013, 06:47:27 by bolbo »

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #5 on: 03. July 2013, 13:32:15 »
I see the problem with launching in Chrome.  a double quote is in the wrong place.
From the mneu; Tools > Options > Tools; select "View in Chrome" then press Edit button.
Parameters line reads

"--allow-file-access-from-files file:///%d%n.html"

You need to move that first double quote to just before the word file, like this:

--allow-file-access-from-files "file:///%d%n.html"

I will fix it in the next release.

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #6 on: 03. July 2013, 13:47:50 »
@bolbo

I did not want to add a run with default browser button because on Windows XP the default browser is IE and that version does not support HTML5.  I realize that people can install another browser and make that the OSes default browser but it thought it might cause issues with newbies.  I thought it would be safer to specifically call out what browser to open the game with.

I can add an Opera button.  So can you.   ;)

Quote
Do you plan to support classes ?
Do I plan to support Classes... Oh boy.  I am not sure if this is a similar topic to add the GOTO statement.  It is clear that some people are for it and other think that it has not place in a BASIC language.  At some point I might add functions to UDT's (Types).  Use of this would be optional and entirely up to the user.

Quote
Is there a way to set the game dimensions ?
setDimensions sets the dimensions of the canvas. It expects a width and height, in pixels.
setDimensions(width, height)

Quote
What about showing performance indicators like frames per second ?
I can't believe that a fps command is not already in there.  I will add it.

Quote
Support of highscores to let the players compete online.
That is down the road a bit.

Quote
Comment multiple lines in the editor.
That is now working in this last release.
Just highlight the lines you want commented out, right-click the mouse, chose comments > line.

Quote
Physics engine, multiplayer, 3d..
Physics and 3D sound like fun things to consider in the future.

bolbo

  • Newcomer
  • *
  • Posts: 25
    • View Profile
Re: New release v0.5
« Reply #7 on: 03. July 2013, 15:07:32 »
Thank you kindly for the detailed and useful answer!
I was just curious about your plans on classes, not that I am necessarily interested in seeing object oriented features  ;)
Regarding multiplayer, I've just seen that node.js could be of help.
Thanks again  :) 

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: New release v0.5 - ellipse drawing bug
« Reply #8 on: 07. July 2013, 16:38:54 »
Hi Guilect,

errors with x,y positions of shapes drawn after the first ellipse
Code: [Select]
' ellipses

Function OnLoad()
' this is the callback OnLoad.  It gets called one time when the web page loads
' put in variables that need to be initialized
' load sounds and images in here also
setBackgroundColor(255,128,128)

EndFunction

Function OnDraw()
' this is the callback OnDraw, it is called once per game loop
' Put all of your drawing commands in here

var iii as number

for iii = 5 to 10 step 5
setColor(0,255,0)
strokeEllipse( 100+iii,100, 90, 10)

setColor(255,255,0)
fillEllipse( 100+iii,100, 90, 10)
next iii

EndFunction


Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #9 on: 07. July 2013, 23:37:00 »
The ellipses were being translated into position before drawing them, but there was no restore translation.

It is now fixed.

Attached is the fixed luv.min.js file. (had to rename to luv.min.js.txt to attach to this forum)
I will delete this attachment after the next release of BB.

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: New release v0.5
« Reply #10 on: 08. July 2013, 01:45:23 »
Thanks.
I can plot ellipse at an angle using Push/Translate/Rotate/fillEllipse, strokeEllispe/Pop.
But function Atan2 is not defined.

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #11 on: 08. July 2013, 03:21:42 »
Quote
Atan2 is not defined.
In the current build it is "Atn2"

I will either have to change the help file or the definition in the compiler.
Any preference?

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: New release v0.5
« Reply #12 on: 08. July 2013, 03:28:07 »
Quote
I can plot ellipse at an angle using Push/Translate/Rotate/fillEllipse, strokeEllispe/Pop.

Yah, that is how drawing of primitives is done in HTML5.
If you did not what to do that, there is always making a picture of an oval and then loading that as an image and use the image/sprite commands.

Glad to here you are making progress SteveOW.

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: New release v0.5
« Reply #13 on: 08. July 2013, 14:33:11 »
"Atan2" or "Atn2"
Any preference?

I prefer "Atan2",
I can easilly revise my code to fit a later version of BB.
Just as matter of interest is there any technical reason why BB compiler couldnt handle both forms Atn2 and Atan2?
I know its not elegant, just asking. :)
« Last Edit: 08. July 2013, 14:34:43 by SteveOW »

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: New release v0.5 - Ellipses
« Reply #14 on: 08. July 2013, 14:50:29 »
Quote
I can plot ellipse at an angle using Push/Translate/Rotate/fillEllipse, strokeEllispe/Pop.

Yah, that is how drawing of primitives is done in HTML5.
If you did not what to do that, there is always making a picture of an oval and then loading that as an image and use the image/sprite commands.

Glad to here you are making progress SteveOW.
Yes havent had as much spare time as I would have liked.

I'm not very experienced with sprites and images so will hold off on that for a bit.
I'm trying to de-confuse myself about rotation directions and signs at moment, always a challenge for me. ::)
Usually I just end up doing trial and error until it works right.
Suggest that future version of manual could benefit from a few details on how to use the functions Atan2/Atn2 and Rotate.
I know that any decent programmer should be able to work out the rules but it is a bit of a chore.

BB v0.5 is looking VERY GOOD.   :)
I strongly recommend anyone else to give BB a try-out.