Newbie questions

Previous topic - Next topic

SFguy

Hi guys,

I've just downloaded the trial version of GLBasic and am trying to understand it, but with difficulty!  You must think this is dumb, but I have a few stupid questions that I hope someone can help me with:

1) When I'm using the GLBasic editor, I can't seem to use my "down arrow" key whereas all the other keys ("up arrow", "left arrow" and "right arrow" keys) are working - is there a bug? The "down arrow" key seems to be working perfectly in this forum and when using MSWord.

2) I tried using the inbuilt Font Creator but am not sure where to place the file created (default as "smallfont.png").  Should it be in the same folder as the xxx.gbap and xxx.gbas files, or in the xxx.app folder?  When placed in the xxx.app folder, it seems to work, but in the reverse, i.e., the PRINT statement before the LOADFONT statement actually prints correctly using the new font, but the PRINT statement after the LOADFONT statement uses the default font instead.

What am I doing wrong here?  Thanks!

Ian Price

1. This is a known bug in an old version of GLbasic. Search for the latest public released demo and you should be sorted.

2. All graphics (including fonts) and sfx and music needs to go into the Media folder of your app. When you create a program in GLB it automatically creates a folder (with the name of your project) and inside that will be a Media folder - pop everything in there. Make sure you use the SETFONT command.

:)

I came. I saw. I played.

kanonet

1. This bug should be fixed in the last release version, try "WEB" -> "Internet Update" (or how ever it is called in the English version). But you can also try the latest Beta, its still test phase, but i dont think that i has more bugs then last stable release.

2. Like Ian said best place for all materials is in the "Media" folder. Of cause if you store something there you should set SETCURRENTDIR to that folder.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Schranz0r

GLBasic is not realy a demoversion...
2D is free  :whistle:
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

fuzzy70

Quote from: Schranz0r on 2013-May-28
GLBasic is not realy a demoversion...
2D is free  :whistle:

To a point, the 2D is free on Windows/Mac/Linux & time limited demo on the other supported platforms. Also if you want to distribute your creation you have to buy the license, not sure if you need a licence to distribute Windows/Mac/Linux programs as freeware tbh.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

kanonet

2D on Win/Linux/Mac is free, which means that you do not need any licence. At least that's how I understand it.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

fuzzy70

That's what I thought, but if you sell your Windows/Mac/Linux program/game then the main site says.
QuoteFree for non commercial projects on Windows, Linux and Mac OSX

So I am presuming that if you give your game away as freeware no license is required.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

kanonet

Ah you are right, just checked the feature page, no commercial use in free version.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

SFguy

Thanks for your replies, everyone.

I hope that the buggy 2D version for download will be changed eventually because that may put others off from buying.  My problem still persists in that the PRINT statement before the LOADFONT and SETFONT statements actually prints correctly using the new font, but the PRINT statement after the LOADFONT and SETFONT statements uses the default font instead.

Another question - where do I find help on the touch commands used by GLBasic for mobile phones?  Are they the mouse commands?  If so, how do you deal with multi-touch?  Thanks again.

kanonet

Fonts should be no problem if used right, I dont use the release V10 but the beta V11, but still there should be no problem with that. I just tested and it worked fine (be sure the SETCURRENTDIR to the correct folder before):
Code (glbasic) Select
LOADFONT "smalfont.png", 0
SETFONT 0


Touche commands = mouse commands. If you want to get multitouch you need to check for multiple mice with the command SETACTIVEMOUSE (check for GETMOUSECOUNT). Multitouch gestures needs to get programmed by yourself, but there might be code for this in the forum.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

MrTAToad

Multi-touch is handled by checking the MOUSECOUNT value, and going through each mouse index returned - there is an example in the Showroom.

SFguy

Thanks for the quick responses, guys.  Glad multitouch can be implemented using GLBasic.

Perhaps my problem with the fonts has to do with the buggy version I downloaded.

I'll go ahead and purchase the full 3D version! ;)

fuzzy70

Strange, I have used all versions of version 10 (from 1st & all subsequent updates to current 10.283) & a few of the 11 betas & can't say I have ever had font problems.

Like previous posts have said make sure your font is in the media folder where the GLB project is, make sure SETCURRENTDIR("Media") is at the top of your program code.
Then LOADFONT "myfont.png",0 followed by SETFONT 0.

All uses of PRINT after the above will use the loaded font.

Buying the full version unlocks 3d, networking, inline c/c++ plus the other platforms (rather it removes the time limit on those features as they all work in the free version plus allows you to sell your game). So basically the full version will produce the same results you are currently getting.

If you post the code you are having problems or issues with someone here will help & show you what's going wrong or if indeed it is a bug.

Lee

Sent from my HTC Wildfire using Tapatalk 2

"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

MrTAToad

#13
The fonts work fine in the demo...  You need to make sure that the font is loaded and set before using.

SFguy

Thanks, MrTAToad.  Will experiment more.