Author Topic: Vectorbobs library for Purebasic  (Read 10463 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Vectorbobs library for Purebasic
« on: July 18, 2015 »
Hi all,
I've been working on a vectorbobs library for PB for a little while now and it's almost finished so I thought I would upload a few video links of it in action.
I really liked Epyx's FX library he did for PB4x and really wanted it to work with PB5x so here's my attempt.
The video isn't very smooth but I assure you it does run very smoothly.

https://KrazyK.tinytake.com/sf/MjMyMzMyXzE0MzUzNDc
I'm just experimenting with the sprite scaling so I will need some of you PB5x users to test it and break it for me when I post it.  ;)

« Last Edit: July 19, 2015 by KrazyK »
Challenge Trophies Won:

Offline Dr.Death

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 445
  • Karma: 9
    • View Profile
Re: Vectorbobs library for Purebasic
« Reply #1 on: July 19, 2015 »
Hi mate

Looks really good to me so far mate keep up the good work & i can't wait to see the finished library.  ;D
Proud member of DAWN

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Vectorbobs library for Purebasic
« Reply #2 on: July 19, 2015 »
Very nice work!
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Vectorbobs library for Purebasic
« Reply #3 on: July 22, 2015 »
Nice one :) but when I run the Epyx example and it say compressed libraries are not supported(Epyx_FXLib)

How did you managed to get working?

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Vectorbobs library for Purebasic
« Reply #4 on: July 22, 2015 »
Nice one :) but when I run the Epyx example and it say compressed libraries are not supported(Epyx_FXLib)

How did you managed to get working?

I'm not using Epyxs' library at all.  It's written from scratch after doing a lot of research on rotations and snipping tiny bits of other code from here and there to put it all together.

Here's the first version for you to play with with some example data files.
The data files were taken from Epyxs' library examples with the comments and animation removed and adding  '.L' to the data statements.

Each data line has 6 values.  X,Y,Z, Sprite, Size, Transparency.  Take a look at the data files to see what I mean.

Please try and break it and let me know how you get on as this is the first test version.  I may add other features in later versions and optimize the code a bit to increase the speed, although it's not exactly slow at the moment.
 :cheers:

Also, here's another remake using this library.



« Last Edit: July 22, 2015 by KrazyK »
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Vectorbobs library for Purebasic
« Reply #5 on: July 22, 2015 »
I have put VectorBobs_01 in UserLibraries then restart the compiler but it kept saying it isnt supported.

Have I put the files in wrong place?

P.S. I am using Purebasic 5.31 :)

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Vectorbobs library for Purebasic
« Reply #6 on: July 22, 2015 »
I'm using 5.24 here, i'll install 5.31 on another machine and let you know.
Challenge Trophies Won:

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Vectorbobs library for Purebasic
« Reply #7 on: July 22, 2015 »

It works with 5.31 x86 but i've re-compiled it under v5.31 now as I needed to install it anyway on this machine, give it a whirl now.
I've also compiled a x64 version too so just use the appropriate one in the PureLibraries\userLibraries\ folder, can't have them both installed in the same place.
Use the new example with using the standard KeyboardPushed command as x64 doesn't appear to like the GetAsyncKeyState_ function for some reason!



Challenge Trophies Won:

Offline padman

  • Senior Member
  • Pentium
  • ********
  • Posts: 990
  • Karma: 260
    • View Profile
Re: Vectorbobs library for Purebasic
« Reply #8 on: July 23, 2015 »
K++ for this lib!  :clap:
Challenge Trophies Won:

Offline jace_stknights

  • Amiga 1200
  • ****
  • Posts: 399
  • Karma: 32
  • PEEK & POKE are not MOVEM!
    • View Profile
    • ST Knights WebSite
Re: Vectorbobs library for Purebasic
« Reply #9 on: July 24, 2015 »
 :cheers:
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: Vectorbobs library for Purebasic
« Reply #10 on: July 30, 2015 »
Awesome, excellent work!  :clap:
www.kirl.nl
Challenge Trophies Won:

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Vectorbobs library for Purebasic
« Reply #11 on: July 30, 2015 »
Thanks all, glad you like the early version.
I have been updating it quite a bit now and have added the option of drawing the bob object directly onto an image so you can then manipulate the image before drawing it on the screen.  This is very handy if you want to do a nice mirroring effect, of which I have an example I will post tomorrow along with v.02 of the library.  ;)
In the meantime though I wrote a quick bob creator that I used for my latest remake for NEXT. It's very simple and only does flat objects at the moment, but if I get more time then it may do simple 3D ones too. [scratches head]
Here are a few screens to look at to show you what can now be done with the new version.

Also, here's something else you can do now that you have access to the points data.

https://KrazyK.tinytake.com/sf/MjQ1NjIzXzE1MDg5NDA  8)

Update.

I haven't forgotten about the new library. I'm just tidying up the mirroring and putting together some examples and a quick demo. Soon....
« Last Edit: August 03, 2015 by KrazyK »
Challenge Trophies Won:

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Vectorbobs library for Purebasic [Update]
« Reply #12 on: August 10, 2015 »
Ok, here's the latest version of the vectorbobs library (v0.12) with a new features and a small demo I put together showing some of the objects I managed to create.

First of all we now draw the object directly onto an image so it can then be manipulated later.
eg.
Code: [Select]
CreateImage(10,640,400) ;draw the main object on this image. must be large enough to draw the bobs on
KK_BobSetImage(10) ;must define this image here!

We then pass the object address and the length to another function which then returns the number of points in the object
eg.
Code: [Select]
NumPoints=KK_BobCatchObject(ObjectAddress,ObjectLength)

And then define the position of the object.
eg.
Code: [Select]
KK_BobSetCentre(320,240,512) ;set the centre, x, y, z


In the main loop of our program we simply call the following function then draw the Image we have created onto the screen.
I have included my transparent image routine which works the same way as the DisplayTransparentSprite where you can define the transparency colour.
eg.
Code: [Select]
ADDR=KK_BobDrawBobs(Xang,Yang,Zang,1)   ;this will draw the object on the defined image we have created and return the address of the object data points (see example)

hdc=StartDrawing(ScreenOutput())        
KK_BobDraw_TransparentImage(hdc,10,0,100,0)
StopDrawing()


See the example in the zip file and copy the relevant libraries into the appropriate locations to test.
Tested with PB 5.31.





« Last Edit: August 12, 2015 by KrazyK »
Challenge Trophies Won:

Offline ~Ar-S~

  • C= 64
  • **
  • Posts: 61
  • Karma: 26
  • Demo RuleZ
    • View Profile
Re: Vectorbobs library for Purebasic
« Reply #13 on: October 15, 2015 »
Great work ! Thanks :clap:
~ Ar-S ~