BASIC

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Gary

Pages: 1 [2] 3 4 5
16
GLBasic - en / GLB Debugger
« on: 2011-Nov-15 »
Is there any page anywhere that details the proper use of the debugger?

I have had call to use it for the first time in over a year of using GLB and am finding new things out about it. At first I thought that it was cumbersome to have to keep scrolling up and down the debug window to find out a current value of a variable but then I left my mouse pointer over the source code and up popped the current value of a variable!!.

What other little timesaving tips are there in the debugger that I have not found yet?

Gary

17
I have made a few major changes to a project im working on and am now experiencing random crashes.

If I have debug on then the code seems to crash at random places anywhere between 10 and 30 seconds after starting up. According to the debugger its still running as I can pause it and step through each line.

If debug is off then it seems to be fine until I remove focus from the program and then it locks up and even clicking back on the app does not restore it running (I have AUTOPAUSE FALSE at the top of the program)

Also when running in debug in the thread that is running I have put in a debug message that is displayed every loop, this also stops making me think the thread is the part of the program that has hung (all of my graphic updates and button detection is done in the thread so this would give the impression of the main program locking up.

Has anyone else noticed anything similar when using threads recently? Or if not is there any way I can debug the thread that is running with the debugger?

Thanks
Gary

18
GLBasic - en / Mind gone blank on file writing
« on: 2011-Oct-27 »
Sorry if this is a simple question but cant see anything obvious in the help file

I want to create a couple of log files for a program Im writing. Basically all it will be is a series of numbers which I will then throw into a spreadsheet and create a graph from.

Is there a really simple way to open a file, append a line to the bottom and close it? There will be 10000 entries in the log files so cant use PUTFILE which would be ideal if it was not linked to an CHAR length

Cheers
Gary

19
Nice to see this feature but there is a couple of minor bugs.

If you jump to line 1 then it actually takes you to line 2 and if you turn on or off line number display the cursor position does not move to the correct spot in the line, it can end up actually flashing in the line number display or being a couple of characters out in the code.

If you type a letter or move the cursor it returns back to the correct spot and then adds the character, so no big deal, just mentioned it as I spotted it just in case it has an impact else where that I have not found yet

20
Bug Reports / DIMDEL issues?
« on: 2011-Sep-14 »
Kitty,

Have you changed anything in how arrays are handled recently?

I have a piece of code that logs the last 10 events and did it like this

Code: GLBasic [Select]
        DIMDEL coin_recall$[],0
        REDIM coin_recall$[11][3]
        coin_recall$[9][0] = coinname$[coin]
        coin_recall$[9][1] = PLATFORMINFO$("TIME")
 

this now crashes the program with an error of DIM has wrong dimensions.

It was working find up till a couple of revisions ago

Gary

21
Bug Reports / Website errors
« on: 2011-Sep-04 »
Kitty

When viewing the online manual I am getting a lot of php debug/error messages

for example

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: Cannot modify header information - headers already sent by (output started at /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php:2622) in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/bad-behavior/bad-behavior/screener.inc.php on line 8

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /var/kunden/webs/glbasicabc/glbasic/forum/SSI.php on line 174

Have you turned on the setting on the server to give all PHP error messages or has something else gone wrong?

The actual manual itself still seems to be working fine

22
GLBasic - en / Android screen size
« on: 2011-Aug-25 »
Is there any commands that will give the screen size of an android device? I am thinking that I can read the screen size then set the screen up to full screen and use the available size so that apps look nice on every device with the single app

23
GLBasic - en / Android buttons
« on: 2011-Jul-22 »
I know there are many various specs of android devices but is there any standard button numbering system for which key is which?

I knocked up a quick program to output the button number pressed (Much like the built in util for the SDK but running on any device) which I have attached.

On my Xperia Play the following buttons have the following codes

up 205
down 203
left 200
right 208
x 17
[] no value returned
^ no value returned
O exit program
menu 221 and 47
back and home both quit
magnify glass no value returned
L no value returned
R No value returned
vol up no value returned
vol down no value returned
As you can see a lot of buttons dont return a value. Is there anyway that these could be read?

If you can, could you add your devices buttons to the list to confirm they all match up and if there are any other devices with extra buttons that return different values

Am just going to run the same program on the emulator and see what I get



[attachment deleted by admin]

24
GLBasic - en / Android compile question
« on: 2011-Jul-22 »
I am trying to get one of the sample programs to compile to check out my android set up but I am getting the following error

Code: GLBasic [Select]
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.7.917 SN: 6f77911 - 3D, NET
Wordcount:64 commands
compile+link:
BUILDSRIPT
Buildfile: C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\build.xml
    [setup] Android SDK Tools Revision 10
    [setup] Project Target: Android 2.2
    [setup] API level: 8
    [setup]
    [setup] ------------------
    [setup] Resolving library dependencies:
    [setup] No library dependencies.
    [setup]
    [setup] ------------------
    [setup]
    [setup]
    [setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:
     [echo] Creating output directories if needed...

-aidl:
     [echo] Compiling aidl files into Java classes...

-renderscript:
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:
     [echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

compile:
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 2 source files to C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\bin\classes
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
Android=C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 7.3 sec. Time: 12:41
Build: 1 succeeded.
 

Any ideas what it could be?

Cheers
Gary

25
Inline / 3rd party / iPhone GUI graphics
« on: 2011-Jul-15 »
THought I would share this link I was passed. Could be useful if you want to make some standard looking iPhone GUI graphics

http://www.designerstoolbox.com/designresources/iphone/

Gary

26
GLBasic - en / sprite color change
« on: 2011-Jul-12 »
I am thinking about doing a simple football kit design app and wondered if there is a a way you can change a colour of a sprite on the fly?

For instance I have a shirt and shorts graphic that have 2 defined default colours (255,0,255 and 0,255,0) can I change it to say 210,30,77 and 1,1,1 for the shirt and on the shorts graphic make the 255,0,255 to say 255,228,0 and then draw it? Obviously the final program would have many kits and many predefined colors but for now im just stuck on doing the one.

The only way I can see to do it is a bit complex and uses sprite2mem, is there an easier way?

Cheers
Gary

27
Code Snippets / BCD to decimal
« on: 2011-Jul-05 »
Not sure if anyone still uses Binary Coded Decimal but I needed to write a BCD to Decimal conversion for my project and thought I would share the code with anyone that might need it

Code: GLBasic [Select]
FUNCTION bcdbin32:inval

        LOCAL weight_lut[]
        LOCAL   weight, retval, i
        DIMDATA weight_lut[], 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000

        retval = 0

        FOR i=0 TO 7
                weight = weight_lut[i]
                WHILE (BAND(inval,15))
                        retval = retval + weight
                        inval = inval - 1
                WEND
                inval = ASR(inval, 4)
        NEXT

        RETURN retval

ENDFUNCTION

Now I fully expect someone to point out there is a built in function that I have missed lol

Hope its useful for someone

Gary

28
First sorry for the large attachments on this thread

I am trying to do an animated spinning coin and have it working fine on my dev pc but when I move it to another computer I get very bad graphic tearing as per the attached screen shots.

The animation is a 32 frame 187 x 189 spinning coin which I am using via

LOADANIM "coinspin.png",200,187,189

and drawing via

ROTOZOOMANIM 200,coin.frame%,coin.x,coin.y,coin.angle,coin.scale

As you can see from the screen shots the corruption is quite bad and doesnt just seem to be the graphic being cut in the wrong place. the scaling seems to be out as well

Has anyone come across anything like this before and if so how do you fix it?

Thanks
Gary

[attachment deleted by admin]

29
GLBasic - en / Anyone installed IOS5 beta?
« on: 2011-Jun-17 »
Just wondering if anyone else has installed IOS5 beta on an iPhone 3gs? If you are thinking of doing it then dont. I have done it and most apps I have tried that use some sort of net connection and/or gps are failing to work properly. I have missing lables on folders on springboard, when I go to app store and install something I press install and it changes to a small green rectangle which also needs pressing. I have done full restore 3 times now and its still as bad as the first time. Heres hoping a new beta is out soon :(

30
Off Topic / Android store
« on: 2011-Jun-10 »
Having just got access to an Android phone I took my first look at the google store and was amazed by the dross and duplicates on there. For example, one dev team has a Snes emulator on there, one is called panda snes, one is called zebra snes and so on. The same program is on there 10 times with a different animal. And in the app description there are so many in appropriate keywords to ensure their app appears no matter what you search for.

People have a dig at Apple for their practices and blocking certain apps but if google were to take the same stance there would be 70% of the apps removed and the store would be much easier to use in my opinion.

Mind you, I did love the dev set up for android, into phone settings, set dev mode on, copy apk to sd card and install, job done. No licence, signing and certificate rubbish just to run a test program

Pages: 1 [2] 3 4 5