Dark Bit Factory & Gravity

PROGRAMMING => Purebasic => Topic started by: KrazyK on March 18, 2019

Title: 3D Starballs Library
Post by: KrazyK on March 18, 2019
Here's my 3D sprite starfield library for PureBasic.   I wrote it last year before my hard drive died and lost everything and meant to post it ages ago but forgot all about it.
The example shows how to use a random set of values on how to control the movement.  But it can easily be changed to have preset values in an array or a DataSection.
I'll post an example if anyone needs it.
Just add the appropriate library into your PureBasic folders, load the example and run.
Title: Re: 3D Starballs Library
Post by: ~Ar-S~ on April 23, 2019
I try it with PB 5.70 x64 and it works fine.
There is just a problem in the code. The KK_StarBallInfo() do not work, i ; it
Title: Re: 3D Starballs Library
Post by: KrazyK on April 24, 2019
Thanks for testing the library.  The KK_StarballsInfo() is just a messagebox with version info like below.  I no longer have the original code so it looks like I didn't include that function for x64.  It's only on x86 it appears.
I'll try to re-code it again when I have a bit more time.

It appears I added an 's' to the KK_StarBallInfo() comamnd, so for x64 it's KK_StarBallsInfo(),  Problem solved - my mistake when writing it.

Title: Re: 3D Starballs Library
Post by: ymerdy on July 02, 2019
thank you for your library, works fine for me too (5.70_x64)
Are there other functions than KK_StarBallsInfo(), KK_StarBallsInit(), KK_StarBallsSpeed(), KK_StarBallsDraw() ?
Is it ppossible to have several StarBalls instances at the same time (to mix different sprites for example)!?

Thank you.
Title: Re: 3D Starballs Library
Post by: KrazyK on July 02, 2019
There are no other commands in the library and there can be only one instance using one sprite.
I may have to re-write it if I get time, and can remember how I did it.
Were you thinking of having multiple starfields moving in different directions with one sprite or one starfield with multiple sprites?
Title: Re: 3D Starballs Library
Post by: ymerdy on July 03, 2019

I imagined one starfield with random repartition of multiple sprites, but several starfields, each with one different sprite, would do the job, and would allow more possibilities (one starfield for blood cells, plus one starfield for viruses, or clouds + airplanes + rain, etc... well, perhaps a full 3D shootmup could be done with your lib only!).

Anyway, thanks again for your lib, that's a great job!