A Few Questions.

Previous topic - Next topic

maltic

Hello everyone, as you may have been able to deduce from my post count I am new here. I have been looking at GLBasic for a while and I have a few questions:

I am impressed by the array of features GLBasic has (3d support, networking, built in libs etc) but how well do these translate to the various build targets? For example could I literally code a complex game once and run it on iPhone (provided I add the right resolution and touch screen controls)?

Also, how easy is it to interface with C++? Could I, for example, write most of the logic in C++, and then have a main loop written in GLBasic that basically executes the networking and drawing..etc Or better yet can I use the SDK (and hence all GLBasics features) from C++, then have it compile for all GLBasics awesome targets? If so how?

Ian Price

Welcome :)

Quotecould I literally code a complex game once and run it on iPhone (provided I add the right resolution and touch screen controls)?
Yes and a variety of other platforms too :)

You can use inline commands to access C++ code. However, I'm not sure of the limitations and from what I understand the speed difference for many of GLB's features compared with C++ is so miniscule as to make using mainly C++ pointless - you might as well do as much as you can with GLBasic, which is quicker and easier to code with. Although I haven't coded in C++ for many, many years now, so don't necessarily take my word for it.
I came. I saw. I played.

maltic

Quote from: Ian Price on 2011-Oct-23
Welcome :)

Quotecould I literally code a complex game once and run it on iPhone (provided I add the right resolution and touch screen controls)?
Yes and a variety of other platforms too :)

You can use inline commands to access C++ code. However, I'm not sure of the limitations and from what I understand the speed difference for many of GLB's features compared with C++ is so miniscule as to make using mainly C++ pointless - you might as well do as much as you can with GLBasic, which is quicker and easier to code with. Although I haven't coded in C++ for many, many years now, so don't necessarily take my word for it.

The only reason I would want to interface with C++ would be to use OOP code for my game logic -- its just the way I am used to doing things.

Hatonastick

#3
Well interestingly enough with the way the new Types work you can go object orientated to a certain degree using GLB.  You don't have to do it 100% procedural.  Why?  Because in GLB types can contain functions.  Read this article here:

http://www.glbasic.com/forum/index.php?topic=4777.0

So think of Types in GLB as objects.  I used an OOP-style Type to create a self contained object that generates, displays and updates (to a given area) starfield after this feature was added.

Edit:  I don't believe this...  I went to find the code so I could post it as an example and discovered something has been going majorly wrong with my backups.  All the code for my Time Pilot-style game has gone.  All I've got is an executable of one test/example from ages back...  :'(

Edit:  Well the good news is I found a copy of it all on my Netbook.  The bad news is it's an older version and doesn't have the all-in-one-type example of a self-contained Starfield system.  So I can't show you an example, sorry.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Ruidesco

Types can contain both variables and functions, so apart from not having property/method scopes and constructor/destructor you can treat types as mini-objects.

maltic

Quote from: Ruidesco on 2011-Oct-23
Types can contain both variables and functions, so apart from not having property/method scopes and constructor/destructor you can treat types as mini-objects.

You could make a function called "creatObjectType()" that acts as a constructor I guess. But still, I find inheritance and polymorphism extremely useful in game development -- but I guess I can live without them if it means proper cross platform development. I know monkey offers proper OOP (and generics) but its extremely buggy (I find) and has no networking support, which is what I really wanted (dont worry I'm not some fool trying to make a solo MMO).

Hatonastick

Quote from: maltic on 2011-Oct-24(dont worry I'm not some fool trying to make a solo MMO).

I'd forgive you if it was a MUD, but of course no-one makes those these days.  =D
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).