Alright, ladies and gentlemen. The season of Summer may already be over for this year now, but that does not even halfway mean that AFlib III hasn’t turned up the heat in any way, shape, or form in terms of the optimizations and fantastic
NEVER-BEFORE-SEEN new features that I have just now added once again. In quite actual fact, I really kicked it up quite several notches and more, just in order to form a brand-newest update to this original FreeBASIC game-creation library, as it is thoroughly tested once again *completely* virus-free and ready for you to download as Autumn 2016 begins:
Get splendidly excited like never before, everybody!!!
(^-^)v !!
First of all now, on AFlib III’s built-in font #6 (which happens to be titled “1980s Gamer Classic” as this particular fontface here), I did a minor character edit on the lowercase “a” so that it makes it a little more readable and much easier to distinguish between the lowercase “a” and the lowercase “o” indeed. Take a quick look:
There, much legible now. And that is only barely scratching the surface in this important new AFlib III update! Read on!!
;)
Secondly, I have just improved and strengthened the security of the AFlib III Score Ranking File Saving/Loading System to make it even better than ever, and that is most noticeably true now in both the "AFlib3_ScoreRanking.bi" and "AFlib3_64bit_ScoreRanking.bi" modules, too!
Next, in the “AFlib3_Font.bi” and “AFlib3_64bit_Font.bi” modules, I added in a VERY special all-new command:
- • AFlibIII_OptimizedFont_ShakyTextSetup
Code: Select all
Declare Sub AFlibIII_OptimizedFont_ShakyTextSetup ( Byref x_quake as Ubyte, _
Byref y_quake as Ubyte )
...which enables you to literally shake up the text that you print in your optimized font(s) as if it had been in an earthquake, or, if you want, disables this “quaking” text effect completely. These modern days now, quite a number of indie-game developers have been using this kind of rather unique effect indeed in the original development of games like
Manos: The Hands of Fate (2d platformer video-game version on PC) by FreakZone Games and
Shovel Knight by Yacht Club Games, for example. I am sure there are many more examples of that ShakyText stuff being already implemented in other 2d indie games of this type or something like that, and so I thought it would be rather amazing for me to add this kind of effect indeed for you to finally use exclusively in AFlib III for FreeBASIC, you know that?
:D !!
To test out my brand-new ShakyText effect in AFlib III for your optimized fonts, here is this fast and really simple source-code example on this to truly help you out!! ;)
Code: Select all
'-------------------------------------------------------------------------------
' NOTE: This FB code snippet requires AFlib III v0.93 or higher to run!! ;)
'-------------------------------------------------------------------------------
#ifdef __FB_64BIT__
#include "AFlib3_64bit_Font.bi"
#include "AFlib3_64bit_Screen.bi"
#include "AFlib3_64bit_Sprite.bi"
#include "AFlib3_64bit_Miscellaneous.bi"
#else
#include "AFlib3_Font.bi"
#include "AFlib3_Screen.bi"
#include "AFlib3_Sprite.bi"
#include "AFlib3_Miscellaneous.bi"
#endif
Dim FontSelect as Integer = 6 '<----- Please select any one of AFlib III's built-in fonts, from 1 to 40.
ScreenRes 640, 400, 24, , 0
'---------------------------------------------------------------
ScreenLock
AFlibIII_PrepareScreenTrans
AFlibIII_DisplayAllChars 1, 1, rgb(64, 64, 64), rgb(64, 64, 64), 0, FontSelect
AFlibIII_DisplayAllChars 1, 0, rgb(64, 64, 64), rgb(64, 64, 64), 0, FontSelect
AFlibIII_DisplayAllChars 0, 1, rgb(64, 64, 64), rgb(64, 64, 64), 0, FontSelect
AFlibIII_DisplayAllChars 0, 0, rgb(255, 255, 255), rgb(180, 180, 180), 0, FontSelect
AFlibIII_OptimizeFontSet 0, 0, 1
ScreenUnlock
'---------------------------------------------------------------
AFlibIII_ClearDisplay
Do
ScreenLock
AFlibIII_ClearDisplay
AFlibIII_OptimizedFont_ShakyTextSetup 1, 2 '<----- This turns on the ShakyText with a light setting shown here.
AFlibIII_OptimizedPrint "ShakyText is now in effect for AFlib III in FreeBASIC...", 16, 48, 1, 0
AFlibIII_OptimizedFont_ShakyTextSetup 0, 0 '<----- This turns the ShakyText off.
AFlibIII_OptimizedPrint "...and now, this piece of text is still and peaceful with the ShakyText off.", 16, 64, 1, 0
AFlibIII_OptimizedPrint "THANK YOU KINDLY FOR WATCHING THIS EXAMPLE.", 0, 88, 1, 1
ScreenUnlock
AFlibIII_CustomSync 70
Loop until Inkey = Chr(27) '<----- Press [ESC] to exit.
AFlibIII_RemoveFontSet 1
AFlibIII_EndProgram
And even vitally in the “AFlib3_Palette.bi” and “AFlib3_64bit_Palette.bi” modules, I have updated and optimized the following commands:
- • AFlibIII_MachineFade_EGA
• AFlibIII_MachineFade_NES
• AFlibIII_MachineFade_SMS
• AFlibIII_MachineFade_C64
• AFlibIII_MachineFade_CPC
• AFlibIII_MachineFade_GB
...and added in quite several brand-new and simple-to-use commands:
- • AFlibIII_MachineFade_FCUBE
• AFlibIII_MachineFade_DB32
• AFlibIII_MachineFade_VB
• AFlibIII_MachineFade_WS
• AFlibIII_MachineFade_RGB8
• AFlibIII_MachineFade_ARNE
• AFlibIII_MachineFade_FUN16
• AFlibIII_MachineFade_INTV
• AFlibIII_MachineFade_PC6001
• AFlibIII_MachineFade_VIC20_NTSC
• AFlibIII_MachineFade_VIC20_PAL
• AFlibIII_MachineFade_MSX
• AFlibIII_MachineFade_ZXSpectrum
• AFlibIII_MachineFade_APPLEII
• AFlibIII_MachineFade_AQUAR
...all to support even purer palette fading effects based on each of their own respective classic computers/consoles indeed and such!!!
;) Please check out the 32- and 64-bit versions of the
AFlib III Machine-Palette Fade Test program included in this download package for the latest version of AFlib III, as well as the .BAS source-code file of “AF3_machinefade-test.bas” for how all this custom palette fading magic is done for 24- and 32-bit color graphics modes only on these kinds of fading effects indeed.
And then, in the “AFlib3_ASCii.bi” and “AFlib3_64bit_ASCii.bi” modules, I have thrown in this brand-new command, too:
- • AFlibIII_ASCii_CaptureSprite_BMP_to_Text
...while at the same time now for this very version, I’ve also added in the ability for you to most easily create custom dialogue boxes in AFlib III, using these additional all-new commands:
- • AFlibIII_ASCii_DialogueBox
• AFlibIII_ASCii_DialogueBox_alpha
• AFlibIII_ASCii_DialogueBox_add
• AFlibIII_ASCii_FilledDialogueBox
• AFlibIII_ASCii_FilledDialogueBox_alpha
• AFlibIII_ASCii_FilledDialogueBox_add
...and here is what you get coming from this next screenshot, just to whet your appetite:
To inspire all of you to quite easily create those ASCii-based custom dialogue boxes in FreeBASIC without any frustrating fancy-shmancy programming involved, here is a simple new source-code example to help you get the job done nice and quick!!! ^-^
Code: Select all
'-------------------------------------------------------------------------------
' NOTE: This FB code snippet requires AFlib III v0.93 or higher to run!! ;)
'-------------------------------------------------------------------------------
#ifdef __FB_64BIT__
#include "AFlib3_64bit_ASCii.bi"
#include "AFlib3_64bit_Miscellaneous.bi"
#else
#include "AFlib3_ASCii.bi"
#include "AFlib3_Miscellaneous.bi"
#endif
' First, let's set our 24-bit color ASCii-graphics mode to
' 80x60, based only on an 8x8 ASCii-character grid which
' directly equates itself to a standard 640x480x24 graphics
' mode in single pixels alone.
'----------------------------------------------------------
AFlibIII_SetTextGFX 80, 60, 24, , 0
' Secondly, we initialize our AFlib III ASCii-graphics
' system with its 40 built-in fonts, using this command:
'----------------------------------------------------------
AFlibIII_Initialize_ASCii
' Next, we build our simple text-based background.
'----------------------------------------------------------
AFlibIII_ASCii_FilledBox chr(197), 0, 0, 79, 59, RGB(64, 0, 0), RGB(0, 0, 0), 1
' Now, the REAL fun begins!!! We start here by making our
' very first ASCii-based dialogue box for AFlib III, using
' a filled one so we can then put our text in it. ;) !!
'----------------------------------------------------------
AFlibIII_ASCii_FilledDialogueBox 8, 5, 4, 50, 9, RGB(255, 235, 185), RGB(236, 236, 0), _
RGB(145, 125, 65), RGB(80, 80, 0), _
RGB(165, 125, 20), RGB(21, 0, 0), _
255, 12
AFlibIII_ASCii_Print "This is my first ASCII-based dialogue box,", 7, 6, RGB(255, 255, 255), RGB(255, 0, 255), 12
AFlibIII_ASCii_Print "created using AFlib III in FreeBASIC!!!", 7, 7, RGB(255, 255, 255), RGB(255, 0, 255), 12
' Let's add another dialogue box... this time, with just a
' non-filled, alpha-blended one to make it more frame-like
' in style!! And then, we add even a bit more text to it
' that we just built. ^^
'----------------------------------------------------------
AFlibIII_ASCii_DialogueBox_alpha 7, 18, 13, 76, 17, RGB(215, 255, 235), RGB(0, 236, 236), RGB(65, 145, 125), RGB(0, 120, 120), 128, 21
AFlibIII_ASCii_Print "I can also create another dialogue box alpha-blended...", 20, 15, RGB(255, 255, 255), RGB(255, 0, 255), 21
' And then we add yet one more dialogue box... this time,
' a filled one, with another different style of the way
' this new one executes in terms of giving the ASCii-based
' dialogue boxes themselves a great variety here... most
' considering that there are 11 custom built-in styles to
' choose from in AFlib III, of course!!! (^-^)v !!!
'----------------------------------------------------------
AFlibIII_ASCii_FilledDialogueBox_add 9, 41, 21, 76, 26, RGB(255, 205, 245), RGB(236, 106, 236), _
RGB(185, 65, 165), RGB(120, 0, 120), _
RGB(0, 0, 0), RGB(120, 120, 120), _
255, 210, 18
AFlibIII_ASCii_Print "...as well as create yet another", 43, 23, RGB(255, 255, 255), RGB(255, 0, 255), 18
AFlibIII_ASCii_Print "one additive-blended, too!!", 43, 24, RGB(255, 255, 255), RGB(255, 0, 255), 18
' Now, these final bits of text for us to print, before
' asking the user for a key-press to end the program.
'----------------------------------------------------------
AFlibIII_ASCii_Print "Now, I am ready to create some truly awesome", 5, 31, RGB(255, 255, 255), RGB(255, 0, 255), 4
AFlibIII_ASCii_Print "events of dialogue in an ASCii-based RPG or even", 5, 33, RGB(255, 255, 255), RGB(255, 0, 255), 4
AFlibIII_ASCii_Print "my own custom text-based GUI system, and quite", 5, 35, RGB(255, 255, 255), RGB(255, 0, 255), 4
AFlibIII_ASCii_Print "perhaps more... all on AFlib III in FreeBASIC!!!", 5, 37, RGB(255, 255, 255), RGB(255, 0, 255), 4
AFlibIII_ASCii_Print "LET'S ROCK!!!", 5, 41, RGB(170, 200, 255), RGB(255, 0, 255), 4
AFlibIII_ASCii_Print "(^-^)=b !!", 20, 41, RGB(56, 255, 56), RGB(255, 0, 255), 4
Sleep
' Finally, we wrap up the entire program indeed by simply
' and safely removing our AFlib III ASCii-graphics system
' with the "AFlibIII_DeInit_ASCii" command, before we call
' "AFlibIII_EndProgram" to make clearly sure we end the
' program with absolutely no conflicts. ;)
'----------------------------------------------------------
AFlibIII_DeInit_ASCii
AFlibIII_EndProgram
' A MOST splendid good night to you, everybody!!! ^-^=b !!
And best of all, MUCH more importantly, I have added in
a custom recordable live ASCii-tilemap system for AFlib III (yep, you heard me!!!
d=^-^=b !! ), plus its own saving and loading features!! And best of all, this system even has its own drawing primitive commands that are exclusive directly to this newest tile-mapping system indeed as well, including:
- • AFlibIII_ASCiiMap_Print
• AFlibIII_ASCiiMap_PrintScore
• AFlibIII_ASCiiMap_PrintScoreR
• AFlibIII_ASCiiMap_PrintScoreRCH
• AFlibIII_ASCiiMap_Pixel
• AFlibIII_ASCiiMap_Line
• AFlibIII_ASCiiMap_Box
• AFlibIII_ASCiiMap_FilledBox
• AFlibIII_ASCiiMap_Circle
• AFlibIII_ASCiiMap_FilledCircle
• AFlibIII_ASCiiMap_Triangle
• AFlibIII_ASCiiMap_FilledTriangle
• AFlibIII_ASCiiMap_Globe
• AFlibIII_ASCiiMap_Lightning
• AFlibIII_ASCiiMap_DialogueBox
• AFlibIII_ASCiiMap_FilledDialogueBox
• AFlibIII_ASCiiMap_BlitBMP
• AFlibIII_ASCiiMap_TransBlitBMP
• AFlibIII_ASCiiMap_PatternBlitBMP
• AFlibIII_ASCiiMap_ClearDisplay
...and so much more, which is absolutely damn brilliant stuff for also creating your own ASCii-based loading screens, ASCii-based RPG game maps, and whatever best suits your fancy in a fantastic way!!! And all in any 15- to 32-bit color graphics mode you desire, too!!
:D
By default, your ASCii-tiled map is set to 80x60 text-based mode (as measured in 8x8 ASCii characters, exactly)... best suited for a normal 640x480 graphics mode. But, with this additional command:
- • AFlibIII_ASCiiMap_SwitchType
Code: Select all
Sub AFlibIII_ASCiiMap_SwitchType ( Byval tilesize_type as Ubyte )
...you can efficiently switch between different types of these maps based on size, while certainly keeping close track of your progress between them all... all during the run-time of your program. You can choose between the following in the “
tilesize_type” parameter of this command:
[list]0 = AFlib III 40x30 ASCii-tiled Map
1 = AFlib III 80x60 ASCii-tiled Map
2 = AFlib III 100x75 ASCii-tiled Map
3 = AFlib III 128x96 ASCii-tiled Map
4 = AFlib III 160x90 ASCii-tiled Map
5 = AFlib III 240x135 ASCii-tiled Map
6 = AFlib III 256x256 ASCii-tiled Map
7 = AFlib III 512x512 ASCii-tiled Map
8 = AFlib III 768x768 ASCii-tiled Map
9 = AFlib III 1024x1024 ASCii-tiled Map[/list]
...and when you save a custom ASCii-tiled map using this command:
- • AFlibIII_ASCiiMap_Save
Code: Select all
Sub AFlibIII_ASCiiMap_Save ( Byref File as String, _
Byref Password_1_of_3 as String = "", _
Byref Password_2_of_3 as String = "", _
Byref Password_3_of_3 as String = "" )
...a file extension will be given automatically to you as attached to the end of any filename you wish, as follows depending on the
currently selected ASCii-tiled map type that you are using:
[list].AA0 = AFlib III 40x30 ASCii-tiled Mapper File
.AA1 = AFlib III 80x60 ASCii-tiled Mapper File
.AA2 = AFlib III 100x75 ASCii-tiled Mapper File
.AA3 = AFlib III 128x96 ASCii-tiled Mapper File
.AA4 = AFlib III 160x90 ASCii-tiled Mapper File
.AA5 = AFlib III 240x135 ASCii-tiled Mapper File
.AA6 = AFlib III 256x256 ASCii-tiled Mapper File
.AA7 = AFlib III 512x512 ASCii-tiled Mapper File
.AA8 = AFlib III 768x768 ASCii-tiled Mapper File
.AA9 = AFlib III 1024x1024 ASCii-tiled Mapper File[/list]
...and as for the optional “
Password_1_of_3”, “
Password_2_of_3”, “
Password_3_of_3” parameters here, feel free to add them in if you wish to give your maps some added extra security features, with the passwords themselves being up to 24 characters long each. Just be sure to remember them all yourself on your own when you load these custom maps back up using this command:
- • AFlibIII_ASCiiMap_Load
Code: Select all
Sub AFlibIII_ASCiiMap_Load ( Byref File as String, _
Byref Password_1_of_3 as String = "", _
Byref Password_2_of_3 as String = "", _
Byref Password_3_of_3 as String = "" )
To display your currently selected type of ASCii-tiled map anywhere you wish, just simply add this command:
- • AFlibIII_ASCiiMap_DisplayRaw
Code: Select all
Sub AFlibIII_ASCiiMap_DisplayRaw ( Byval tile_x as Integer<32>, _
Byval tile_y as Integer<32>, _
Byval fontface as Integer<32>, _
Byval buffer as any Ptr = 0 )
...and you are pretty much good to go so far.
You got me on all of that, everybody? Good. Now let’s put our ASCii map creation to some spectacularly good use, shall we!?
;*)
To get you started on using this phenomenal new custom ASCii-tilemap system that is exclusive to AFlib III for the 32- and 64-bit editions of FreeBASIC, here now are the next two awesome little source-code examples that shows you how you can easily create ASCii-based game maps live, as well as you saving and loading them quite simply without a hitch!!! ;)
Code: Select all
'-------------------------------------------------------------------------------
' NOTE: This FB code snippet requires AFlib III v0.93 or higher to run!! ;)
'-------------------------------------------------------------------------------
#ifdef __FB_64BIT__
#include "AFlib3_64bit_ASCii.bi"
#include "AFlib3_64bit_Miscellaneous.bi"
#else
#include "AFlib3_ASCii.bi"
#include "AFlib3_Miscellaneous.bi"
#endif
' First, we set our 24-bit color ASCii-graphics mode to
' 80x60, based only on an 8x8 ASCii-character grid which
' directly equates itself to a standard 640x480x24 graphics
' mode in single pixels alone.
'----------------------------------------------------------
AFlibIII_SetTextGFX 80, 60, 24, , 0
' Second now, we initialize our AFlib III ASCii-graphics
' system with its 40 built-in fonts, using this command:
'----------------------------------------------------------
AFlibIII_Initialize_ASCii
' Next, let's build our first custom 80x60 ASCii tilemap
' as our test!! ;)
'----------------------------------------------------------
AFlibIII_ASCiiMap_ClearDisplay RGB(0, 0, 0)
AFlibIII_ASCiiMap_FilledBox Chr(4), 0, 0, 68, 59, RGB(33, 0, 35), RGB(10, 0, 15)
For Wall_y as Integer = 0 to 5
For Wall_x as Integer = 0 to 6
If Wall_x = 1 and Wall_y = 1 or Wall_x = 5 and Wall_y = 1 or Wall_x = 1 and Wall_y = 4 or Wall_x = 5 and Wall_y = 4 then
AFlibIII_ASCiiMap_FilledDialogueBox 3, (Wall_x * 9) + 5, (Wall_y * 9) + 5, (Wall_x * 9) + 9, (Wall_y * 9) + 9, _
RGB(250, 255, 250), RGB(40, 255, 40), _
RGB(10, 255, 10), RGB(0, 155, 0), _
RGB(10, 240, 10), RGB(0, 135, 0)
elseif Wall_x = 3 and Wall_y = 0 or Wall_x = 3 and Wall_y = 5 then
AFlibIII_ASCiiMap_FilledDialogueBox 8, (Wall_x * 9) + 6, (Wall_y * 9) + 6, (Wall_x * 9) + 8, (Wall_y * 9) + 8, _
RGB(240, 240, 255), RGB(180, 185, 255), _
RGB(180, 180, 255), RGB(120, 120, 255), _
RGB(255, 255, 255), RGB(255, 255, 255)
elseif Wall_x = 0 and Wall_y = 0 or Wall_x = 6 and Wall_y = 5 or Wall_x = 3 and Wall_y = 2 or Wall_x = 3 and Wall_y = 3 then
' no maze wall piece
else
AFlibIII_ASCiiMap_DialogueBox 8, (Wall_x * 9) + 5, (Wall_y * 9) + 5, (Wall_x * 9) + 9, (Wall_y * 9) + 9, _
RGB(255, 255, 40), RGB(255, 168, 60), _
RGB(230, 146, 10), RGB(155, 66, 0)
End if
Next
Next
AFlibIII_ASCiiMap_Print "TOP-SCORE", 70, 2, RGB(0, 255, 0)
AFlibIII_ASCiiMap_PrintScoreR 1245830, 64, 3, RGB(255, 255, 0)
AFlibIII_ASCiiMap_Print "1UP", 73, 8, RGB(255, 0, 0)
AFlibIII_ASCiiMap_PrintScoreR 1156800, 64, 9, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print Chr(5, 5, 5, 5), 71, 11, RGB(255, 0, 0)
AFlibIII_ASCiiMap_Print "POW ", 70, 13, RGB(255, 0, 0)
AFlibIII_ASCiiMap_Print Chr(16, 16, 16, 16, 16), 74, 13, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print "2UP", 73, 18, RGB(255, 168, 0)
AFlibIII_ASCiiMap_PrintScoreR 743920, 64, 19, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print Chr(5, 5, 5), 71, 21, RGB(255, 168, 0)
AFlibIII_ASCiiMap_Print "POW ", 70, 23, RGB(255, 168, 0)
AFlibIII_ASCiiMap_Print Chr(16, 16, 16, 16, 16), 74, 23, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print "3UP", 73, 28, RGB(0, 255, 255)
AFlibIII_ASCiiMap_PrintScoreR 1085690, 64, 29, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print "INSERT", 70, 31, RGB(0, 255, 255)
AFlibIII_ASCiiMap_Print "COIN!", 74, 32, RGB(0, 255, 255)
AFlibIII_ASCiiMap_Print "4UP", 73, 38, RGB(124, 118, 255)
AFlibIII_ASCiiMap_PrintScoreR 255040, 64, 39, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print Chr(5), 71, 41, RGB(124, 118, 255)
AFlibIII_ASCiiMap_Print "POW ", 70, 43, RGB(124, 118, 255)
AFlibIII_ASCiiMap_Print Chr(16, 16, 16, 16, 16), 74, 43, RGB(255, 255, 255)
AFlibIII_ASCiiMap_Print "CREDIT 00", 70, 57, RGB(255, 255, 255)
AFlibIII_ASCiiMap_DisplayRaw 0, 0, 15
Sleep 2000, 1
AFlibIII_ClearKeyBuffer
' Now, press any key so we can save it as "ASCii_TestMap"
' (an ".aa1" file extension will *automatically* be added
' as a result, since the AFlib III ASCii-based tilemap
' system starts you out with an 80x60 custom text tilemap
' setting instantly when you first run your program). ;)
'----------------------------------------------------------
AFlibIII_ASCii_FilledBox " ", 0, 59, 79, 59, RGB(0, 0, 255), RGB(0, 0, 255), 1
AFlibIII_ASCii_Print "Press any key to save this 80x60 ASCii Map to file...", 0, 59, RGB(255, 255, 255), RGB(255, 0, 255), 6
Sleep
AFlibIII_ASCiiMap_DisplayRaw 0, 0, 15
AFlibIII_ASCiiMap_Save "ASCii_TestMap"
AFlibIII_ASCii_FilledBox " ", 0, 59, 79, 59, RGB(0, 0, 255), RGB(0, 0, 255), 1
AFlibIII_ASCii_Print "80x60 ASCii Map File Saved. Press any key to end, please.", 0, 59, RGB(255, 255, 255), RGB(255, 0, 255), 6
AFlibIII_ClearKeyBuffer
Sleep
' Finally, we close this entire program by safely removing
' our own AFlib III ASCii-graphics system with the
' "AFlibIII_DeInit_ASCii" command, before we call
' "AFlibIII_EndProgram" to make clearly sure we do so here
' with absolutely no conflicts whatsoever. ;)
'----------------------------------------------------------
AFlibIII_DeInit_ASCii
AFlibIII_EndProgram
' See you all again soon!!! ^-^=b !!
Code: Select all
'-------------------------------------------------------------------------------
' NOTE: This FB code snippet requires AFlib III v0.93 or higher to run!! ;)
'-------------------------------------------------------------------------------
#ifdef __FB_64BIT__
#include "AFlib3_64bit_ASCii.bi"
#include "AFlib3_64bit_Miscellaneous.bi"
#else
#include "AFlib3_ASCii.bi"
#include "AFlib3_Miscellaneous.bi"
#endif
AFlibIII_SetTextGFX 80, 60, 24, , 0
AFlibIII_Initialize_ASCii
AFlibIII_ASCii_FilledBox " ", 0, 59, 79, 59, RGB(0, 0, 255), RGB(0, 0, 255), 1
AFlibIII_ASCii_Print "Press any key to instantly load our 80x60 ASCii Map that we just created...", 0, 59, RGB(255, 255, 255), RGB(255, 0, 255), 6
Sleep
AFlibIII_ASCiiMap_Load "ASCii_TestMap.aa1"
AFlibIII_ASCiiMap_DisplayRaw 0, 0, 15
AFlibIII_ClearKeyBuffer
Sleep
AFlibIII_DeInit_ASCii
AFlibIII_EndProgram
And here is even more great news for you: from this resulting example file called “
ASCii_TestMap.aa1”, since this is saved in an AFlib III 80x60 ASCii-tiled Mapper File format, its precise file size is around nothing more than a VERY low
119kb —
just around 118,784 bytes, to be exact! Perfect for creating your own custom ASCii-based Truecolor loading screens for your game that you are creating in AFlib III, especially, so let’s see what kind of ASCii-tiled maps or something wildly creative you can come up with using this!!!
;*)
And speaking about the sample map that was just created using those two ASCii-tiled map-creation source codes in AFlib III just now, they should give you a good indication of the possible map layouts for the following classic ‘80s computer games:
Oh Mummy! on the Amstrad CPC and
Crossfire on the IBM PCjr. Let them inspire you further.
All these and more should give all of you a finely excellent leading edge towards such outstanding new game programming in FreeBASIC made much,
MUCH easier than ever before!!!
(^-^)v !!
And finally, check out the newly updated “AF3_BMPload_to_Truecolor_ASCii.bas” in this new version of AFlib III, as I have now made my own custom algorithm for converting the .BMPs into actual
truecolor ASCii-art all its own containing multiple ASCii characters simultaneously, all supporting any 24- to 32-bit color graphics mode of your choice!!! Please do not miss these next examples of this that will I show you right here, just to get you started:
- • Normal Picture:
• Conversion to Single-character ASCii-art Truecolor format:
• Conversion to Multi-character ASCii-art Truecolor format:
With that now, that sums up a ton of amazing updates for this latest beta test version 0.93 of AFlib III. And with all that info and all these fresh new source-code examples to try out in this post for this new AFlib III version, you will definitely be blown away speechless by the astounding quality and absolute care that I have put into this original FB game-creation lib, and the big improvements that I have made time after time since the 2016 year first began. Please richly enjoy them all big-time to your absolute heart’s content in this big update to this very library in FreeBASIC 32- and 64-bit especially, and an enormous thank-you once again to all of you entire FreeBASIC community so far for your continued support indeed!!!
(^-^)v !!!