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

With GLB V11 currently in beta is there any rough estimate on when it will be released?

I remember a while back that Gernot was toying with the idea of charging for an update. Is this still going to happen?. It's fine with me as I don't mind helping with future development providing the money paid has substantial new features attached and not just bug fixes. To see GLB grow I'm happy to give what ever it takes to see it progress forward.

I did ask a while back but it's worth asking again if a major 3D feature is / will be added to GLB. A 3D particle engine? - Currently it's virtually impossible to do a 3D particle engine in GLB as Z order is a nightmare. I managed to fudge a very basic 3D particle engine in my game Galaxix but so many effects were impossible due to the z order issue and manually sorting particles is a huge fps drag.

So Gernot, can we please have a method of creating 3D particle effects in GLB please please please? - I'll happily pay in private a lump sum to get this ability added to GLB.
Hi, Gernot,

What's the chances of upping the abilities on the 3D side of GLB? - I'd love to have, especially for iOS :

1.. 3D particle engine. Even a very simple one would help as right now it's a nightmare to do anything like this due to z-order issues. GLB definitely needs a method for particle effects.

2.. Sphere mapping. I know this is already in but last time I checked it didn't work on iOS.

3.. Added commands for object rotation to avoid gimbal lock. True there are routines already out there but none are 100% bug free. So we could do with built in commands.

Any chance these will make it into GLB? - I'd happily pay to have them in  :good:
At the moment if you rotate a 3D object like so :

Code (glbasic) Select


x_movement x,y,z
x_rotation rotx, 1, 0, 0
x_rotation roty, 0, 1, 0
x_rotation rotz, 0, 0, 1
x_drawobj cube, 0

We suffer from gimbal lock (is that the correct term)? - For example you can't set the object to point upwards and rotate on the Y axis and keep rotating on the X axis perfectly while manipuating y or z rotations, BUT if we do something like :

Code (glbasic) Select


x_movement x, y, z
x_rotation rotx, 1, 0, 0
   x_rotation roty, 0, 1, 0
   x_rotation rotz, 0, 0, 0
   x_drawobj cube, 0

We can achieve the desired rotation of our object. We can then use x_getmatrix after the x_drawobj to get the coordinates of said object.

My question is this : How do I get the real angles rotx, roty, rotz from example 2 so I can draw other objects using the method in example 1?  I can't base the other objects inside the original push / pop matrix as they also get changed when the original object changes rotation, I need to be able to grab the x, y, z & the rotation angles for reuse.

I'm not sure if there are other bits from the output of x_getmatrix that I can use? I've looked but the don't seem to make much sense on how to use them apart from mat[12] / 13 & 14 which are the objects x,y,z.

Bit of a messy question but I think it makes sense? :)
Finally, after over a year of hard graft my latest game for the iPad is complete and submitted to Apple =D - I proudly present, Galaxix...

"We explore, fight, mine and trade. It's the only way to survive, Galaxix..."

Welcome, Pilot... To the lawless, dog eat dog solar system of Galaxix! - We hope you'll survive. Most don't.

If you do, maybe you will rise above the privateers, pirates and corporations intent on stealing what's yours and take it from them instead! - Good luck, you're going to need it. 

Trading, ship to ship combat, asteroid mining and a good dose of luck. These are just some of the skills you will need to rise from the ashes of your "rust bucket" of a space ship, and trade your way through the universe, building up a personal fortune, reputation, and defences while battling the corporations, privateers, sharks, and anyone else trying to take them from you.

As you progress, you can upgrade to better, faster and more reliable ships. Bounty hunting, asteroid mining, or trading anything from water to computers, jewellery to weapons. Kit your ship out with, lasers, homing missiles, particle weapons and shields.

Bask in the glory as you become a dominant force in the galaxy. But be careful, each action you take increases the bounty on your head and there are many who will thrive at a chance to take it all away from you.

Galaxix features a fully open play area. Go where ever you want with 1,000,000 sectors to explore. Fight when you have to, trade when you need to, go asteroid mining if you want to. It's your choice, your destiny and ultimately, your fate.


The X_WORLD2SCREEN command functions perfectly on PC as expected but the coordinates on the iPad seem to be at 0,0,0.

If possible could this bug be fixed asap as I would like to release my game soon, pretty please  :P
GLBasic - en / 3D GUI?
My main reason for this is to be able to do a 3D GUI on top of the current 3D world I've drawn. I've tried with math but after a while objects begin to bounce and vibrate, which is not good  :'(

For example, say you wanted to have a spinning cube at the bottom left of your screen while allowing the camera to fly around a model of a car. If you use X_SCREEN2WORLD and then math to point the model at the camera it works great until the camera location is far away then we get object bounce and vibrate.

Is there any way to reset the 3D world in order simply overlap a 3D gui?

I'm currently doing a simple 3D particle system for my game and it would be very handy to be able to have the X_SPRITE handle to be centred rather than bottom middle as it is at the moment.

Is there any way to use / have X_SPRITE draw images with the x,y coors referring to the middle of the image rather than the bottom middle?
Me stuck :(

Lets say I've drawn a 3D object which is rotated and then placed with X_DRAWOBJ 1, 10, 10, 10 - I then use X_PUSHMATRIX / X_POPMATRIX to draw an object just behind it with X_DRAWOBJ 1, 0, 0, -1

Is there a way to get the real coordinates of the object I drew using push / pop matrix? - Or do I have to do some whizzy math?


When apps run in windowed mode the keyboard functions as normal (e.g. ESC to exit program). however, in fullscreen mode, the ESC key and any key presses are not registered.

All worked perfect before :)

Test environment : Windows XP (via Parallels on OSX) with DirectX 9.0c

Tested with latest iOS + XCode + GLB versions.

The simple one spinning cube below works at 60FPS on iPhone & iPhone mode on the iPad but when compiled for iPad alone the frame rate drops to a mere 35FPS.

Code (glbasic) Select

SETSCREEN 1024, 768, 1

GLOBAL colWhite =RGB(255,255,255)


CreateCube(1, 3, colWhite)

LOCAL angle#

IF timeNow >= timeThen + 1000
FPS = FPSCounter
timeThen = timeNow
FPSCounter = 0

X_MAKE3D 1, 40, 65
X_CAMERA 0, 0, 0, 0, 0, 40
X_SPOT_LT 1, colWhite, 0, 0, 0, 0, 0, 40, 50

X_MOVEMENT 0, 0, 17
X_SCALING 1, 1, 1
X_ROTATION angle, -1, 0, -1


INC angle
INC FPSCounter


FUNCTION CreateCube: num, size, col
// Front Face
X_OBJADDVERTEX  size, -size,  size, 1, 0, col
X_OBJADDVERTEX -size, -size,  size, 0, 0, col
X_OBJADDVERTEX  size,  size,  size, 1, 1, col
X_OBJADDVERTEX -size,  size,  size, 0, 1, col
// Back Face
X_OBJADDVERTEX -size,  size, -size, 1, 1, col
X_OBJADDVERTEX -size, -size, -size, 1, 0, col
X_OBJADDVERTEX  size,  size, -size, 0, 1, col
X_OBJADDVERTEX  size, -size, -size, 0, 0, col
// Top Face
X_OBJADDVERTEX -size,  size,  size, 0, 0, col
X_OBJADDVERTEX -size,  size, -size, 0, 1, col
X_OBJADDVERTEX  size,  size,  size, 1, 0, col
X_OBJADDVERTEX  size,  size, -size, 1, 1, col
// Bottom Face
X_OBJADDVERTEX  size, -size, -size, 0, 1, col
X_OBJADDVERTEX -size, -size, -size, 1, 1, col
X_OBJADDVERTEX  size, -size,  size, 0, 0, col
X_OBJADDVERTEX -size, -size,  size, 1, 0, col
// Right face
X_OBJADDVERTEX  size,  size, -size, 1, 1, col
X_OBJADDVERTEX  size, -size, -size, 1, 0, col
X_OBJADDVERTEX  size,  size,  size, 0, 1, col
X_OBJADDVERTEX  size, -size,  size, 0, 0, col
// Left Face
X_OBJADDVERTEX -size, -size,  size, 1, 0, col
X_OBJADDVERTEX -size, -size, -size, 0, 0, col
X_OBJADDVERTEX -size,  size,  size, 1, 1, col
X_OBJADDVERTEX -size,  size, -size, 0, 1, col

GLBasic - en / iPad 3D Speed
Is there anything that can be done to speed up the 3D speed on the iPad? - Even using a simple 1500 polygon model and no background the frame rate is a mere 37fps - However if I compile for iPhone only then the same app runs at 60fps on the iPad.

There are a lot of 3D apps on the AppStore which run at higher frame rates with much more complicated scenes, like Galaxy of Fire II for example.

Is anyone else experiencing slow frame rates with 3D on the iPad (even with simple objects)? - If not then perhaps you could provide an example to compare?

*note* I have the latest GLB + iOS 4.2 + latest XCode
Been having some fun with the new v8 beta while developing my latest game for the iPad. Howver, I've come across some serious speed issues with the iPad side of things :(

3D slowness

A simple 1500 poly object rotating around all 3 axis, one ambient light, one camera, basically the bear essentials. On the iPhone this runs at 60 fps solid, but change resolution to 1024x768 and install for iPad the framerate drops to 37.

2D slowness

I wouldn't say the 2D side is slow on the iPad but there is an issue when it comes to fullscreen goodness. Using polyvector only there appears to be no way to do 60 fps with a full resolution background and 20+ small sprites.

Using the same methods on the iPhone you are able to shunt around dozens and dozens of sprites (with polyvector) with a fullscreen image no problems.

I've tried splitting the background draw into 2, 4, 8, 16 quads but no drastic increase in speed. I have managed to get full screen with 10 sprites at 60 fps but that's the max limit before the fps drops.

My thoughts are the iPad has to draw a hell of a lot of data compared to the iPhone so for 2D is there anything that can be done to speed up fullscreen background drawing?

My main concern is the 3D side of things though. Has anyone else used the latest v8 beta with the iPad and found speed issues?
I updated my 3GS today with iOS 4.0, downloaded 2.3gb work of Apple iOS SDK, compiled a few older projects and all worked as expected, yipee :D

However.... With the event of iOS 4 we now have the joyous benefit of running more than one app at once and pressing the home button now pauses an iOS 4 app rather than quits it. I'm guessing GLB 7.x doesn't fully support this method yet? - I added the command AUTOPAUSE TRUE (I think that was it) but pressing the home button, then double tapping the home button, selecting the GLB app and it re-starts from fresh.

Will GLB 7.x be updated to support the pause / resuming of iOS 4 or is that going to be a feature of GLB 8.x? - Unless of course I'm missing something obvious  O_O
Hi :)

Is there a way to batch draw 3D models in order to reduce draw calls on the iPhone?

I use polyvector when doing 2D to draw many sprites in between startpoly / endpoly in order to reduce draw calls and that works well but I see no solution for 3D, unless I'm missing something obvious  :blink:

I've see some referral to glDrawArrays but I've no idea if that is the right thing to use or indeed how it could be used  :S

IDE/Syntax / iPhone Keyboard
I'd really love to be able to use the iPhone's keyboard in my games to save having to write my own routines and skins per game.

So..... Is this feature on the development to-do list or should I simply forget about the built in keyboard and do my own?  :)
Available to buy here -

Fed up never getting a cab?  Can't flag one down when you want?! Well, stop complaining and see how hard commanding a fleet of taxis is!

Work the shopping mall, pick up the customers, contain your road rage, and make the $$$$ to win the game!

But be careful. If you crash your taxis or bump a pedestrian, you're fired!

The think quick, act quicker game from PuzzleBox Games. From now on you'll love your taxi driver!

Move your taxis into their parking slots and pick up your fares.  Be quick as the mall is busy and people need taxis all the time! So don't stop hustling for fares or your taxis are going to crash into each other & the game is over!

Oh, and mind the pedestrians, they don't know any better, but they don't want to be bumped but if they are then you'll lose the game!

Strap in and keep hold of your road rage!

See it in action...

YouTube Video - Taxi Taxi - iPhone game
A few days ago I downloaded the demo out of pure curiosity as I saw you can now compile for iPhone/Touch..

Very sceptically I knocked up a quick test with a few sprites rotating (very advanced  :whistle:), compiled, copied the XCode project over to my macbook, zoomed into XCode to build, error!!. A quick change to enter my bundle ID, clicked build... it compiled... It installed on my iPhone... It WORKS!!! - How easy what that!

I have a license for Unity iPhone but I loathe the overhead of exe's and I'm NOT paying the silly high price for the pro version just to strip out bits I don't use. That should be a minimum feature. I tried the Cocos Iphone route but Obj-C makes me physically sick in the way it's structured  :'(

Anyway, I digress. I'm ecstatic that someone has finally given a straight forward language the ability to create for iPhone. Ideally I'd like a Mac version of GLB too but you can't have everything can you? =D - So for now, Parallels with XP in Coherence mode does the trick  :good:

Just waiting now for my license to be emailed through :)

I see there's a link to the latest beta on the new page but it doesn't work? - I'm interested in downloading the latest beta as it has a few updates for the iPhone like setting the screen to landscape without the need to use the screen rotate code.

Where do I download that version from ( - V7.089 ) or will I get a link to that with my license code?