Menu

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.

Show posts Menu

Topics - Paul Smith

#1
https://paulsmith6175gmailcom.itch.io/bc

If anyone want to report what their touchscreen stops at on a mobile
#2
Just downloaded V15.004
web update detects v15.005 say its finished but still says V15.004 on reload.
I'll keep checking,
#3
Hi all i have a project that builds for windows but now fail to build for Android.
I have one project that builds for android every time, I open a new project and copy code and media and the  builds fails at end of stage 3 with android.
any Idea

running glb_build.bat
Using ANDROID_TARGET="android-22"
You can use "C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-22, Android 5.1 (Lollipop
ECHO is off.
androidmanifest.xml:
Make sure to check do a manual check for those.
android:minSdkVersion="10" android:targetSdkVersion="22"
ECHO is off.

AndroidIcons.exe [v02-9-2015] running...
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_36_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-ldpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_48_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-mdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_72_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_72_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-hdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_96_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xhdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_180_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xxhdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_192_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/pauls/Documents/GLBasic/assaa/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
C:/Users/pauls/Documents/GLBasic/assaa/icon_TV_AndroidExtras.png is missing (320x180 size)
the Ouya icon is not important, if you dont want to support the console

Checked AdActivity (intersititals):
Does not uses a AdActivity

Android Extras version (SDLActivity.java):
* 3.01.2

Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Updated project.properties
Updated local.properties
Updated file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\build.xml
Updated file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\proguard-project.txt
Updated and renamed default.properties to project.properties
Updated local.properties
Added file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\build.xml
Added file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.2.0
[checkenv] Installed at Q:\Compiler\platform\android\android-sdk-windows

-setup:
     [echo] Project Name: glbasic
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
     [echo] Resolving Build Target for glbasic...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for glbasic...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\AndroidManifest.xml:23: error: Error: No resource found that matches the given name (at 'banner' with value '@drawable/banner').
     [aapt]

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:698: null returned: 1

Total time: 0 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:698: null returned: 1

Total time: 0 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
HOW TO INSTALL? Install by invoke this command:
"Q:\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"Q:\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android"
.
Android=C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 10.5 sec. Time: 20:41
Build: 1 succeeded.


#4
Hi Guys
I don't have GPS switch on
and my builds always advise me to turn it on when executed.
i guessed this would have been in the manifest.xml and just needed removing
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
but its not

any ideas on how to kill this?

also not that important but I'm building a new app with a resolution of 720x1280, under testing with android my finger mouse reports locations normally, but windows x is normal 0-720 but y is 0-1092 and wont go any higher (using mouseatate). The photo show 1068 must have knocked it when grabbing.
#5
Found and tested this website the other day retdec.com

It converts EXE's to C or Python. The results come in the form of code and visual loop drawings.
I've been using it and ollydbg to reverse work related programs.

Anyone else tried or been looking for something like this?
#6
Written a few app for android over the years.today I started a new one from scratch using the latest GLB.
however its upside down, loading old project from older versions and compiling works.

no matter what project/options sizes i try makes no difference in android.

a simple  test
print"test",100,100
showscreen
mousewait

shows sideways

any Ideas, have I forgot something?
#7
I've gone back to basic with this.

load a simple sprite and display it.
As expected only 2 and 3 work in windows.
none work in android
I've removed GETCURRENTDIR$()+ as spacefractal says it not needed, this worked every time in v12.

and ideas

Code (glbasic) Select
SETFONT 0,3

LOADSPRITE "back.bmp",1
DRAWSPRITE 1,100,100
PRINT "1",1,1
SHOWSCREEN
MOUSEWAIT

LOADSPRITE "Media/back.bmp",2
DRAWSPRITE 2,100,100
PRINT "2",1,1
SHOWSCREEN
MOUSEWAIT

SETCURRENTDIR("Media")
LOADSPRITE "back.bmp",3
DRAWSPRITE 3,100,100
PRINT "3",1,1
SHOWSCREEN
MOUSEWAIT

LOADSPRITE "Media/back.bmp",4
DRAWSPRITE 4,100,100
PRINT "4",1,1
SHOWSCREEN
MOUSEWAIT
#8
14.497
   // Core:
   //     SOCK_UDPSEND - bug. Port was internally ill formated.
   //     KEYWAIT - fixed
   // Editor:
   //     Not responding editor in debug session should be fixed.

This is still broken on my system
mousewait still works.
#9
Is it me or is this update faulty
EditorE.exe - System Error
missing mfc140.
MSVCP140.dll
VCRUNTIME140.dll

downloaded v14.01 and tried again, Same thing.
Oh well can't do anything with v14.01

Not been doing much for Android this year, is this type of code still valid
LOADSOUND GETCURRENTDIR$()+"atomicnew.wav", 1,1
as none of my media loads after a compile. the media is in the APK and these are previous working projects, not 100% if they were compiled with v12 or v14
#10
I'm using the fmod library setup from the samples folder in my project.
I need FMUSIC_Get_Time function adding.
tried to add it myself  but C++ is way above my level. How do you know if its @0 @4,void or char etc.
any help would be great.

added the function docs and fmod code below.

Cheers


Code (glbasic) Select

INLINE
DECLARE_ALIAS(FMUSIC_LoadSong, "fmod.dll", "_FMUSIC_LoadSong@4", (const char* name), void*);
DECLARE_ALIAS(FMUSIC_PlaySong, "fmod.dll", "_FMUSIC_PlaySong@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_FreeSong, "fmod.dll", "_FMUSIC_FreeSong@4", (void* pMod), char);
DECLARE_ALIAS(FSOUND_Init, "fmod.dll", "_FSOUND_Init@12", (int, int, unsigned int), char);
DECLARE_ALIAS(FSOUND_Close, "fmod.dll", "_FSOUND_Close@0", (void), void);
DECLARE_ALIAS(FMUSIC_IsFinished, "fmod.dll", "_FMUSIC_IsFinished@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_SetMasterVolume, "fmod.dll", "_FMUSIC_SetMasterVolume@8", (void*, int), char);
// DECLARE_ALIAS(FMUSIC_GetTime, "fmod.dll", "_FMUSIC_GetTime@4",

void* g_pFMod = 0;

// need this for ESC-exits
struct FMOD_killer {~FMOD_killer() {if (g_pFMod) FMod_Stop();} } g_Fmod_killa;
ENDINLINE


GLOBAL fmod_init

FUNCTION FMod_Load: fname$
LOCAL good
IF fmod_init = FALSE
fmod_init=TRUE
ENDIF

FMod_Stop()
INLINE

if(FSOUND_Init) FSOUND_Init(65535,64,0);
if(FMUSIC_LoadSong)
g_pFMod = FMUSIC_LoadSong(fname_Str.c_str());
if(g_pFMod) good = TRUE;

ENDINLINE
RETURN good
ENDFUNCTION


FUNCTION FMod_Play:
INLINE

if(FMUSIC_PlaySong && g_pFMod)
FMUSIC_PlaySong(g_pFMod);

ENDINLINE
ENDFUNCTION


FUNCTION FMod_Stop:
INLINE

if(FMUSIC_FreeSong && g_pFMod)
FMUSIC_FreeSong(g_pFMod);
g_pFMod = 0;
if(FSOUND_Close)
FSOUND_Close();
fmod_init=FALSE;
ENDINLINE
ENDFUNCTION



FUNCTION FMod_IsFinished:
INLINE
char ok=1;
if(FMUSIC_IsFinished && g_pFMod)
ok = FMUSIC_IsFinished(g_pFMod);
return ok ? TRUE : FALSE;
ENDINLINE

RETURN TRUE
ENDFUNCTION


FUNCTION FMod_SetMasterVolume: vol
INLINE
if(FMUSIC_SetMasterVolume && g_pFMod)
{
return FMUSIC_SetMasterVolume(g_pFMod, (int)(vol * 256.0)) ? TRUE:FALSE;
}
ENDINLINE
RETURN FALSE
ENDFUNCTION




FMUSIC_GetTime
Returns the time in milliseconds since the song was started. This is useful for
synchronizing purposes becuase it will be exactly the same every time, and it is
reliably retriggered upon starting the song. Trying to synchronize using other
windows timers can lead to varying results, and inexact performance. This fixes that
problem by actually using the number of samples sent to the soundcard as a reference.

int F_API FMUSIC_GetTime(
FMUSIC_MODULE *mod
);

Parameters
mod Pointer to the song to get time from.

Return Value
On success, the time played in milliseconds is returned.
On failure, -1 is returned.

Remarks
#11
Never Used AE with v12.308 and I'm tested v14 with AE, all compile fine and loaded/Run faster.
However I used to plug my phone into the USB and compile straight onto the device but with v14 I have to copy and install the APK. can I fix this?
sorry if this has been asked before.

cheers All
#12
Off Topic / Android TV Boxes
2015-Jun-14
Got a MXIII Android TV box last week for around £40 to replace my £120 WDTV Live box.
How cool. Antutu benchmark ranked my box close to the fastest device. KITKAT installed. rooted
8 GPU,4 CPU,2GB Ram, 4K output**

I got this as the WDTV box is slow to bootup, flawed app sound output with 5.1 spdif. eg no sound with youtube etc, fixed codec support. not many apps.

The MXIII is nearly perfect, full Play/amazon app store. google video and flixter ultraviolet is not working correctly,sound OK but black picture. 4K output support is done with a pre-installed rooted app. made the bottom 10% of my 4k tv wobble  but 1080p is solid
If you want 4K wait for one with HDMI 2.0 or Nvidia Shield.

XBMC/KODI run perfectly.
Glbasic Apps run perfectly.

supplied Remote is pointless as you needs a wireless mouse/keyboard.
not got a compatible game controller to test it with

but for £40 you cant moan.
anyone thinking of getting a similar box?







#13
I'm having trouble getting this working if its possible at all.
I can set transparency to any colour and overlay with no problems.
I then change the transparency to a different colour , grabsprite , then drawsprite to a new location in essence having 2 layer of transparency, how ever this bit never works no matter what i try.

what I am trying to do is have a font outline which is white and never changes.
the inside of the fonts in pink RGB255,0,128 and is draw over a background. this works
I then change the transparency to blue, grabsprite in the area I need which is the outside of the font background.
and draw it onto a new background.
however it always blue.(or the colour i picked)

Ive changed the colour
its A png image
ive tested the colour is saved right( Hence the bug I noticed in UO Dingsfont)
coded it in different orders but never works

Is it possible or Im I doing about it the wrong way.

cheers Paul

#14
Installed Android extras as i was curious, and now messed up my settings.
I've uninstalled it which logged 100s of non declared items errors when compiling.
I've reinstalled GLB which has fixed this but now I can't point the compile to my phone
any idea where this is configured.
I dont really want to wipe this laptop.
cheers
#15
Again how  Quick simple Code can produce good results.
My take on the Circle part in Second Reality.
Code probably useless, but fun


Code (glbasic) Select

// future Crew Second Reality style Circles
// First Version created 5 circle sprites with a palatte rotation but I didn't like it

SETSCREEN 1024,768,1                            //runs better in fullscreen mode
GLOBAL a, r,i,b
SETFONT 0,4
PRINT " Please wait slow rendering...",30,20
SHOWSCREEN
LIMITFPS 60


GOSUB picbuild                                 //Render Circles

GOSUB spriteline                               //Break sprite into 768 sprites lines

b= 180
WHILE TRUE
i= i+ 4                                       // 1st circle Speed clockwise
b= b +3                                       // 2nd circle Speed clockwise
ALPHAMODE -1
ZOOMSPRITE 7777,100*SIN(i)+0,100*COS(i)+0,1.5,1.5                  // Draw 1st Circle. zoomsprite higher then screen or edges will show
ALPHAMODE 0.9
IF i> 1000 THEN ZOOMSPRITE 1000,100*SIN(b)+0,100*COS(b)+0,1.5,1.5 // Draw 2nd Circle once i>1000

SHOWSCREEN
IF i> 3000 THEN GOSUB flow                    // bend sprite 1000 once i>3000

WEND
KEYWAIT




// wobble the picture
SUB flow:
              FOR y=1 TO 768
              a=a +0.001 * 6                // Wobble speed
              DRAWSPRITE y, COS( a + y ) * y / 4, y
              NEXT
              GRABSPRITE 1000,0,0,1024,768 // Grab whole screen
              RETURN
ENDSUB

// Draw the circles

SUB picbuild:
r = 0
FOR j= 0 TO 650
r=r + 15
IF r > 400 THEN r = 0
FOR i=0 TO 360 STEP 0.1                   // Higher the step the more missed pixels + faster render
SETPIXEL j*SIN(i) + 1024 /2, j*COS(i)+768 /2, RGB(r/3, r/3, r/3)   // PLot a dot
NEXT                                                                                                                           
NEXT


// Grab Whole screen
GRABSPRITE 7777,0,0,1024,768             // Grab the same picture twice
GRABSPRITE 1000,0,0,1024,768

RETURN
ENDSUB

SUB spriteline:
FOR t = 1 TO 768
GRABSPRITE t,1,t,1024,1                 //grab 1 line from top to bottom, 1024 pixels wide * 768
NEXT
RETURN
ENDSUB


#16
Fake Plasma Rotating Cube ( Grabsprite abuse )

show.exe in zip shows sides being rendered on the fly
plasmacube.exe normal

not optimized, probably better ways to do this but an easy example.

wobble screen maths may be useful for other project and is quite simple, took me a bit to get it right.
dicecube.ddd made in ac3d.



Code (glbasic) Select
SETCURRENTDIR("Media") // go to media files
GLOBAL xxx,a
LOADFONT "smalfont.png", 1
SETFONT 1,1.5
LIMITFPS 40


//LOAD IMAGES
X_LOADOBJ "dicecube.ddd", 0
LOADSPRITE "blue.jpg",9999
LOADSPRITE "orange.jpg", 6000
LOADSPRITE "test.jpg",5000

//------------------------------------------------------------------
// GRAB LOT OF SPRITE LINES
STRETCHSPRITE 6000,0,0,1024,768
FOR t = 1 TO 768
GRABSPRITE t+6001,1,t,1024,1
NEXT

STRETCHSPRITE 5000,0,0,1024,768
FOR t = 1 TO 768
GRABSPRITE t+5001,1,t,1024,1
NEXT

STRETCHSPRITE 9999,0,0,1024,768
FOR t = 1 TO 768
GRABSPRITE t+30,1,t,1024,1
NEXT

//----------------------------------------------------------------------
// SHOW ROTATE TEXTURE CUBE

WHILE TRUE
xxx = xxx + 3
GOSUB side3
//CLEARSCREEN   TURN THIS ON FOR NO BACKGROUND ( SHOW SECRET )
PRINT "X:" + xxx, 100, 10
X_MAKE3D 1, 50, 45
X_CAMERA 4, 0, 0, 0, 0, 0
X_SETTEXTURE 0, -1
X_ROTATION xxx, xxx/ 2, xxx / 2, 0
X_DRAWOBJ 0,0
IF xxx > 360 THEN xxx = 0
SHOWSCREEN
WEND


//-----------------------------------------------------------------------

SUB side3:



            FOR y=1 TO 768
      a=a + 0.005 * 2   // * SPEED
            DRAWSPRITE y, COS( a + y ) * y /4, y      // WOBBLE THE LINES
            NEXT

    GRABSPRITE 9998,200,150,500,500   // GRAB THE WOBBLED SCREEN
            DRAWSPRITE 0,0,0   // DRAW THE TEXTURE
         STRETCHSPRITE 9998,340,170,170,170   // DRAW 1 SIDE
         STRETCHSPRITE 9998,0,170,170,170   // DRAW 1 SIDE SAME IMAGE
         GRABSPRITE 0,0,0,512,512   // GRAB NEW TEXTURE
  //-----------------------------------------------------------------------

         FOR y=1 TO 768
         a=a + 0.005 * 2
         DRAWSPRITE y+6001, COS( a + y ) * y/4, y
         NEXT
         GRABSPRITE 9997,200,150,500,500
         DRAWSPRITE 0,0,0
         STRETCHSPRITE 9997,170,0,170,170
         STRETCHSPRITE 9997,170,340,170,170
         GRABSPRITE 0,0,0,512,512

//------------------------------------------------------------------------
            FOR y=1 TO 768
            a=a + 0.005 * 2
            DRAWSPRITE y+5001, COS( a+ y ) *y/4, y
    NEXT
      GRABSPRITE 9998,200,150,500,500
            DRAWSPRITE 0,0,0
            STRETCHSPRITE 9998,340,340,170,170
            STRETCHSPRITE 9998,170,170,170,170
            GRABSPRITE 0,0,0,512,512
RETURN
ENDSUB
#17
2 Effect from Second Reality
All done with standard GLB commands.

1st Fake plasma Cube: FC used palette rotation , not  sure how to do that  so I did it my way.

2nd Overlapping/bending circles: takes 10 seconds to render.tried this with a rotating palette but it looked bad.

I will upload code once it cleaned and optimized if interested
Let me know if you like or have idea's

circles.exe
cube.exe
#18
Unlimited Sprites Effect


Just a simple bit of fun,  wanted it to look like this http://www.youtube.com/watch?v=8hvzo_swB5s but that's a bit out of my math skills,
so I stole the music instead.Its more like ULMs version without the scroller. http://www.youtube.com/watch?v=gabkyez7Txk.

Runs better in a window, fullscreen shows update lines.
#19
I know this has come up a lot in the forums, Ive read nearly every post in the search but no joy.
Ive tried ogg in mono 8kh 11 22 etc all encoded with audacity for music, no sound on 3 different android devices
ive tried wav mono for sound effects still no sound, all work with windows (mp3 replaced ogg).

anyone got a working test project that works on android.

I Know MrTAToads ocean loader runs from the playstore, but is it using Standard glbasic or Android extra (which ive not installed/read instructions yet )

hopefully some one can give me pointers on what i missing

cheers all





#20
Hi all
Never had to  use DATA storage in my code so far, however now i need to store 255 static  values between 0 and 9
i also need to  read the value at different positions e.g. position 10 = 0 or position 220 = 6
I've looked at help file and examples for data,array etc (some to complicated for me)
came up with this test

GLOBAL a
STARTDATA keys:
DATA 3, 3, 5, 5, 8, 1, 3, 9, 8, 0, 5, 9, 3, 9, 4, 1, 1, 0, 9, 4, 3, 0, 2, 2, 8, 4 // will have 255 values
ENDDATA

RESTORE keys
WHILE TRUE
READ a
PRINT a, 100,100
SHOWSCREEN
KEYWAIT
WEND

this will read the numbers in order
have no idea how to make it go to postion 50 or 12 and read data.

Anyone have any better ways, or  pointers

Cheers