Dark Bit Factory & Gravity

PROGRAMMING => Freebasic => Topic started by: Clyde on May 13, 2006

Title: GFX Lib equalling bigger exe sizes.
Post by: Clyde on May 13, 2006
I just wondered if anyone knew why using the default gfxlib (without a need for an include) with freebasic programs, generates a much bigger exe size. Than that of using an include bi for TinyPtc, which generates half the output size.

Im finding it, hard to understand why the default graphics commands are double the executable without having to deal with any binary includes, then that of tinyptc.

As I much prefer gfx lib personally, as you can toggle window / fullscreen modes for one. And I find quicker effects running speeds.

Thanks for any info,
Cheers Clyde.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Stonemonkey on May 13, 2006
Not 100% sure but i think that as FB is designed to be compatible with Qbasic then GFXlib (which gives FB the graphical functionality of Qbasic) is automatically included if the Screen function is used.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Shockwave on May 13, 2006
Yeah, it's like the whole lib gets included when you use the GFX lib and not just the bits you want (I may be wrong about this), I'm not too clear about this I need to play with both but at the moment I am messing with tinypct, I still have a load of functions to write to handle textures etc.

Tinyptc takes more effort in the beginning but it seems to be the way to go.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Clyde on May 13, 2006
So perhaps then a custom gfxlib could be made to prevent this.

Thanks,
Clyde.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Clyde on May 13, 2006
I can't find includes / lib's to do with gfxlib, all ive found is a gfxlib2.txt under documentation.
Any one know where it is, or is it inbuilt into FreeBasic?

Cheers and many thanks,
Clyde.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Clyde on May 14, 2006
Not having much luck at al, tracking down gfxlib.

Been thinking, it doesnt really matter that much about being roughly 25k. Darn sight less the BB exes. But all the same, it would be quite cool to find the Screen functions, and rename them included in own source listings.

If anyone does find out where gfxlib2 is hiding, awesome.

Cheers and many thanks,
Clyde.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: ferris on May 14, 2006
The size difference of the libraries comes from the fact that tinyptc simply takes an array and renders it to the screen. The fbgfxlib2, however, is large for the same reasons that blitz exe's are so large - they come with functions and libraries that although aren't used, are still included in the exe.

This is fixable, but you need to modify the fbgfxlib2 include and library files.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Clyde on May 15, 2006
mate, if youve been reading/ thats exactly what ive been asking and trying to find out about. And find the gfxlib2 includes / library files, to try and make them smaller. As I prefer GFXLib2.
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: relsoft on May 15, 2006
mate, if youve been reading/ thats exactly what ive been asking and trying to find out about. And find the gfxlib2 includes / library files, to try and make them smaller. As I prefer GFXLib2.

GFxlib2 is in C. :*(
Title: Re: GFX Lib equalling bigger exe sizes.
Post by: Shockwave on May 15, 2006
It's a decision that I guess we'll all need to make, do you go with GFXLIB2, SDL, Tinyptc, Allegro, whatever.

Personally I've decided to go down the software render route for now but this is because most of the fun for me is making those boring little routines to draw polys, render gourad triangles, do texture maps etc.

Once I have them sorted I may well start to explore the other avenues.

For all the messing about involved in removing unwanted stuff from the GFXLIB2, you may just as well write your own stuff or use someone elses Clyde. I will be releasing my libs as I develop them if that's any help.

It's not as if the exe size is diminished all that much after it's been crunched anyway. If you're happy with GFXLIB2, use it :) Lots of people do and there's nothing wrong with that stuff.