GLBasic forum

Main forum => GLBasic - en => Topic started by: Leon on 2016-Aug-09

Title: Questions about GLBasic
Post by: Leon on 2016-Aug-09
Hello,
I've got a couple of questions about GLBasic.
Is GLBasic still in development/are there still people working on improving GLBasic, adding new platforms and stuff like that? I mean, the websites says so, I guess, but it seems that it is not completely up-to-date. Is there a built in physics engine or maybe a particle system?
Thanks in advance for any answer! :)
Title: Re: Questions about GLBasic
Post by: Slydog on 2016-Aug-09
Gernot has still been active in these forums, but I'm not sure of his intentions with GLBasic.  Development seems to have slowed down as of lately. It's a big job maintaining a language that has grown this large by himself, while adding new platforms, and keeping the platforms up-to-date.  He has had a lot of help from members of this community, but even so, it's probably getting hard to maintain.  And it's not like he's making money doing this, maybe enough to cover the server costs (I have no idea really).

Physics Engine: There is no built in physics engine.  People have ported Box2D to GLBasic, but I haven't tried it, or know its current status.  And for 3D, some people were dabbling with iXors(sp?), but I don't think that made it too far.

Particle System: There is no built in particle system. Some people have implemented their own 3D systems in these forums.  They look quite capable in my opinion.  Do a search and you should find something. Not sure about 2D.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-09
Thanks for your answer.
That really sounds like support will be dropped soon :(
Hopefully not, since I was thinking about buying a copy of it.
Title: Re: Questions about GLBasic
Post by: MrPlow on 2016-Aug-09
Hi Leon

There are many using for PC prototyping for games, or like myself making mobile games with ads or inapps.
I find it quite good for Android and Windows PC as that my primary focus.

It allows inline C++ and it is very adaptable for adding extra features...

I have been advising that the website need a new homepage and some shiny UI as I believe more people would try it :)

For the price of the licence you cant go wrong :)
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-09
You're completely right! The website would need a major overhaul.
AppGameKit for example, which uses a version of BASIC too, is on Steam and therefore much better advertised.
I would mostly use GLBasic for Android and iOS development, too.
Title: Re: Questions about GLBasic
Post by: spacefractal on 2016-Aug-09
im also talked about glbasic on steam too. Im have two games ready for steam, releasing on Friday (if not something got wrong, like last Friday, where they could not add packs) and got postponed a week. Those would been the first glbasic games on Steam. Im got lucky to get a publisher after im put both my games on GreenLight, and allready have earn quite money.

If glbasic was on steam, its would been much easier to mensteam it, when first its have been setup (There is a lots to setup, when first finished, then its pretty easy to update).

Here the glbasic its self could been free, but all added platforms could cost money (or the full version with all platforms with reduced price). Im can help with Gernot eventuelly.

Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-09
Congratulations!
Please do so! I would love to see it on Steam.
Title: Re: Questions about GLBasic
Post by: MrPlow on 2016-Aug-10
Great stuff SF! Great news on getting a publisher to market your games :D

I for one with buy the Steam version :)
Title: Re: Questions about GLBasic
Post by: dreamerman on 2016-Aug-10
It all depends on what you need.
Generally I would describe GLBasic as rather game/demo oriented procedural BASIC-similar programming language that sit's on top of C++ core. As it's a language, but not a rapid game dev tool or game engine you don't get all fancy features like physics, particles, animations (and so on) out of box, but you can make/code your own, and thanks to it nature (c++ inline) you can use any custom library for that (or use already made wrappers that are on available on forum).
For another generic platformer, AngryB clone, simple logic, 2d shooting games... it will of course require more work than rapid game dev tools, but it gives you much more freedom, and ability to make more complex games, as just more depends on you as the programmer. Whatever tool you will use it takes more than working game mechanics to have ready to publish mobile game.
Another advantage is that GLB produces real native code with all graphic stuff based on openGL, so it's really fast (e.g. 2d game that needs tons of destructible objects).
If you are not sure, download demo - it's fully functional, look around on forum, grab some example codes, see how they work and think about what you want to have in your project.
Check some published projects made with GLBasic: iOS (https://www.glbasic.com/forum/index.php?topic=3857.0) and Android (https://www.glbasic.com/forum/index.php?topic=6213.0)
Notice that if you are looking for even faster simple prototyping language take a look at html5/js tools as they take almost no time to compile (GLBasic uses c++ to JS translation with emscripten so it takes some time to make html5 output with it).

GLBasic is still maintained, all bugs are fixed from what I know (with help of some community members). But on other hand don't expect adding 'game' changing features to it, at it's more like real indie dev tool.
Future of GLBasic is of course large topic, any website refresh or even putting GLB on Steam would help to get larger user base, but there is other thing: there is so many game developing tools/languages that for potential customer/user it is difficult to discern what to use/buy. In addition to recent price drops/license changes on some more recognized software it would require some good marketing, with support from user made apps (one very successful mobile/steam game with 'GLB splash screen/or made wit GLB' would generate more traffic than ad banners on other websites), and maybe some new tutorials / more complex sample projects.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-10
Thanks for the long answer.
But I don't really get why it should take longer to program a game using GLBasic than with any other tool. The only reason I could see is, that it doesn't have a visual editor for designing levels.
The only downside GLBasic really has is that it's not open source like some of its alternatives, which would be pretty useful in its current state.
As the games I would like to create don't necessarily need a physics engine I only have to write a particle engine. Because of that I would like to know if ZOOMSPRITE etc are fast enough when used with hundreds of sprites or not.
Title: Re: Questions about GLBasic
Post by: dreamerman on 2016-Aug-11
Yeah just you don't get some features out of box like state/animation handling for in-game objects so you need to code them by your self.
Basically I would advise to use StartPoly / PolyVector commands with all images needed for whole particle engine on one sprite  (as sprite atlas) so it would just use one openGL draw command.
You can take a look at those topics:
Sprites or PolyVectors - Mixed Opinions (https://www.glbasic.com/forum/index.php?topic=6416.0) and Sprite Speed Tester (https://www.glbasic.com/forum/index.php?topic=6341.0)
For some usefully particle example codes look here: X_SPRITE replacement (https://www.glbasic.com/forum/index.php?topic=7992.0) and SpriteZ - 2d particle engine (http://www.glbasic.com/forum/index.php?topic=3550.0)
Title: Re: Questions about GLBasic
Post by: spacefractal on 2016-Aug-11
Glbasic is no longer 100% closed source. If you have access to the bonus area, you can get the glbasic source code. I'm got it so I'm could fix android issues and port it to 64bit iOS.
Title: Re: Questions about GLBasic
Post by: bigsofty on 2016-Aug-11
Inline C++ is a great advantage over other game coding languages. If you need that bit of extra grunt, it's GLBs secret weapon. Even if your not a C programmer, being able to write a C snippet, in the middle of your code, without having to deal with linkers and compiler options, makes it as easy as possible for the C beginner.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-11
Thanks for the tips, dreamerman  :) Maybe I'll have to open a new thread about it but I think I'll be able to write my own particle engine.
How can you gain access to the bonus area? It doesn't seem as I can. :( :(
What can Inline C++ be used for? Is it just used for extra speed?

Title: Re: Questions about GLBasic
Post by: MrPlow on 2016-Aug-12
Leon,

If you get proficient at coding with GLBASIC it is FASTER than a RAD tool for game dev.
Copy & Paste beats Drag and Drop every time....re-useable code and functions that you can use in all your games.

It has its limits but also lots of strengths too. Choosing a language based on having particle effects is not what you want to be doing. If the language performs well for the chosen platform then that is the most important thing.

For Android development I use GLBASIC because:

- I can re-use code and functions easily
- Small footprint of only 2mb + code + assets (unity is minimum of 20mb)
- I can get a test prototype with zero assets working quickly
- Game dev functions: Sprite handling, Animations, Collision, Joysticks, etc.
- I have Admob ad support and IAP functions if I want them
- I enjoy using the language and it user-friendly syntax



Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-12
Drag and Drop won't be an option for me. ;)
Of course I won't pick a framework/engine just because it has particle effects but having some prebuilt functions like that is always nice to have.
Are Admob and IAP Android only or can they be used on iOS, too?
"- Small footprint of only 2mb + code + assets (unity is minimum of 20mb)" Great to hear that GLBasic can produce such small Apps/Executables!
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-12
Oh and how can you gain access to the bonus area?
Title: Re: Questions about GLBasic
Post by: Slydog on 2016-Aug-12
The Bonus Area opens up after you make 100 posts in the forum.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-12
Wow. That's quite a few ;)
Title: Re: Questions about GLBasic
Post by: spacefractal on 2016-Aug-12
As Gernot, which might give you access. Its can been happens we add post to you. Im do cant do that. You sound like a nice guy.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-13
Thanks, space fractal :)
Actually, being nice is something most users here have in common. :)
Title: Re: Questions about GLBasic
Post by: erico on 2016-Aug-13
Hi Leon, I would not bother with the bonus area, it is just a more closed place so people can share some betas for testing and the likes.
The real great information on our forum is outside the bonus.
Title: Re: Questions about GLBasic
Post by: dreamerman on 2016-Aug-13
On other hand GLB source is available only in bonus area so just for that it's worth of effort if you need to check/try some things.
Title: Re: Questions about GLBasic
Post by: erico on 2016-Aug-13
Is it? I thought It was only on  the community development area.
Title: Re: Questions about GLBasic
Post by: dreamerman on 2016-Aug-13
Quote from: spacefractal on 2016-Aug-11
Glbasic is no longer 100% closed source. If you have access to the bonus area, you can get the glbasic source code. [...]
As I don't have access to both of those restricted areas I'm not suer about it.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-13
Well, according to space fractal you need to reach 100 posts.
Title: Re: Questions about GLBasic
Post by: erico on 2016-Aug-13
For the bonus, yes, for the source, I think you need to be within the dev team, which is usually given to long time users and people that add important fixes/improvements.
Title: Re: Questions about GLBasic
Post by: Eric.Erpelding on 2016-Aug-14
QuoteWhat can Inline C++ be used for?
It turns out that GLBasic does not have a function that will convert a Hexadecimal string to a Decimal number.
One has to create a function containing INLINE code to call the sscanf function that will do the conversion.
Title: Re: Questions about GLBasic
Post by: dreamerman on 2016-Aug-14
As such function isn't often used in game dev, but if you need it, nothing stands in the way for you to write such function. Those are really basic things.
Even more, just look around on forum and use 'Search' option, really.
Code snippets - Math - Hex To Decimal and Decimal to Hex (https://www.glbasic.com/forum/index.php?topic=2859.0)
Title: Re: Questions about GLBasic
Post by: spacefractal on 2016-Aug-14
im also newer used this kind of functions, and yes often, you can do FUNCTION to doing this kind of thing.

Last time im used it was a CDG Player in Blitzmax long time ago.
Title: Re: Questions about GLBasic
Post by: Slydog on 2016-Aug-14
Here's a Hex to Int conversion function I found in my old code:

Code (glbasic) Select
FUNCTION HexToInt%: hex$
LOCAL i%=0
LOCAL j%=0
LOCAL loop%

FOR loop = 0 TO LEN(hex$)-1
i = ASC(MID$(hex$, loop, 1)) - 48
IF i > 9
DEC i, 7
ENDIF

j = j * 16
j = bOR(j, bAND(i, 15))
NEXT

RETURN j
ENDFUNCTION


[Edit] Ha, apparently I got my code from MrTAToad in that link posted by dreamerman!
Title: Re: Questions about GLBasic
Post by: Eric.Erpelding on 2016-Aug-14
I wrote:
QuoteOne has to create a function containing INLINE code to call the sscanf function that will do the conversion.
I should have said that one "could" create a function that calls scanf from within INLINE code.

Of course, as has been pointed out by previous posters, one can create a FUNCTION containing pure GLBASIC code that will do the same Hex to Dec conversion.
Title: Re: Questions about GLBasic
Post by: Leon on 2016-Aug-14
Well, INLINE really seems to be useful at times. I doubt that I will have to use it though.
However, I really like the idea behind it.