GLBasic: Native or Interpreted?

Previous topic - Next topic

coder14

My recent roadblocks with GLB have gotten me searching for an easier IDE to do iOS & Android development. One important factor is compilation.

GLBasic apps can get a little big - even a simple HELLO WORLD comes in above 1MB.

Are GLBasic apps compiled to native iOS/Android code or are they interpreted?

mentalthink

GLBasic COmpiles in C++, I' m not sure 100% but I think don't translate to objective-C or Java... in Android GLbasic uses the NDK  , this it's based in C++ , but sometimes I read about the accuracy in speed and some Masters comments it's about 96-97% equal than if the code was C++ pure.

coder14

Basic4Android claims:
- Compiles to native bytecode. No runtime libraries are required. APK files are exactly the same as APK files created with Java / Eclipse
- Performance is similar to applications written with Java


But techBasic and AGK use players or interpreters to run BASIC code.

I think that GLBasic uses GCC to compile to native iOS app, but how does it compile to Android DVM byte code?

spacefractal

Glbasic compiled to c++. On Android there is some java code as well, but its all code to setup activity as well example loading/copy assests and such thing. Howover the main project is compiled to c++. This is why Glbasic cant been ported to example Windows Phone 7, which uses C# (except eventuelly wrapper around with html5/javascript code).

The final size is due the various required library, which cannot been avoided. A example on a library is SDL, which is used so ports could been easier done. This is why a "Hallo World" is over 1mb. This cannot been avoid.

My game, Greedy Mouse, which have command count about over 12000, is little over 3mb size on Windows.


Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

coder14

But the roadblocks are still too many. GLBasic claims to support iOS & Android, but does not include stuff like camera capture, sensor i/o, phone functions, widgets, etc.

Big difference between "can compile to" and "support". Still too new for these platforms.

fuzzy70

Quote from: coder14 on 2013-Mar-17
But the roadblocks are still too many. GLBasic claims to support iOS & Android, but does not include stuff like camera capture, sensor i/o, phone functions, widgets, etc.

Big difference between "can compile to" and "support". Still too new for these platforms.

Open up Xcode & create a 3D spinning cube with music playing or do the same in Android with the SDK/NDK. Chances are you can't as you do not have the relevant coding skills in each platforms native toolset to do it.

Same goes for ANY platform like Wii, PS3, Xbox360, Windows etc etc in that if you want access to all features & such then the native SDK/NDK is the (only in most cases) way to go.

GLBasic is not perfect, but then again nothing is otherwise everybody would be using that instead, however point me to another package that supports so many target platforms & that's where GLB's strength lies. Supporting so many different targets can be in some cases a weak point for GLB as it means certain features cannot be supported due to the possibility of causing problems on other targets. Basically (no pun intended) it's a case of swings & roundabouts so to speak & that's where your roadblock lies.

I do not use GLBasic for native windows apps as I use visual studio for that or Delphi but for games etc then I use GLB which I feel it is geared more towards.

Technically the word "Support" can mean plenty of things but one definition is "The ability to execute a persons own program natively"  which GLB does when it "Compiles" your program so in that scenario there is no "Big difference". 

Simply put any kind of development requires reading up and/or researching what options are available along with their strengths/weaknesses. GLB does not work for everyone in the same way as C++,JAVA etc doesn't work for others but until you try them you never know. You have tried GLB & found that certain features you require are not available which is a shame.

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)

dreamerman

Main purpose of glBasic is to make games, apps also can be made but on such platforms you need to use specific inline code for particular platform.
What OpenGl native game/application on Android uses such features that you have specified? Probably not many and you could count them. That is obvious, if you want to make some interactive app, use tools designed for apps, not for games. Of course you can find others 'professional tools' that will allow to use of additional phone features, because they cost much more than glBasic, and are developed by large teams = they can add more stuff.

And when it goes to native, or interpreted.. Basic4Android -> converts to java, thats not native, whatever you will call it, bytecode, managed or other...
They were topics, about that why compiled files have such size, what they contain and so on.. So for me there is no point to repeat same thing again.
I'm not telling you 'man GLB is the best, others are crap, buy it now!' or something like this.. just that: each tool/language is designed to do other things, or similar things in other way, and for multi-platform 2D game developing GLB is very good.

Check my source code editor for GLBasic - link Update: 20.04.2020

kanonet

From your list only accelerator sensors are supported on iOS/Android in native GLB. This is cause a tool that is designed for many platform can never compete with a tool that is just for one platform. Its 'horses for causes'.
But you can extend GLB with INLINE and native API calls, so you will find libs in the forum that adds a few more features, like camera on iOS (if i remember right). If you know how to natively code on your target platform you could even add more features (and maybe publish your lib for us others).
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Ian Price

#8
Seriously? Your'e complaining about an .EXE of 1MB for "Hello World"? I dare you to find a machine produced in the last 10 years that finds a 1MB executable too large to fit in it's memory. You will also notice that no matter how big your code gets that .EXE doesn't really get much bigger. It contains pretty much everything you will need for your program, no matter how large it is.

You complain about GLBasic missing certain features from certain hardware, but fail to grasp the fact that the language is called GL "BASIC". Please list all the BASIC like languages available that support all those features on Android and iOS deveices as well as support the multitude of other devices that GLB does.

You also forget to mention just how easy it is to create programs in GLBasic, how fast they run and how many systems they run on without ANY modifications to your code.

The features and functions you require CAN be achieved with GLBasic and APIs - but you have to do some of the work to import and incorporate them. GLBasic can't be expected to do absolutely everything for you.

Anyway, I smell trolling, so I'm locking this thread.
I came. I saw. I played.