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

Guilect

  • Guest
New release v0.5
« on: July 02, 2013, 01:09:01 AM »
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

  • Guest
Re: New release v0.5
« Reply #1 on: July 02, 2013, 02:59:45 PM »
Keenly looking forward to giving v0.5 a go in the next few days. :)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: New release v0.5
« Reply #2 on: July 02, 2013, 03:04:51 PM »
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.

Guilect

  • Guest
Re: New release v0.5
« Reply #3 on: July 02, 2013, 03:21:22 PM »
@Cybermonkey

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

bolbo

  • Guest
Re: New release v0.5
« Reply #4 on: July 03, 2013, 01:07:27 AM »
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: July 03, 2013, 04:47:27 AM by bolbo »

Guilect

  • Guest
Re: New release v0.5
« Reply #5 on: July 03, 2013, 11:32:15 AM »
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

  • Guest
Re: New release v0.5
« Reply #6 on: July 03, 2013, 11:47:50 AM »
@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

  • Guest
Re: New release v0.5
« Reply #7 on: July 03, 2013, 01:07:32 PM »
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

  • Guest
Re: New release v0.5 - ellipse drawing bug
« Reply #8 on: July 07, 2013, 02:38:54 PM »
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

  • Guest
Re: New release v0.5
« Reply #9 on: July 07, 2013, 09:37:00 PM »
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

  • Guest
Re: New release v0.5
« Reply #10 on: July 07, 2013, 11:45:23 PM »
Thanks.
I can plot ellipse at an angle using Push/Translate/Rotate/fillEllipse, strokeEllispe/Pop.
But function Atan2 is not defined.

Guilect

  • Guest
Re: New release v0.5
« Reply #11 on: July 08, 2013, 01:21:42 AM »
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

  • Guest
Re: New release v0.5
« Reply #12 on: July 08, 2013, 01:28:07 AM »
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

  • Guest
Re: New release v0.5
« Reply #13 on: July 08, 2013, 12:33:11 PM »
"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: July 08, 2013, 12:34:43 PM by SteveOW »

SteveOW

  • Guest
Re: New release v0.5 - Ellipses
« Reply #14 on: July 08, 2013, 12:50:29 PM »
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.