Has GLBasic got...

Previous topic - Next topic

MrTAToad

Could you tell me whether GLBasic can do the following :

A)  Multiple 3D cameras (according to the documentation, it looks like only one is possible, unfortunately).  If this is the case, it would be the reason why I couldn't find a viewport command...

C)  A Pick command (ie, taking X & Y screen coordinates, an invisible ray is projected in the cameras direction to determine what objects intersect this line).

Moru

1. There is a viewport command, look again :-) (type viewport and press F1 in the editor)

2. X_SCREEN2WORLD is the command you are looking for I think.

MrTAToad

X_SCREEN2WORLD unfortunately isn't what I was thinking about - it requires two sets of 3D coordinates, as opposed to just two 2D screen coordinates.

As there is a viewport command, does that mean there is a possibility that multiple cameras can be used ?

Kitty Hello

Yes, viewport is used for multiple cameras.
You can do picking, but you will have to write your own code. I did for the entity system. Maybe you want to try that?

it's x_screen2 world to get a 3d ray, then X_collisionray for each pickable object.

MrTAToad

Thanks for that.

One fine thing - is the origin of a loaded 3D object in its centre, or bottom left ?

Kitty Hello

Origin is where 0,0,0 was when you modeled it.

MrTAToad

Thanks for that.

Getting into GLBasic now, and I must admit I do like it!  Need to try it with some of my created models to see how it goes there... :)

MrTAToad

#7
Well, I've brought it :)

I do have some comments about GLBasic though (in no particular order) :

What do people use for Left$ and Right$ ?
CONST is highlighted but does not produce valid code (and not in help file), and isn't converted to uppercase - that would be a useful command

I have found that if you define (acccidentally or not) two variables of different types and then return the value of one, you will get error: cannot convert `__GLBASIC__::CGStr' to `DGInt' in assignment.  Would be nice if a more descriptive error message was displayed.

Would be nice if the second parameter for INC and DEC is optional - saves having to use INC a,1/DEC a,1

It appears that you can't use LOCAL DIM - (you have do to a Local a[] and then DIM) ? A trifle inefficient...

What does the profiler do ? (Not in the instructions).  I presume it should time each function, but if so, where would it store the results ?

Incorrect English :

Entering License Code

"Thank you for your suppt" should be "Thank you for your support"

Update Manager

Ende should be End

"Global"

GLOBAL accesses globlal varialbles with the same name as a LOCAL defined variable, should be
GLOBAL accesses global variables with the same name as a LOCAL defined variables

Hexadecimal number

"You cannot only use decimal numbers, but use the hex-writing, too. " - should be Hexadecimal numbers can also be used in addition to decimal numbers.

RotoSprite, RotoZoomSprite (and a fair few others)

There are no details about these in the help file.

SAVEBMP

"This command is thought for screenshots." - I presume should say "This command is useful for screenshots"

Example programs

DRAWRECT parameters in FindPath is incorrect (there is a - after scaley, which needs removing)
3DMaze -  X_COLLISIONAABB parameters are wrong

Must say I do love the debugger - its the first one I've come across thats actually useful...


Kitty Hello

OK, will try to fix these for version 6. Out soonish.

Kuron

Quote from: MrTAToad on 2008-Sep-13Must say I do love the debugger - its the first one I've come across thats actually useful...

I won't name names, but some of the competition could learn a lot from GLB's debugger  :nana:

MrTAToad


Kitty Hello

left$ = mid$(str, 0,length)
right$ = mid$(str$, max(0, len(str$)-length), length)
CONST is under construction. It's working in V6, but you can trick it and change the value. Then the GCC will complain :s. Thus, not documented.

Should DIM create locals instead of globals, too? Hmm.. I don't quite think so. Also, when you create a local array, you might not want it tobe dimmed. but LOCAL a[5] makes sense. Will try to implement it.
The profiler writes a cvs file in your project's directory and opens it with the editor after the program run.

Fixed the rest. Thank you.

MrTAToad

One last thing (for the time being anyway :) ) :

I do think the default font used for PRINT is rather small - I know its easy enough to change, but it would be nice to have a somewhat larger font has default.  I presume its that size for the PocketPC/GP32X machines.

Hemlos

Quote from: MrTAToad on 2008-Sep-15
One last thing (for the time being anyway :) ) :

I do think the default font used for PRINT is rather small - I know its easy enough to change, but it would be nice to have a somewhat larger font has default.  I presume its that size for the PocketPC/GP32X machines.

This used to be defaulting to smalfont.bmp in the root directory, something has been changed i think...
Kitty you change this?
Bing ChatGpt is pretty smart :O

MrTAToad

#14
I've also noticed the editor doesn't have a Close All/Close Project menu item, making the closure of multiple windows a trifle more complicated.

Would also be nice if Find/Replace could search through the complete project and not just the current source file.