BASIC

Recent Posts

Pages: [1] 2 3 ... 10
1
GLBasic - en / Issue using registration code in 15.238
« Last post by kwagner on Yesterday at 10:21 PM »
Hi all :) It's been a couple years since I used GLBasic and I wanted to get back into it.

I downloaded the latest from the site (found out about the steam version after) and let it update.

I then put in my code and it said "your license code is correct. thank you for your support." and then remained the trial version. I tried restarting and running as admin and same thing. I then found out that no matter what I put as the license code (for example a blank space or the letter b) I get the same message. Any ideas?

By remain the trial I only see win32 and win32dll as multiplatform options and I still see the registration window.

Thanks
2
GLBasic - en / Re: Adding Admob & Basic Game Controller Support
« Last post by bigsofty on Yesterday at 10:18 PM »
Well done Mr Plow, I know what a PITA this stuff can be!  :good:
3
GLBasic - en / Adding Admob & Basic Game Controller Support
« Last post by MrPlow on Yesterday at 05:05 PM »
Hi All,
For GLB users that are interested in Android Studio development and want controller and in-app Ads.
Below are KEY() controller mappings and Android Studio project source changes required.


GAME CONTROLLER - GLB change only - no change in Android Studio
============

STANDARD USB GAMEPAD / XBOX Button Mappings

(see pic)

e.g. IF KEY(96)=TRUE THEN A_BUTTON=PRESSED




ANDROID ADMOB with Android Studio - Source changes to SDLGlbasic.java etc.
========================

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


Step 2

Open SDLGlbasic.java in AStudio

At the "imports section" add following

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;


Add following variable in bold into main class:

public class SDLGlbasic extends SDLActivity {

    public static InterstitialAd mInterstitialAd;


Step 3

in OnCreate method after line

AndroidId = "";


Add following >

     // init ads
        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {}
        });

// ******interstitial ads

       
        mInterstitialAd = new InterstitialAd(this);
        mInterstitialAd.setAdUnitId("ca-app-pub-3940256099942544/1033173712"); // replace test id with your own
       

        mInterstitialAd.loadAd(new AdRequest.Builder().build());

        mInterstitialAd.setAdListener(new AdListener() {
            @Override
            public void onAdClosed() {
                // Load the next interstitial.
                mInterstitialAd.loadAd(new AdRequest.Builder().build());
            }

        });


Step 4

Find the onResume method:

After the glbasicOnPause command add >


        mInterstitialAd.show();


@Override
    protected void onResume() {
        Log.i("glbasic", "OnResume()");
        glbasicOnPause(0);
        mInterstitialAd.show();
        SDLActivity.setWindowStyle(true);
        mIsPaused = false;
        if (androidAudio != null) { androidAudio.resumeMusic(); }

        super.onResume();
    }


Now you should have ads showing when app is 'returned to' after user leaves or jumps out.

Good luck!






4
Announcements / Another Asteroids using AStudio setup
« Last post by MrPlow on 2019-Nov-16 »
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
5
GLBasic - en / Re: Android - has anyone tried yet?
« Last post by MrPlow on 2019-Nov-16 »
I will soon post how I got the ads working in Pause or Jump out of app :)
6
GLBasic - en / Re: Android sounds not always playing
« Last post by MrPlow on 2019-Nov-16 »
On monday - I will post how to add the ads - it's quite straightforward...

I have the burger and the avocado game ready for android, as far as coding, controls and screen goes. I have no idea on how to add the ads.
I still have to save for the android license but I struggle between making another PC game against taking time to finish the android port.
Most probably before march I can come up with something, then I will come around pestering you guys for advises! :)
7
Nice, ok, so sorry, but I just realized 64bit compiling is part of the Steam version. Do I have to buy this version again?  :(


same here
8
GLBasic - en / Re: Box2D in GLBasic?
« Last post by Bluepixel on 2019-Nov-15 »
@erico
sadly not, here is the error message;

Quote
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.15.394 SN:1e80bd95 - 3D, NET
"glbox2d.gbas"(35) warning : GPC1001 probably unassigned variable : screenWidth
"glbox2d.gbas"(35) warning : GPC1001 probably unassigned variable : screenHeight
"glbox2d.gbas"(43) warning : GPC1001 probably unassigned variable : mbr
Wordcount:68 commands
compiling:
In file included from C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\sim_box2d.cpp:11:0:
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp: In member function 'virtual void b2PolygonContact::Evaluate(b2ContactListener*)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp:53:45: error: 'memcpy' was not declared in this scope
  memcpy(&m0, &m_manifold, sizeof(b2Manifold));
                                             ^
In file included from C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\sim_box2d.cpp:12:0:
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp: In member function 'virtual void b2CircleContact::Evaluate(b2ContactListener*)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp:54:45: error: 'memcpy' was not declared in this scope
  memcpy(&m0, &m_manifold, sizeof(b2Manifold));
                                             ^
In file included from C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\sim_box2d.cpp:13:0:
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp: In member function 'virtual void b2PolyAndCircleContact::Evaluate(b2ContactListener*)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp:54:45: error: 'memcpy' was not declared in this scope
  memcpy(&m0, &m_manifold, sizeof(b2Manifold));
                                             ^
In file included from C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\sim_box2d.cpp:25:0:
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp: In constructor 'b2BlockAllocator::b2BlockAllocator()':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp:63:52: error: 'memset' was not declared in this scope
  memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk));
                                                    ^
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp: In member function 'void* b2BlockAllocator::Allocate(int32)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp:120:62: error: 'memcpy' was not declared in this scope
    memcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk));
                                                              ^
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp:121:79: error: 'memset' was not declared in this scope
    memset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk));
                                                                               ^
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp: In member function 'void b2BlockAllocator::Clear()':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Common/b2BlockAllocator.cpp:202:52: error: 'memset' was not declared in this scope
  memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk));
                                                    ^
In file included from C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\sim_box2d.cpp:36:0:
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Collision/b2BroadPhase.cpp: In member function 'uint16 b2BroadPhase::CreateProxy(const b2AABB&, void*)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Collision/b2BroadPhase.cpp:260:100: error: 'memmove' was not declared in this scope
   memmove(bounds + upperIndex + 2, bounds + upperIndex, (boundCount - upperIndex) * sizeof(b2Bound));
                                                                                                    ^
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Collision/b2BroadPhase.cpp: In member function 'void b2BroadPhase::DestroyProxy(int32)':
C:\Users\Bluepixel\Desktop\box2dinterfaceinglbasic\box2dtest\Box2D/Source/Collision/b2BroadPhase.cpp:340:104: error: 'memmove' was not declared in this scope
   memmove(bounds + lowerIndex, bounds + lowerIndex + 1, (upperIndex - lowerIndex - 1) * sizeof(b2Bound));
                                                                                                        ^
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 13.4 sec. Time: 11:10
Build: 0 succeeded.
*** 1 FAILED ***
9
GLBasic - en / Re: Box2D in GLBasic?
« Last post by erico on 2019-Nov-15 »
I see, that is more complex than I thought it would be.
Box 2d is probably a faster solution than creating a system on your own.
Did you make it work?



10
GLBasic - en / Re: Android sounds not always playing
« Last post by spacefractal on 2019-Nov-14 »
adb.exe used when you launch your emulator and install on your phone. no idea how its works instance wice.
Pages: [1] 2 3 ... 10