Author Topic: GLBasic V12 (was formerly V11 beta)  (Read 159646 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4448
    • View Profile
    • FUED
Re: GLBasic V11 public beta
« Reply #255 on: 2013-Apr-17 »
That is really great, I´m having a lot of problems with v10 and repeated sound on android, things go wild and I have been trying to solve it for the past 7h :(
Is it worth for me to try out the latest beta and convert sound to the format it currently seems to work? :doubt:

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: GLBasic V11 public beta
« Reply #256 on: 2013-Apr-17 »
Probably not a good idea to use v11.322 (latest beta) if you need sound on Android - it doesn't work at all.   

I use V11 beta as it fixes lots of bugs found in V10 (and performance seems to be a little better too).  However, having no sound, I had to write an extension to SDLActivity to support native audio (soundpools/mediaplayer).  It does work nicely, but I'd rather not do it this way - so I'm looking forward to better audio support in GLB.





Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: GLBasic V11 public beta
« Reply #257 on: 2013-Apr-20 »
that property why im stll uses 11.261, which do have sound, which works nice for Android. Im pretty sure this could been a nice alternative sound driver. Im guess its require a lots of java calls?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 552
    • View Profile
Re: GLBasic V11 public beta
« Reply #258 on: 2013-Apr-27 »
Gernot is overhauling the sound part of the GLB runtime, which is probably why its not working at the moment but if he succeeds, the new sound system will be much more powerful and flexible.

I hope he succeeds. Do you know if this will this permit adjusting the panning of a sound during playback? I'm also curious about repeating music smoothly.

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: GLBasic V11 public beta
« Reply #259 on: 2013-Apr-27 »
I am having an odd thing with Polyvectors in V11. It started with Bricks last Chequerboard post http://www.glbasic.com/forum/index.php?topic=9152.0 which ran fine in V10 but just got a single colour screen in V11.

So I wrote the following quick test which again runs fine in V10 but strange problem in V11.
Code: (glbasic) [Select]
// --------------------------------- //
// Project: v11polytest
// Start: Saturday, April 27, 2013
// IDE Version: 11.322


GLOBAL colours%[],colorder%[],loop%,xoff%=0,currcol = 0

DIMDATA colours%[],RGB(255,255,255),RGB(255,0,0),RGB(0,255,0),RGB(0,0,255),RGB(128,128,128)
DIMDATA colorder%[],0,4,0,4

FOR loop = 0 TO 3

STARTPOLY -1

POLYVECTOR xoff+loop          ,loop    ,0,0,colours[loop]
POLYVECTOR xoff+loop          ,loop+100,0,0,colours[loop]
POLYVECTOR xoff+loop+100      ,loop+100,0,0,colours[loop]
POLYVECTOR xoff+loop+100      ,loop    ,0,0,colours[loop]

ENDPOLY
INC xoff,150
NEXT

SHOWSCREEN

KEYWAIT

xoff=0

FOR loop = 0 TO 3

STARTPOLY -1

POLYVECTOR xoff+loop          ,loop    ,0,0,colours[colorder[loop]]
POLYVECTOR xoff+loop          ,loop+100,0,0,colours[colorder[loop]]
POLYVECTOR xoff+loop+100      ,loop+100,0,0,colours[colorder[loop]]
POLYVECTOR xoff+loop+100      ,loop    ,0,0,colours[colorder[loop]]

ENDPOLY

PRINT colours[colorder[loop]],xoff,110
INC xoff,150
NEXT

SHOWSCREEN
KEYWAIT

As you can see the 1st part draws a white, then red,then green then finally a blue polyvector with no problems. However the 2nd part should draw alternating white & gray polyvectors which does happen in V10, but in V11 I get 1 white followed by 3 gray even though they are receiving the current colours passed to them (proved by the text printed below each polyvector).

Is there something I have missed with regards to polyvectors in V11?, like a command or flag.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: GLBasic V11 public beta
« Reply #260 on: 2013-Apr-28 »
Have done more tests & the problem seems to be if you set a colour to RGB(255,255,255). The following code cycles through all the combinations of 4 colours (RED,GREEN,BLUE,WHITE) in fan mode & strip mode, it then runs the test again but changing the white to just 1 value lower (254,255,255).

The 1st run of both tests produce errors in the output in that you never see a white box, however with the white colour change there are no errors.

No errors on any of the tests on V10 & also of note the text that is printed below the boxes is white in V10, whereas it changes colour to the box above it in V11.(BTW am running 11.322 so not aware if this is 322 specific or any other V11 beta). If someone else could test & confirm or deny these problems or if I am missing something please let me know.

Lee

 p.s only tested on Win7 as only thing I have  :D
Code: (glbasic) [Select]
// --------------------------------- //
// Project: v10polytest
// Start: Saturday, April 27, 2013
// IDE Version: 11.322


GLOBAL grabcol%,colours%[],loop%,loop2%,loop3%,xoff%=0,c1$,c2%,c3$,c4%,conv%,errorcount%

DIMDATA colours%[],RGB(255,0,0),RGB(0,255,0),RGB(0,0,255),RGB(255,255,255)



conv%=Base_convert$(3333,4,10)

FOR loop3=0 TO 1
GOSUB test1
KEYWAIT
GOSUB test2
KEYWAIT
colours[3]=RGB(254,255,255) // Change last colour to not perfect white
NEXT


SUB test1: //Fan mode

errorcount%=0

FOR loop2=0 TO conv

c1$=Base_convert$(loop2,10,4)
c2=LEN(c1$)

IF c2 = 1 THEN c3$="000"+c1$ //cba to write a padding function for this test ;)
IF c2 = 2 THEN c3$="00"+c1$
IF c2 = 3 THEN c3$="0"+c1$
IF c2 = 4 THEN c3$=c1$

FOR loop = 0 TO 3

c4% = MID$(c3$,loop,1)

STARTPOLY -1

POLYVECTOR xoff+loop    , loop    ,0,0,colours[c4]
POLYVECTOR xoff+loop    , loop+90 ,0,0,colours[c4]
POLYVECTOR xoff+loop+90 , loop+90 ,0,0,colours[c4]
POLYVECTOR xoff+loop+90 , loop    ,0,0,colours[c4]

ENDPOLY

PRINT c4,xoff,100
PRINT colours[c4],xoff,110
grabcol = GETPIXEL(xoff+loop+10,loop+10)
PRINT grabcol,xoff,120
IF grabcol<>colours[c4]
PRINT "Error",xoff,130
INC errorcount
ENDIF

INC xoff,100

NEXT

xoff=0

PRINT c3$,0,140
SHOWSCREEN
SLEEP 100

NEXT

PRINT errorcount,0,0
SHOWSCREEN

ENDSUB


SUB test2: //Strip mode

errorcount%=0

FOR loop2=0 TO conv

c1$=Base_convert$(loop2,10,4)
c2=LEN(c1$)

IF c2 = 1 THEN c3$="000"+c1$
IF c2 = 2 THEN c3$="00"+c1$
IF c2 = 3 THEN c3$="0"+c1$
IF c2 = 4 THEN c3$=c1$

FOR loop = 0 TO 3

c4% = MID$(c3$,loop,1)

STARTPOLY -1,2

POLYVECTOR xoff+loop    , loop    ,0,0,colours[c4]
POLYVECTOR xoff+loop    , loop+90 ,0,0,colours[c4]
POLYVECTOR xoff+loop+90 , loop    ,0,0,colours[c4]
POLYVECTOR xoff+loop+90 , loop+90 ,0,0,colours[c4]

ENDPOLY

PRINT c4,xoff,100
PRINT colours[c4],xoff,110
grabcol = GETPIXEL(xoff+loop+10,loop+10)
PRINT grabcol,xoff,120
IF grabcol<>colours[c4]
PRINT "Error",xoff,130
INC errorcount
ENDIF

INC xoff,100

NEXT

xoff=0

PRINT c3$,0,140
SHOWSCREEN
SLEEP 100

NEXT

PRINT errorcount,0,0
SHOWSCREEN
ENDSUB

FUNCTION Base_convert$: number$,frombase%,tobase%

LOCAL charset$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LOCAL loop%,value%,temp%,result$

number$=UCASE$(number$)
IF frombase < 2 OR frombase > 36 OR tobase% < 2 OR tobase% > 36 THEN RETURN number$
FOR loop = 1 TO LEN(number$)
value = INSTR(charset$, MID$(number$, loop-1, 1))
IF value < 0 OR value >= frombase THEN RETURN
temp = temp + value * POW(frombase,(LEN(number$) - loop))
NEXT

IF temp < 0 THEN RETURN number$

result$ = ""

REPEAT
value = MOD(temp,tobase)
temp = FLOOR(temp / tobase)
result$ = MID$(charset$, value , 1) + result$
UNTIL temp <= 0

RETURN result$

ENDFUNCTION



// Uncomment for GLBasic V10
//FUNCTION Floor%: value%
// RETURN INTEGER(value)
//ENDFUNCTION

« Last Edit: 2013-Apr-28 by fuzzy70 »
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: GLBasic V11 public beta
« Reply #261 on: 2013-Apr-28 »
Both of your test programs work fine for me using V11.322 on Windows 7 (64bit).  All colours show and 0 errors.  Your previous test program shows alternating grey colours as expected.

//Andy

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: GLBasic V11 public beta
« Reply #262 on: 2013-Apr-28 »
Cheers Andy,

Now the hunt for what is making V11 go weird on my pc :(

Lee

Sent from my HTC Wildfire using Tapatalk 2

"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: GLBasic V11 public beta
« Reply #263 on: 2013-Apr-28 »
Have made some progress, it appears to be the graphics driver settings (Nvidia). Attached is some pics with what's good & bad with regards to V11.322 on my machine, however no matter what the settings are they do not give the same problems on V10.283 which leads me to believe that something has changed with regards to how the graphics commands are called/set-up in V11. As you can see it is the Anti-Aliasing settings which seem to be causing the problems I am having with V11.

Also note that in the last screen grab comparing the V11 & V10 output I am still experiencing problems with the colour of the text printed below the polyvectors. With the graphics driver on the BAD settings all of the text beneath the polyvector are the same colour as the polyvector, in the GOOD settings only the 1st 2 lines change colour but the lines below are their expected white. Again, in V10 no problems at all and all text is white like it should be.

I also tested in Win7 x64 (my machine is dual-boot) & got the same results, the graphics driver on that is a few versions below the current due to it not being that important as it is used primarily as a music daw.

Lee

   
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10839
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
GLBasic V11 public beta
« Reply #264 on: 2013-Apr-29 »
Oh! I have that problem on the Raspberry!!!! I must find out how to fix it programstically.

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: GLBasic V11 public beta
« Reply #265 on: 2013-Apr-30 »
Both worked fine on Fivesprites machine, however am not sure of their gfx card & what driver settings they have.

Not had any other responses so either works on theirs or no-one else has tried it lol.

More than likely its just my machine being an arse.

Lee

Sent from my HTC Wildfire using Tapatalk 2

"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline DaCarSoft

  • Community Developer
  • Mr. Polyvector
  • ******
  • Posts: 182
    • View Profile
Re: GLBasic V11 public beta
« Reply #266 on: 2013-Apr-30 »
Hi...

I have an iPad 4 (iOS 6.1.3) and I'm testing the last Beta 11 with the last version of Xcode.

I'm having troubles when testing it, the program crashes when I change to other app and back to the GLBasic's program, it did not enter in "ON_RESUME".

Xcode wrappers also does not work properly, but it works on previous GLBasic 11 versions.

I'm trying to find the origin of the problems to solve it, someone more is having the same problems as me???

Regards.
"Si quieres resultados distintos... no hagas siempre lo mismo" - Albert Einstein.

MrTAToad

  • Guest
Re: GLBasic V11 public beta
« Reply #267 on: 2013-May-17 »
A new beta is now available (the version number of the installer is incorrect).

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: GLBasic V11 public beta
« Reply #268 on: 2013-May-17 »
There's an issue with this build for Android (doesn't affect Windows and I don't know about other platforms yet):

Sound does work, but -

SETCURRENTDIR works for file access but LOADSOUND does not pick the filepaths up correctly.  Doing LOADSOUND "Media/mysound.wav" works fine.

Also, a minor issue is that the log_e.gbas file that normally explains the updates/changes made is out of date - it's missing entries for previous beta's and also this one.

//Andy

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10839
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: GLBasic V11 public beta
« Reply #269 on: 2013-May-17 »
Yes. There's some versioning bugs and I'm currently overhauling the HTML5 part for a much better experience. But it's about to get into a solid state now.