Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PeeJay

#61
Simple - while creating the data statements for each font, also add in a point for the restore command to refer to - then you can switch fonts in a fraction of a second. Alternatively, read all the data in one go, and store it in a 2D array - kern[font,character]
#62
Data statements would be neater, as they would be hard coded into the project, and would save having extra files - however, it would mean that you could not write routines to use within any project, as each one would need it's own data coded in, whereas using a separate file means that another program could generate them in advance.

However, with that said, with a little careful coding, it would be possible to export the data into a .gbas named file with DATA statements - hmmm, that is giving me a few ideas ...... ;)
#63
You should see a massive speed increase (to basically instantaneous!) using an external file for precalculation.

The kerning is simply calculating the width of each character, so by writing a separate routine, you can calculate these values, then save them out into a separate file. Then, in the main program, load this file in and put the values into the array - no need to calculate again.

This is one of the amends I have been planning, as well as adding the ability to use multiple character sets of multiple sizes
#64
The program "stalls" at startup while it precalculates the kerning for the font - this could be exported to an external file to eliminate this, but it is currently done that way to work with ANY bitmapped font. If it's taking more than a couple of seconds, though, there's something not right somewhere!

Of course the font can be changed - simply load in an alternative font, and change the fontwidth and fontheight values.

At some point when I get bored I will revisit this set of routines and expand on them, as it seems a lot of people are finding them pretty useful (there's an understatement!) and now GL supports default parameters for function calls, it means I can make tweaks I couldn't do before (well, not if I wanted to keep the code really tidy!)

#65
Hiya Gernot

As the shoeboxing is fixed, I thought I'd give compiling GWAN to OS/X a try, but got this error:-

Code (glbasic) Select
compile+link:
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: table of contents for archive: /cygdrive/C/Program Files/GLBasic/Compiler/platform/Mac/OSX/Lib/libGLBasicUni.a is out of date; rerun ranlib(1) (can't load from it)
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: table of contents for archive: /cygdrive/C/Program Files/GLBasic/Compiler/platform/Mac/OSX/Lib/libpng_uni.a is out of date; rerun ranlib(1) (can't load from it)
collect2: ld returned 1 exit status
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: for architecture ppc
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: table of contents for archive: /cygdrive/C/Program Files/GLBasic/Compiler/platform/Mac/OSX/Lib/libGLBasicUni.a is out of date; rerun ranlib(1) (can't load from it)
/cygdrive/c/Program Files/GLBasic/Compiler/platform/Mac/Bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: table of contents for archive: /cygdrive/C/Program Files/GLBasic/Compiler/platform/Mac/OSX/Lib/libpng_uni.a is out of date; rerun ranlib(1) (can't load from it)
collect2: ld returned 1 exit status
powerpc-apple-darwin8-lipo: can't open input file: /cygdrive/c/DOCUME~1/PeeJay/LOCALS~1/Temp/ccS4YgQe.out (No such file or directory)
*** FATAL ERROR - Please post this output in the forum


Ideas?
#66
While that is true, the first game I tried to do for OS/X (and hence found the shoebox problem) was DangerMouse (a graphical adventure), and because of the nature of it, being able to view the media could give you valuable clues on how to complete the game
#67
No idea - I don't have OS/X, and am not too keen on letting my media free on the public ;)
#68
You need to start a new project, not a new file.

This might seem a little confusing at first, but it makes sense - you can have multiple files all in one project. The project file will be a ????.gbap, and the files themselves will be ????.gbas

Hopefully that makes sense.

Also, you may find my tutorials useful on my website.
#69
I stopped trying to do OSX builds as the games didn't seem to like shoebox, but now it seems to be affecting linux builds as well - see http://www.retroremakes.com/forum2/showpost.php?p=174859&postcount=89

Or is it something stupid I'm doing wrong? Gernot? Help! :)
#70
Ah, I see! Perhaps I should set up a signature block ....
#71
I dunno - did you? :D

The Register button is just under the Download buttons - but I won't be able to respond until I get back home from work, I'm afraid (as the work PC blocks access to my personal emails :( )
#72
Thanks Ian, the info should be sitting in your inbox around now .....  :booze:
#73
GWAN - Game Without A Name - is finally released. This game is about as retro as you're going to get - best described as what happens when Asteroids goes paintballing.

Full details and downloads from my website ....
#74
I think I already know what you're trying to do, which is recreate a speccy loading screen from the finished image. How are my guessing skills? ;)
#75
If you need it deadly accurate, you will need to compare red, green, and blue components of course, which you could do like this:-

Code (glbasic) Select

pixel = GETPIXEL (x,y)
red = bAND(pixel,255)
green = bAND(pixel/256,255)
blue = bAND(pixel/65536,255)
mono = INTEGER(((red+green+blue)/3)/128)


Where mono would then by 0 for a black pixel, or 1 for a white pixel.

However, be aware that pixel by pixel operations are slow, since it is not really what the language was designed for ;)