FX-Lib v1.2 for PB 4.20

Advanced game related topics
User avatar
Epyx
User
User
Posts: 44
Joined: Fri May 09, 2003 10:54 am
Location: Germany
Contact:

FX-Lib v1.2 for PB 4.20

Post 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!
If you can't make it good, at least make it look good.
Bill Gates
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

This looks awesome! Can't wait for the 4.30final version :)
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Post 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
User avatar
Peace
User
User
Posts: 14
Joined: Sun Aug 10, 2008 12:14 pm
Location: Then
Contact:

Cool!

Post by Peace »

As usual, a great work from you Epyx :D
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Thank you :!:
And yes, would be grate the plasmaeffect to run and a version for 4.30 :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Thisis fantastic! It has given me several new ideas already!!! THANK YOU!!!
8)
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post 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))
? :( ?
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Padraig
User
User
Posts: 29
Joined: Fri Jul 13, 2007 1:22 pm

Post 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
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post 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
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

problem

Post 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
Last edited by ALAN-MHz on Thu Jan 08, 2009 7:22 pm, edited 1 time in total.
Padraig
User
User
Posts: 29
Joined: Fri Jul 13, 2007 1:22 pm

Post by Padraig »

Without testing the code: You forgot

Code: Select all

EP_InitFXLib() 
to initialize the whole Lib.

Cheers & Happy New Year

Pad
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

Post 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 ?
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Alan... what OS are you using?
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

Post 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 ?
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post 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) :)
Post Reply