Page 3 of 4
Re:
Posted: Tue Sep 15, 2009 6:47 am
by jamirokwai
eddy wrote:For the orbit FX I need to optimize the cosine calculation.
Could you test this code if you are a mac or linux user
I need result for MAC PPC, MAC INTEL and LINUX
Code: Select all
CompilerIf #PB_Compiler_OS<>#PB_OS_Windows
Debug "test MAC / LINUX"
a=-150
Debug a%128 ; <----- result = 126
CompilerEndIf
Mac OS X 10.6, PB 4.31, x86: 106
Mac OS X 10.6, PB 4.40b2, x86: 106
Mac OS X 10.6, PB 4.40b2, PowerPC-compiled: -22
Re:
Posted: Tue Sep 15, 2009 10:18 am
by michel51
eddy wrote:For the orbit FX I need to optimize the cosine calculation.
Could you test this code if you are a mac or linux user
I need result for MAC PPC, MAC INTEL and LINUX
Code: Select all
CompilerIf #PB_Compiler_OS<>#PB_OS_Windows
Debug "test MAC / LINUX"
a=-150
Debug a%128 ; <----- result = 126
CompilerEndIf
Mac OS 10.4.11 (Tiger): PB Version 4.31PPC - result: -22
Mac OS 10.4.11 (Tiger): PB Version 4.40B2PPC - result: -22
Re: Sprite3D engine with FX [cross-platform]
Posted: Tue Sep 15, 2009 10:36 am
by eddy
modulo is not symmetric for MAC PPC.
Perhaps It's a bug.

Re: Sprite3D engine with FX [cross-platform]
Posted: Wed Sep 16, 2009 4:04 am
by eddy
v0.91 uploaded
download :
http://www.datafilehost.com/download-1c41509c.html
- layer FX
- more sprite FX
*obsolete : SetFXSpeed
*obsolete : SetFXtransition
*MAC PPC : some FXs don't work because of the FastCosine bug.
Re: Sprite3D engine with FX [cross-platform]
Posted: Wed Sep 23, 2009 2:01 am
by eddy
v0.92 uploaded
download :
http://www.datafilehost.com/download-86f09acf.html
- deformation FX : SineSkew, Stretch, Perspective
- FX : orbit
- Minor bug fixed : FastCos, FastSin
- Optimized : RenderView, ScaleSprite
I noticed the sprite mesh faces are visible if the deformation is too big.

The next version will only support PB versions 4.40+. I plan to use MAP to load named parameters (e.g. path points, scale transitions,...).
Code: Select all
AddLayer(10, "MyTexture" ....)
CreateSCaleFX(100, "MyScaleOptions" ....)
Re: Sprite3D engine with FX [cross-platform]
Posted: Sat Sep 26, 2009 8:33 pm
by eddy
W.I.P
- add filter parameters :
ClearSpriteFXs(Sprite, FilterFX=#PB_Ignore) ;// FilterFX=#FX_Move | #FX_Oscillation
ClearLayerFXs(Layer, FilterFX=#PB_Ignore)
- I found a cool website about easing equations : http://www.robertpenner.com/easing/

Now I can code FXs : MoveTo, RotateTo, ScaleTo 
Re: Sprite3D engine with FX [cross-platform]
Posted: Sun Sep 27, 2009 7:40 pm
by eddy
W.I.P
- removed old code for PB version 4.30 and below
- increase max sprites per layer = 5000 (can be customized)
- optimized layer rendering : all layers share the same memory buffer
- first easing results
(example with 16 easing modes)

Re: Sprite3D engine with FX [cross-platform]
Posted: Mon Sep 28, 2009 3:40 am
by eddy
v0.93 uploaded
- easing FX : EasingMove, EasingRotate, EasingScale
- added 31 easing modes
Code: Select all
#EASE_Linear=0
#EASE_Min_In
#EASE_Min_Out
#EASE_Min_InOut
#EASE_Light_In
#EASE_Light_Out
#EASE_Light_InOut
#EASE_Medium_In
#EASE_Medium_Out
#EASE_Medium_InOut
#EASE_Heavy_In
#EASE_Heavy_Out
#EASE_Heavy_InOut
#EASE_Max_In
#EASE_Max_Out
#EASE_Max_InOut
#EASE_Sine_In
#EASE_Sine_Out
#EASE_Sine_InOut
#EASE_Circular_In
#EASE_Circular_Out
#EASE_Circular_InOut
#EASE_Back_In
#EASE_Back_Out
#EASE_Back_InOut
#EASE_Bounce_In
#EASE_Bounce_Out
#EASE_Bounce_InOut
#EASE_Elastic_In
#EASE_Elastic_Out
#EASE_Elastic_InOut
[/size]
Re: Sprite3D engine with FX [cross-platform]
Posted: Mon Sep 28, 2009 9:22 am
by jamirokwai
Dear Eddy,
I tried the new 0.93 on Mac OS PB x86 4.31 and x86 4.40b3 but there is an error regarding a structure .a
;transition settings
Structure GS_TRANSITION_COLOR
defined.b
r.a <-- this one
g.a
b.a
dr.f
dg.f
db.f
EndStructure
I suppose it's a PB-error? Maybe the .a-variable is missing at the moment.
Edit: I forgot to add: it's line 506 in gearsprite.pb
Re: Sprite3D engine with FX [cross-platform]
Posted: Mon Sep 28, 2009 10:10 am
by eddy
jamirokwai wrote:Dear Eddy,
I tried the new 0.93 on Mac OS PB x86 4.31 and x86 4.40b3 but there is an error regarding a structure .a
.a (ascii) have been introduced in version 4.40b1 (
http://www.purebasic.fr/english/viewtop ... 524#295524 )
You can compile this code with PB 4.40b3. If not, you can report this problem as a bug.
Re: Sprite3D engine with FX [cross-platform]
Posted: Mon Sep 28, 2009 10:21 am
by eddy
If you want to test this version, you can replace all ".a" by ".i"
Re: Sprite3D engine with FX [cross-platform]
Posted: Mon Sep 28, 2009 11:09 am
by jamirokwai
eddy wrote:If you want to test this version, you can replace all ".a" by ".i"
Oh Gawd. I was too sleepy this morning. Mac x86 PB4.40b3 supports .a. Works great now that I realized my fault... Sorry for this!
Re: Sprite3D engine with FX [cross-platform]
Posted: Tue Sep 29, 2009 12:57 am
by eddy
Re: Sprite3D engine with FX [cross-platform]
Posted: Wed Oct 14, 2009 12:22 am
by eddy
http://www.datafilehost.com/download-a1f2edf8.html
v0.94 uploaded
- FX : attachObjectFX (special FX for attached sprites)
- group sprite functions : AttachSpriteChild, DetachSpriteChild, CountSpriteChilds
I code these functions for future Text sprites.
I've not enough time to do more. :roll:
Todo:
- text sprites
- text FXs
- bitmap font generator
Re: Sprite3D engine with FX [cross-platform]
Posted: Wed Oct 14, 2009 9:39 am
by dige
Well done!