Split Up the Sprite Lib !?

Everything else that doesn't fall into one of the other PB categories.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Hi Fred!
What about splitting the Sprite Lib into different Libs to get smaller compiled files? Because some guys are not very happy with the solution that there applications will add about 40k only while using InitSprite() - I think you have read this on that topic...

Maybe some game coders dont really need any 3D or SpecialFX in there (old skool) project and so this way would save some KB in the final compiled file!! The best way for all PureBasic developers would be the idea behind "Danilo" to include only the needed obj stuff!!! I would really welcome this feature! What do you think about this?

Fred, i think danilo could help/support you a lot and you could make a paper contract with all forms like: "no copy/spread complete/parts of the source", "dont release any own basic language based on pb i.e" and so on... And hey, danilo would help/support you for free - thats really cool! *respect* I think he would be our men for future support :wink:

The development of Blitz is very fast continue with new features and announcements... Let us kick ass :wink: the Bltiz community with a great and powerfull new PureBasic age :wink:)) Please think about this...

Code: Select all

;-------------------------------------------------------------------

LoadJPEGSprite				SpriteJPG Lib 
CatchJPEGSprite				

;-------------------------------------------------------------------

Sprite3D				Sprite3D Lib = 3D Only...
InitSprite3D
CreateSprite3D
DisplaySprite3D
FreeSprite3D
TransformSprite3D
Start3D
Stop3D

;-------------------------------------------------------------------

DisplayAlphaSprite			SpriteSpecial Lib = SpecialFX()
ChangeAlphaIntensity			
ChangeGamma
StartSpecialFX
StopSpecialFX
DisplayShadowSprite
DisplaySolidSprite
DisplayTranslucideSprite
DisplayRGBFilter

;------------------------------------------------------------------
	
InitSprite				Sprite Lib = NormalFX() 
LoadSprite
CopySprite
ClipSprite
GrabSprite
DisplaySprite
DisplayTransparentSprite
TransparentSpriteColour
FlipBuffers
ClearScreen				
CloseScreen
FreeSprite
;
OpenScreen
OpenWindowedScreen
IsScreenActive
ScreenOutput
	
;------------------------------------------------------------------

SetFrameRate				Sprite2 Lib !??!?
SpriteCollision
SpriteDepth
SpriteHeight
SpriteOutput
SpriteWidth

;------------------------------------------------------------------
Any discusion entry will be weclome :wink:


PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Edited by - MrVainSCL on 04 February 2002 17:11:43
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Yep, i think thats a good idea
(if .LIB doesnt work), except 1 thing:

SpriteCollision()

should be in the standard Sprite-Library
because its needed in many games.
But who needs SpriteDepth/Width/Height
in a game ??
You should know how big your Sprites are,
when you write a game... :)

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

Hey Dannilo

its not nesecery to know how big your sprite is i.e. if you load sprites from disk
the user may change the sprite to their own so the width may not be same too
this will be usefull for example so your game can take "graphics sets"
and be more configurable

christos



Edited by - plouf on 04 February 2002 17:33:59
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

I know, plouf. :)

I didnt say that these commands are
not needed or not useful, but i wanted
to say that you dont need it in most games.

Most games cant be modified with other
sprites that have also another size.
If you code a Jump&Run (like Giana Sisters)
your Sprites are fixed size and you know
the size of every sprite.

Thats all. :wink:

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Danilo - you are right! When releasing a game, the spritesize, imagesize, samples and all other stuff are normaly fixed!! It may be you code a puzzle game :wink:) Hope Fred will add a pixel based collision detection for 100% real collision... Btw. the rectbased collistion is easy to code in a own procedure! I forgot to paste "SpriteCollision()" to the list of NormalSprite Lib :wink: Thx

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Well, splitting the lib willn't gain so much as the overhead is mainly due to DirectX constants and inner procedures.

For examples, these 6 commands:

SetFrameRate
SpriteCollision
SpriteDepth
SpriteHeight
SpriteOutput
SpriteWidth

are about 400 bytes when compiled.

JPG routines are already in a standalone lib. The same for 3DFx(). Only SpecialFX() could make senses to split up. Will gain 1-2 kb.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.
Only SpecialFX() could make senses to split up. Will gain 1-2 kb.

Fred - AlphaSND
So it´s best if you leave it as it is: Never touch a running system!



regards,
Redacid
---
Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

why not optimize PureBasic ??

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

redacid wrote:
So it´s best if you leave it as it is: Never touch a running system!
redacid, normaly this is right, but dont you like to have small programs? I think the first priority for Fred should be to remove most bugs...

Danilo wrote:
why not optimize PureBasic ??
I agree with you danilo! PureBasic is fast and produces small files, but why not optimize to get more speed i.e. and get small files by including not so much unneeded stuff...!? I think its better to optimize (rewrite the libs) now, instead somewhere in future when haveing a lot more of libs... This would be much more work as rewriting it now and set the new .obj based as standard!

Fred, as i could read - you liked Danilo´s idea with the obj sutff, isnt it? Mhhh.. Are you planing to implent this methode in one of the next releases? Maybe for PB3.00? :wink: Btw. i know you have to spent all your time for a new amiga version.. Any idea when we will see PB3.00 for windows? :wink:) Any idea what you will add/change in PB3.00? Stay cool...

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Edited by - MrVainSCL on 05 February 2002 20:35:57
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.
why not optimize PureBasic ??

(registered PureBasic user)
As I said (meant): I want PureBasic to be bug-free (and with many, many features). Yes, it should be optimized (speed-wise and and size) - but that`s no priority for me.

1. priority is adding more features
2. priority is removing all bugs
3. priority is optimize it (I like it to be very small - right!)



regards,
Redacid
---
Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.
redacid wrote:
1. priority is adding more features
2. priority is removing all bugs
3. priority is optimize it (I like it to be very small - right!)
hehe... i think before adding any new features, Fred should fix known bugs! What do you want with new features when some other important commands have bugs - i would like to say:

1. priority is REMOVING A-L-L BUGS !!!
2. priority is adding more features
and optimize it
3. Drinking coffee :wink:)
Only Amiga makes it possible!
hehe... Btw. Only PureBasic makes it possible :wink:)) AmigaRulez!


PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

of course should be the first priority to remove all bugs.

But I meant: at first (after removing all still existing bugs) Fred should add more features - and then remove all newly introduced bugs... and then optimize everything. And *then* he could have a cup of coffee :)

regards,
Redacid
---
Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.
redacid wrote:
...And *then* he could have a cup of coffee :)



PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
Post Reply