Author Topic: APE - A 3d particle engine for GLBasic.  (Read 38542 times)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
APE A particle engine, a 3d particle system lib for GLBasic.

This lib was last updated in january 2013.
This lib is released 11/26/2013.
Happy Thanksgiving, happy holidays!

-Neil





[attachment deleted by admin]
« Last Edit: 2013-Nov-26 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #1 on: 2012-Dec-11 »
Very nice demo, smooth, I'm getting about 280fps.  :good:

The only problem is that I am getting an App Crash on exit.

Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4453
    • View Profile
    • FUED
Re: APE - A 3d particle engine for GLBasic.
« Reply #2 on: 2012-Dec-11 »
Hi Hemlos, some feedback:

-Everything goes on 60fps as expected.
-When close to the clouds, the snowy ones, some has borders alpha fade to the background, it does not consider the other clouds behind, some consider the floor.
-inside of the blue ball is really cool!
-app crashed on exit (esc) here, tried twice.

Good going!

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #3 on: 2012-Dec-11 »
Very nice demo, smooth, I'm getting about 280fps.  :good:

The only problem is that I am getting an App Crash on exit.

Awesome

I wonder why it is crashing?
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #4 on: 2012-Dec-11 »
Hi Hemlos, some feedback:

-Everything goes on 60fps as expected.
-When close to the clouds, the snowy ones, some has borders alpha fade to the background, it does not consider the other clouds behind, some consider the floor.
-inside of the blue ball is really cool!
-app crashed on exit (esc) here, tried twice.

Good going!

Itll go faster if you force off the vysnc in your video card settings on your computer.

Wonder why it is crashing?
I use older hardware to test this, with no crashes. 2ghz cpu with 1 gig ram.

The clouds are Z fighting, which is expected.
« Last Edit: 2012-Dec-11 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: APE - A 3d particle engine for GLBasic.
« Reply #5 on: 2012-Dec-11 »
Yeah that crash was on both test versions that you gave me too. Always expected an Array problem, but when you said it does not happen on your machine, it must be something else.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #6 on: 2012-Dec-11 »
Ok i did find a couple sneaky globals lingering around, got rid of those.
I uploaded the fixed version.

As last resort, If that still crashes, i will do a sub on exit with arrays wiped next.

Everyone please get the new download from my site and re-test it, report crashes.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: APE - A 3d particle engine for GLBasic.
« Reply #7 on: 2012-Dec-11 »
Still crash on exit.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4453
    • View Profile
    • FUED
Re: APE - A 3d particle engine for GLBasic.
« Reply #8 on: 2012-Dec-11 »
Crash bandicoot here too.

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #9 on: 2012-Dec-11 »
Thanks for testing guys, really appreciate it!
Bugs founds were more serious than i originally thought.
All in all, this is good, i am converting the lib into a TYPE object which will be easier to code.

before you had to make a bunch of emmiters just for one explosion.
after im done you will be able to define an array of emitters, to group them up.

somethign like this:

Code: (glbasic) [Select]
GLOBAL Explosion[] as lib_APE_Object_
DIM Explosion[3] //fire smoke and shrapnel
Explosion[0].Create(stuffstuffstuff)
Explosion[1].Create(stuffstuffstuff)
Explosio[2].Create(stuffstuffstuff)

then you can make a few emitters in the explosion array, and can show the emitter group all in the same location with a for loop:

Code: (glbasic) [Select]
for i = 0 to 2
  Explosion[i].show(x,y,z)  //show all the explosions at this xyz location
next
Does this sound better? maybe theres a better way to set this up? Advice here is welcome while im revamping.



« Last Edit: 2012-Dec-11 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #10 on: 2012-Dec-11 »
If you guys wouldnt mind, i need this program tested bare bones with only one particle being drawn.

Need test for crash.

Its here, uploaded to forum:


[attachment deleted by admin]
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #11 on: 2012-Dec-11 »
Just tried your version just posted (V2) & no problems with any crash. I moved around both forwards & backwards to the imposed limits for about 10 mins no problems & no crash on exit.

Avg 190 fps on a AMD II P320 Laptop with Radeon 4250 gfx, Win 7 x64 & 6gb RAM.

Went on your site to download your earlier version to check for problems but was unable to find the demo so presume you have removed it for the tome being  ;)

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: APE - A 3d particle engine for GLBasic.
« Reply #12 on: 2012-Dec-11 »
If you guys wouldnt mind, i need this program tested bare bones with only one particle being drawn.

Need test for crash.

Its here, uploaded to forum:
No crash on that Version.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: APE - A 3d particle engine for GLBasic.
« Reply #13 on: 2012-Dec-11 »
Awesome, thank you Lee, and Christoph!
need more feedback from erico and big, check if the barebones still crashbandicoots them.

Im glad i converted the lib...it seems to run, litteraly 20 times faster so far...although i need to add a couple details.
I will have a new demo today, itll be running 30k particles, instead of 1500 ;)

heres a screenshot

[attachment deleted by admin]
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: APE - A 3d particle engine for GLBasic.
« Reply #14 on: 2012-Dec-11 »
OMG i will not really be able to test with 30k particles my machine is to slow to render this.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64