Documentation?

Previous topic - Next topic

Cliff3D

It's me again :D

I've made a start on the first tutorial, at http://wiki.just-do-i-t.com/index.php?title=01_General but I'm not sure about the section on variables any more, having read http://wiki.just-do-i-t.com/index.php?title=Variables (which I'm about to edit, I think). IMHO http://wiki.just-do-i-t.com/index.php?title=Variables is quite unclear about the size of the variables on all platforms, and what can actually be done with them (as in " most operations except for +, -, * and /" does not feel very inclusive).

Maybe I should use the term "Native variable types" or similar in tutorial 1?

MrTAToad

with short, char etc, you cant use mathematical calulcations on them yet (you get compiler errors).

From the quick test I have made, they seem to work in commands okay

Cliff3D

Has anyone got "OneMore" from the GLBasic tutorials working? I'm obviously close, but there's a subtle bug somewhere that means a new level is never started. Also, BLENDSCREEN doesn't work on my netbook :( (I just get the normal black background).

I remeber now why I ditched the tutorials in the first place and opted for just diving in and doing some coding towards what I wanted to write!

MrTAToad

Where is the "OneMore" tutorial ?

Cliff3D

#49
Current HTML manual version (doesn't compile):

http://www.glbasic.com/xmlhelp.php?lang=en&id=130&action=view

Updated Wiki version (that I can't seem to knock the kinks out of - we never can reach the second level):

http://wiki.just-do-i-t.com/index.php?title=10_The_First_Game

I might have another go at it anon, but right now my wife's urging me to play zuma or work on the .OBJ reader code, because fixing up what I'm meant to be learning from is just frustrating me too much!

MrTAToad

It was easy enough to get the original working :)

It was written ages before explicit declarations were added, and thus no global variables were defined...

Quote(that I can't seem to knock the kinks out of - we never can reach the second level):

Me neighter - too hard for me :)

Cliff3D

I can see/get that - but IMO documentation is almost as important as the thing itself. It's what welcomes new customers - new features are GREAT (and i really appreciate extended types, for example) and extras written in the base language itself too, but they are all for existing users surely - what's dragging the new punters in to GLBasic rather than python, darkbasic pro, freebasic etc.? Because I have to admit that I'm seriously considering abandoning the tutorials as being a much harder entry to GLBasic than simply diving in heads first and bugging you when I need  feature I can't see!

MrTAToad

Just take your time, and you'll get through the tutorials :)

Wampus

Most new comers to GLBasic will almost certainly want a first-game tutorial. That's exactly where I started and what got me hooked. I can see where Cliff3D is coming from. Once my first iPhone game is complete and I've done my entry for the NES/SNES competition I want to put in some decent time trying to promote GLBasic somehow. Perhaps another tutorial that has some feature that people find attractive would be helpful.

The more people using GLBasic the better for all of us (I think).

MrTAToad

Trouble is few people can spend time updating documentation - and it can take ages :)

Cliff3D

That it does! But I'm generally of the opinion that the more users, the better!

Cliff3D

I've read in documentation today both that the default number type in GLBasic is Integer (so you have to include a decimal point in a number to force floating point math) and Floating Point (so you have to use the Integer term to force Integer math).

Can anyone clear this up for me so I don't make bad tutorials?

MrTAToad

It would depend on the variable type used :

Assigning a floating-point figure to an integer cuts off (and rounds down) the number to an integer

Assigning an integer to a floating-point variable converts the integer to a decimal number

The problem occurs when mixing the two and storing into an integer - if you not careful any decimal numbers would be converted to integers during the calculations, and thus you end up with strange results.

By default, if you leave the % symbol off, you will be using floating-point variables...

Cliff3D

So...the default type of variable is a float and the default type of calculation is integer??

MrTAToad

Not quite - the default variable is floating point and the default result is floating point too.