Page 1 of 2

FX-Lib v1.2 for PB 4.20

Posted: Tue Oct 07, 2008 5:52 pm
by Epyx
I modified my FXLib for PB4.20

FXLIB 4 PB4.20 Download

There are 180 commands for following areas...

2D Stars:
You can now initialize unlimited pixel stars on up to 10 levels, ink them and let them fly with unlimited speed in every angle.

2D Sprite Stars:
The same applies to the sprite stars, here it´s possible to give each level it´s own sprite star by using a sprite image.

Writing Graphics Text:
Simply load a gfx font and write it arbitrary centered, left-aligned or right-aligned on the screen.

Scrolling Graphics Text:
Simply create a running text with the loaded font and the text runs standalone
at an arbitrary position over the screen.

Scrolling Sinus Text:
Write this running text in sinus form on the screen, which means the text is moving in waves over the screen.

Plasma:
From a choice out of 1000 colors a plasma is made in arbitrary measures.

Grid bars:
With one command you can create grid bars, which can displayed hoping or vibrating on the screen.

3D Stars field:
E.g. the stars fly towards the user or away from him. The angle the stars fly can be defined more by 3 axes.

Sprite star field:
The same is true again for the sprite version, while transparency degree and size can also provided here.

Fade-in the screen :
Allows fine fade-in or fade-out of the screen in an arbitrary color, also limited to a specified screen area.

Vector balls:
The displaying of 3D objects consisting of balls. An effect, which is well-known from the Amiga. Simply create your objects via NotePad, load and display them! Attention - NEW: Animated Vector Bobs since v1.2

Amiga Vectors:
An simple vector engine that looks like animated Amiga vector GFX!

Display FPS:
Returns a FPS (frames per second) value. It will only be given, how often the picture can be built up in a second.

Screenshots
Save a screenshot with one command!

Posted: Tue Oct 07, 2008 6:15 pm
by X
This looks awesome! Can't wait for the 4.30final version :)

Posted: Thu Oct 09, 2008 11:10 pm
by Sveinung
Very cool lib...but the plasma crashes on my pc. I'll get invalid memory access at the line with the EP_CreatePlasma(). Maybe it just me...
I'm running PB 4.20 Final

Regards
Sveinung

Cool!

Posted: Sun Oct 12, 2008 3:05 pm
by Peace
As usual, a great work from you Epyx :D

Posted: Sun Oct 12, 2008 5:07 pm
by Psychophanta
Thank you :!:
And yes, would be grate the plasmaeffect to run and a version for 4.30 :)

Posted: Mon Oct 13, 2008 1:33 am
by Rook Zimbabwe
Thisis fantastic! It has given me several new ideas already!!! THANK YOU!!!
8)

Posted: Mon Oct 13, 2008 2:43 am
by Rook Zimbabwe
After playing around a bit I was still having issues with the SOUND functions in your lib... I must not have a userlib!

I also cannot include graphics... How do we do that? I have tried the following code but the IDE says I need a STRING?

Code: Select all

UsePNGImageDecoder()

DataSection
    IncludePath "/Bobs/"
Image1:
    IncludeBinary "COLA1.png"
EndDataSection

;OpenScreen(640,480,16,"Sprite Starfield Effect - Epyx FXLib")
OpenScreen(800,600,16,"Coca Cola Screensaver")
Image1 = CatchImage(#BUBBLE, ?Image1)
; EpyxLib Initialisieren
EP_InitFXLib()

EP_Load3DBall(#BUBBLE, imageid(?image1))
? :( ?

Posted: Mon Oct 13, 2008 9:12 pm
by Padraig
Hi!

After a quick look and not being a PB pro ;-):

Code: Select all

EP_Load3DBall(#BUBBLE, ImageID(?image1)) 


...needs a filename as an input: EP_Load3DBall(BallNumber.l, Filename.s).
Since you have included ur files EP_Catch3DBall(BallNumber.l, MemoryID) should be your friend.

Bye,

Pad

Posted: Tue Oct 14, 2008 1:25 am
by Rook Zimbabwe
Thanks... the help file is in German and is very difficult for me to read as my dyslexia works against me! :D

problem

Posted: Sun Dec 21, 2008 5:28 pm
by ALAN-MHz
hi, i have a problem with PB4.20 and FXLib, when i using EP_InitFading and try to switch with ALT+TAB the program crash when return to it, example code (it's only a stupid example!):

Code: Select all

EP_InitFXLib()
InitSprite ()
InitSprite3D ()
OpenScreen ( 640 , 480 , 16 , "Test" )
Delay ( 1000 )
EP_InitFading ( RGB ( 0 , 0 , 0 ) , 2.5 ) ; if you comment this all work!
Repeat
 ClearScreen ( RGB ( 0 , 0 , 0 ) )
 FlipBuffers ( 2 )
 Delay ( 10 )
Forever

Posted: Fri Jan 02, 2009 12:03 pm
by Padraig
Without testing the code: You forgot

Code: Select all

EP_InitFXLib() 
to initialize the whole Lib.

Cheers & Happy New Year

Pad

Posted: Fri Jan 02, 2009 6:02 pm
by ALAN-MHz
Sorry for forgot in my example, but i made more testing, seems that ALL FXLib COMMANDS don't work in multitasking, when i switch to windows desktop and then when i come back to openscreen the software crash with illegal address on flipbuffers command, ever when i don't use any fxlib command in main loop but initialize a command before that, tested with:

EP_InitFading
EP_CatchFont32
EP_CatchFont16
EP_CatchVectorObject
EP_SetSmearScreen

Can Epyx can made a Fix for this bug ? Anyone can contact him ?

Posted: Sat Jan 03, 2009 4:55 pm
by Rook Zimbabwe
Alan... what OS are you using?

Posted: Wed Jan 07, 2009 8:52 am
by ALAN-MHz
Windows XP SP3 and PB4.20 (i have downloaded PB4.30 but i don't installed for now), but when i don't use FXLib i don't have problem with multitask switch

Update: i test at home and at office, the problem is the same, the OS is the same, the HW is different, in debug mode the error is: Invalid memory access (read error at address 16) on the FlipBuffers command, i have tried OldSkool DemoMaker and seems to work ok, what the difference between this software and a simple code like my example ?

Posted: Wed Jan 07, 2009 5:29 pm
by LuCiFeR[SD]
The Manual wrote:
IsScreenActive()

Syntax

Result = IsScreenActive()
Description

Games and full screen applications using PureBasic functions run under a multitasking environment (AmigaOS, Windows or Linux). This means that the user can switch back from full screen to the normal desktop. This change can be detected with this function and appriopriate actions should be taken, such as ReleaseMouse(), pause the game, stop the sounds etc. If the 'Result' is 0, then the screen is no longer active, otherwise the screen is active. This function must be called after FlipBuffers(), as the events are handled inside FlipBuffers().
Supported OS

All
Sorry, no code.... no time... Just running out the door right n..... (thud) :)