• Welcome to Dark Bit Factory & Gravity.
 

FBLua [wip] *2007-8-3*

Started by Merick, June 03, 2007

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Merick

update: version 2007.8.3

http://www.mediafire.com/?dez9xjhtomj

Changes:

nothing really major in this release, except that I've changed the way it starts. Now, when FBlua starts up it will look for a script file called "main.lua", it must be in the same folder as FBlua.exe. If it exists then FBlua will automatically load and run it, then when the script ends FBlua will autmatically exit. However, if the file does not exist, then the windows open file dialog will open and let you select a script to run.

There are a few other changes, as always check the readme. I know it's not very organized, but I'm lazy, and not very good at writing out tutorial-type stuff.


Lately I've been getting kinda bored with this. I'm not abandoning the project, but I'm gonna be concentrating on something else for a while.

Shockwave

Needs freetype 6.dll? :)

Incompatible with fb 1.5?
Shockwave ^ Codigos
Challenge Trophies Won:

Merick

#2
*edit*

nvm, here's a link to the freetype binary package:

http://heanet.dl.sourceforge.net/sourceforge/gnuwin32/freetype-2.1.8.exe



as for this:
QuoteIncompatible with fb 1.5?

I've never seen that so I have no idea where it's coming from

ninogenio

hey merick im gonna bash that image loader up for you tommorow,

@shockwave this probably wont work in on 1.5 as it was dev`d in 1.6.

@merick wouldnt you be best giving the user a built in font like a binary font as the standard fblua font and letting them load diffrent bitmap font if they wish.just to save them having to get the freetype dll.
Challenge Trophies Won:

Shockwave

Might be a better idea to have a font included in the production.
Here for instance I downloaded and installed freetype from the link, had to run the installer (another registry modification :( ) and the program still won't run , sorry I can't give feedback :(

Hope you get more luck with the other users here Matey.
Shockwave ^ Codigos
Challenge Trophies Won:

Merick

or I could just include the freetyp dll in future releases....

The sPrint function in FBLua already uses FB's built in font. The reason it complains about the freetype dll is because I compiled it with the freetype headers included.  Removing those would stop the error popping up for people who don't have the dll, but then you wouldn't be able to use ttf fonts, and would be stuck with FB's font.


Anyway, here is a copy of the dll, try putting it in the same folder as the FBLua.exe

Jim

I also needed zlib1.dll (attached).  It crashed my machine totally without that, which is a bit nasty.
The graphics look smart, but I don't see any text?

Jim
Challenge Trophies Won:

Merick

#7
This lua scripts in this demo are just using the basic line drawing function.

To see a demo of using both the internal font, and a true type font, clear out the main.lua file (or make a new one and rename the original) and put this in it:

ScreenRes(800,500,32)

white = NewColor(255,255,255)
ltblue  = NewColor(200,200,255)
red   = NewColor(255,0,0)
green = NewColor(0,255,0)

sPrint(1,10, "FreeBasic's internal font at row 1, column 10", ltblue)
sPrint(10,5, "FreeBasic's internal font at row 10, column 5", red)

myfont = LoadFont("katana.ttf")
FontPrint(10, 300, myfont, 70, green, "This is a true type font!")



using the attached font

*note - although it works the FreeType functions have some problems with the clipping, if the text is too close to one of the edges of the window it won't be drawn

Jim

Cool, that works too :)

Jim
Challenge Trophies Won:

Shockwave

Yay! Got it to run, thanks for posting the libs chaps.

Looks very kaleidoscopic, runs fine here p4 3.0ghz, ati x1650 , 1gb 533mhz ddr2.
Shockwave ^ Codigos
Challenge Trophies Won:

Merick

If you want to see how fast it's running, put cps() at the end of all the drawing statements - it'll print the cycles per second in the upper left corner of the window. (if you remove the -- from the screensync command at the end of the script it'll slow it down to 60 cps)

Merick

updated the first post with a link to the newest version of FBlua, it includes two of the NeHe opengl demos converted for use with FBlua (atm, the functions in those demos are the only ones supported)