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 - MrPlow

#21
Hi
When I try the Win64 compile I get the .exe generating in the Win32 folder? Is this just doing Win32 or is it compiling and putting into wrong folder?

Thks
#22
Hey,
New one - early access - more features and levels to add...

https://play.google.com/store/apps/details?id=com.gazzappergames.starblaster
#23
Hi Sf and Gernot

Not sure how much this is down to my testing device
But two versions of a similar game Ball Breaker game - one on older compile (using 12.308) and one using v16

They should play identical - but the v16 is showing some lag and twitchy ball movement.

I am testing multiple builds - tweaking as I go - but the issue is still there - something intermittant.
#24
When compiling a new clean project
=======================
Build command failed.
Error while executing process C:\Android\android-sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Lenovo\Documents\GL_PROJECTS\GLBasic\NEWGAME\distribute\android_studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Lenovo\Documents\GL_PROJECTS\GLBasic\NEWGAME\distribute\android_studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-23 NDK_OUT=C:/Users/Lenovo/Documents/GL_PROJECTS/GLBasic/NEWGAME/distribute/android_studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\Lenovo\Documents\GL_PROJECTS\GLBasic\NEWGAME\distribute\android_studio\app\build\intermediates\ndkBuild\release\lib APP_PLATFORM=android-18 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

usage: ldflags_to_sanitizers.py [GLOBAL_FLAGS] --module [MODULE_FLAGS] [--module [MODULE_FLAGS]...]
C:/Android/android-sdk/ndk-bundle/build//../build/core/build-all.mk:94: Android NDK: WARNING: There are no modules to build in this project!   
C:/Android/android-sdk/ndk-bundle/build//../build/core/setup-toolchain.mk:127: COLOR\distribute\android_studio\app\jni\Android.mk: No such file or directory
make: *** No rule to make target 'COLOR\distribute\android_studio\app\jni\Android.mk'.  Stop.
#25
GLB failed to open after latest update!

GCC_merge.exe disk write error message

#26
Has there been another update on Android?
All of a sudden  my Android Compile is failing.

#27
Hi Guys

Did a number of updates to my LOGO Turtle app

Latest being the Dark theme seen here  =D

https://play.google.com/store/apps/details?id=com.gazzappergames.simpleturtle.logo.educational

#28
Hi Guys

Noticed something on this and wanted to offer tip on using Android Back button...

If using multiple KEY(1) to test for back presses, use it once per loop and store in variable.

As I found KEY(1) did not detect on my second statement - gave me a headache for few hours before I copped the issue.

Code (glbasic) Select
LOCAL getbackkey = KEY(1)

IF getbackkey AND...

IF getbackkey AND ...


#29
GLBasic - en / Debug
2020-Mar-30
Hi All,

Is there an easy way to write DEBUG-like output to the immediate window without DEBUG - without the programming needing to be DEBUG mode?
Reason being my Antivirus software does not like the DEBUG mode.

#30
When using and trying to test a web page url if the webpage is unresponsive the commands hangs the program...even with TRY and CATCH - it still hangs...any idea how to get around this?

TRY
NETWEBEND
CATCH

#31
Thought it would be good to have a bug topic for the Android Stuff...

Let me kick it off ...

My app is reporting errors for some devices with Tilt Changes...not sure if related to the admob action in the Tilt but it is a the most common of the crashes to date...still low though...

Here is the offending line on SDLSurface code

Line 1903:   SDLGlbasic.TiltSensor(-x / SensorManager.GRAVITY_EARTH,y / SensorManager.GRAVITY_EARTH,event.values[2] / SensorManager.GRAVITY_EARTH); //****GLBASIC****

java.lang.NullPointerException:
  at org.libsdl.app.Interstitial.show (Interstitial.java:32)
  at org.libsdl.app.SDLGlbasic.TiltSensor (SDLGlbasic.java:762)
  at org.libsdl.app.SDLSurface.onSensorChanged (SDLActivity.java:1903)
  at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent (SystemSensorManager.java:1014)
  at android.os.MessageQueue.nativePollOnce (Native Method)
  at android.os.MessageQueue.next (MessageQueue.java:336)
  at android.os.Looper.loop (Looper.java:197)
  at android.app.ActivityThread.main (ActivityThread.java:7762)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1047)
#32
Hi Guys

I am using GETJOYX(0) to get Tilt working on Android - but no JOY so far (sorry for the pun!)

I tried to do a keycode scan on it too but no luck either.

checking for GETJOYX(0)>.5 and  GETJOYX(0)<-.5
#33
Working on this for Android and PC





https://www.youtube.com/watch?v=TTTEKQBOf0o
#35
Space Fractal:

Im diddent split this thread correctly, but its was me that tried to property implements admob to glbasic, so we could use java calls to show the ads. Its turned out its was impossible to call java that ways, but required to been inside the Activity. So im have chosen to remove it again and let the original MrPlow implemented stays as its was 100% legit post about it and possible way.

-------------

Thanks SF

I will try your file!!

Also updated steps above to include dependancy for build.gradle file.
#36
Hi All,
For GLB users that are interested in Android Studio development and want controller and in-app Ads.

ANDROID ADMOB with Android Studio

Requires the *New* versions of SDLGlbasic.java and Interstitial.java AStudio files. The new update from SF (Im also might edit this post) works perfectly for instant placement of Interstitial Ads in your Apps. This update is still not pushed to steam.

First at all you need a newer version of Android Studio glbasic build, that is now on steam as a beta:
https://www.glbasic.com/forum/index.php?topic=11391.0

Step 1

AndroidManifest.xml - add meta info

<application
        android:isGame="true"
        android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher"
        android:allowBackup="true"
        android:banner="@mipmap/banner"
        android:hardwareAccelerated="true">
       <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713" />
<!-- replace testid with own id -->

....
  <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
    </application>

</manifest>


Step 2

Open string.xml in the res > values folder
Add the following:

<string name="MobileAds_setAdUnitId">ca-app-pub-3940256099942544/1033173712</string>

Note: When live you can replace testid with your own app advert id provided by Admob console



Step 3
open build.gradle file within the "app" folder in Android Studio
add the bolded item to dependancies, so its look like this (its near the bottom of it and the old one can been replaced):

Code (glbasic) Select

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.gms:play-services-ads:18.3.0'
}


in the soon steam update, then the lines has allready been added for new projects, but admob just commented out.

Step 4

Open Android Studio, right click on SDLGlbasic.java and then let it Open in Explorer from the file you have downloaded from the top of the post.

Those 3 files should been placed and eventuelt replace the Java files in that folder.

Open SDLGlbasic.java in AStudio

** New version of SDLGlbasic.java is being pushed to Steam soon, so you can skip this step over **

Step 5

In GLBASIC when invoking the ads there is no need to re-load ads - the admob listener takes care of that.

Code (glbasic) Select

?IFDEF ANDROID
IMPORT "C" const char* android_JAVACALL(const char* string)
?ENDIF

FUNCTION JavaCall$: callStr$
?IFDEF ANDROID
STATIC res$
res$ = android_JAVACALL(callStr$)
RETURN res$
?ENDIF
ENDFUNCTION


The above function let you call Java function from Glbasic.

// Run after a command press or touchscreen to start a gameloop / next level / or jump back to main menu
// This call the ads its self and also load a new one.
// Also if a ads has been failed, no ads will been shown, but will try again next time you using it.

JavaCall$("ads_show")

// This returns the current status of ads, if something is happens, fails or succes.
Statust$=JavaCall$("ads_status")

Good luck!

Thanks to SF for sticking it out and getting it sorted in the end!

------

SPACE FRACTAL: This works DOES work now, and im ends with to use tilt, keys and touch events to pickup the JavaCalls from a Activity.




ADDING GAMECONTROLLER for Android Studio

Space Fractal: This section is heavy edited as its now much better implemeted and now can use all the JOY() commands for all officiel Google supported JoyPads. Those is controllers that works its self on the system navigation as well ouya. Im have tested successful with PS4 and Microsoft One wired controllers on a Android 9 based Android TV. Im do of course cannot guarantee any joypads works of course.

Now you can use GETJOYNAME$(ID) to get a kind of joystick, if there is any of them. GETJOYNAME$(0) is allways to been used by like a TV Remote as well for TILT. GETJOYNAME$(1) when connected is used by the first connected gamepad controller. Howover with wired controllers on a Android TV might have ID as Player 3, not as Player 1. Be aware of that!

Currectly back, menu and start buttons is NOT supported, howover they do returns a KEY() value throught.

when using Gamecontrollers with KEY():

You can also uses KEY() command for checking values as well. You can respons to controller by KEY() values using the image seens here. Also if you do a remapping/rebind feature, then you could support even more controllers. But this is for single player only as its will been checked by all game controllers by once!

The values a game controller would return, would have those values seens on the image. Sticks can also return a float to the KEY() commands as well. Been beware of that. Howover this is disabled by default, and can been enabled by editing the strings.xml.

You can also uses Tile (using the accelerator sensor), which is routed to the GETJOYX(0) and GETJOYY(0) commands, while Orientation is routed to GETJOYRX(0) and GETJOYRY(0). The later one is the orientation (360 degree) converted to axis.
#37
Check it out...

https://play.google.com/store/apps/details?id=com.gazzappergames.asteroids.pewpewshooter


- USB Game Controller (please let me know if this works for you)
- Classic Asteroids Gameplay
- In Game Ads on Pause or Home buttons.

Feedback welcome...Make sure version 1.08 or more
#38
Hi

I am using stopsound to help create a audio effect in my app but notice this affects other channels as well as my intended sound.
Any idea of how to improve or guarantee a sound playing?
BTW - only happening so far with the mobile version
#39
Announcements / Book
2019-Nov-08
Hi Guys

For any of you that like to read! *prepare for shameless plug*

My book is available on all the best online bookstores :) And is a popular Gift Item in the Game Programming categories...

https://www.amazon.co.uk/Micro-Kids-Adventure-Spectrum-Commodore/dp/0993474462/

Aimed at those who grew up with Micros...




#40
Bug Reports / Netwebget$
2019-Oct-31
For those that might experience this issue in v16

I notice strange block chars appearing in my highscore tables at the start and end of a netwebget$.
It must be unicode issue or something...

Below is my fix for the issue..

Code (glbasic) Select

scoretable$=NETWEBGET$("www.domain.com","/scoresxxxxxx.php",80,512,4000)

// cleanup string
LOCAL mstr$
FOR x = 1 TO LEN(scoretable$)
mstr$=MID$(scoretable$,x,1)
  IF ASC(mstr$)<32 OR ASC(mstr$)>96
      IF mstr$="|" THEN newscore$=newscore$+mstr$
  ELSE
      newscore$=newscore$+mstr$
  ENDIF
NEXT